EFA incorrect hostname

General eFa discussion
Post Reply
toddh
Posts: 69
Joined: 16 Feb 2015 18:52

EFA incorrect hostname

Post by toddh »

Hello,

I find in the header of emails that come from one of our EFA boxes it has the wrong hostname in certain areas.

Return-Path: <no-reply@efaz.ourdomain.com>
Received: from efax.localdomain (UnknownHost [172.22.xx.xx])

The efaz is the correct server name, so I cannot find were it is getting the efax.

And where is "localdomain" defined in the cofiguration?

I went through these host name settings from Shawn and they all show efaz, efax is nowhere in these config files.

1) Change the hostname.domainname in /etc/sysconfig/network
2) Change the hostname.domainname and hostname in /etc/hosts
3) Execute: Code: Select all sudo hostname <myhostname>
4) Change Hostname = hostname.domainname in /etc/MailScanner/MailScanner.conf
5) Change Hostname and Domainname in /etc/EFA-Config
6) Modify Postfix Transports using EFA-Configure to correct the domain name
7) Modify Inline Signature rules using EFA-Configure to correct the domain name
8) Modify /var/www/html/mailscanner/conf.php and change the domain name of the QUARANTINE_FROM_ADDR definition
Reboot the system

How do I change the to the correct host and domain name?

Thanks,

Todd
amaclach
Posts: 26
Joined: 14 Aug 2023 06:53

Re: EFA incorrect hostname

Post by amaclach »

This is how I set the hostname in my (not eFa) build script on Debian 12.
This should be pretty close to working on RHEL clones

Code: Select all

# Set Hostname etc.
hostnamectl set-hostname $FQDN
sleep 5
HN=$(hostname -s)
MYDOMAIN=$(hostname -d)
MYIP=$(hostname -I)

# Rebuild the hosts file
echo "127.0.0.1   localhost">/etc/hosts
echo "127.0.0.1   "$FQDN"   "$HN>>/etc/hosts
Post Reply