We have a couple of Amazon EC2 boxes running an email forwarding service using POSTFIX (And RHEL5.5). Everything works fine, except the SMTP banner is incorrect.
In main.cf I have
smtpd_banner = $myhostname Company Name SMTP server ($mail_name $mail_version)
This shows the SMTP Header as
220 ip-x-x-x-x.localdomain Company Name SMTP Server (Postfix/2.3.3)
(ip-x-x-x-x.localdomain being the hostname of the server inside Amazon EC2, I've removed the IP from the hostname for security)
The problem is, the server is currently uses two different DNS records for access;
Some of the domains have their MX records set to mail-01.companywebsite.com and some set to mx1.companywebsite.com. Is there any way to get the SMTP banner to show the correct record based on what the domain is set to?
(I.E. mail sent to mail-01.companywebsite.com would have the SMTP banner
220 mail-01.companywebsite.com Company Name SMTP Server (Postfix/2.3.3)
and mail sent to mx1.companywebsite.com would have the banner
220 mx1.companywebsite.com Company Name SMTP Server (Postfix/2.3.3)