0

I've two web servers (ws1.example.com, ws2.example.com) with postfix installed locally as a mail rely (using mandrillapp), user access them via www.example.com, which is a load balancer

On ws1, the configs are

hostname

ws1

hostname -f

ws1.example.com

/etc/hosts

127.0.0.1 localhost
127.0.1.1 ws1.example.com ws1

/etc/postfix/main.cf

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:[email protected]:abc
smtp_sasl_security_options = noanonymous

myhostname = ws1.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ws1, ws1.example.com, localhost

relayhost = [smtp.mandrillapp.com]:587

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

Apparently it work, but I want to know if the above configs are set with any potential issues?

Update: My concern is ws1.example.com and ws2.example.com are not resolvable in my DNS.

2
  • For clarification, did you worry email deliverability issues because you behind load balancer?
    – masegaloeh
    Sep 19, 2014 at 10:55
  • Because my webservers are not accessible in public Internet, and ws1.example.com are not resolvable in my DNS.
    – Ryan
    Sep 20, 2014 at 3:29

1 Answer 1

2

So, As I understand here your email flowing diagram

wsX.example.com --> smtp.mandrillapp.com --> external mailserver

Now, spam checker on external mailserver usually use the last smtp server reputation to help determining if this email was spam or not. So, in this case the external mailserver just checks smtp.mandrillapp.com reputation ignore what happen to the email before reach smtp.mandrillapp.com.

But some advanced spamchecker will consider entire mailflow to determine that your email was spam or not. So, they can check if domain wsX.example.com was exists or not. So for safe playing I suggest you to add A record for wsX.example.com resolved to IP of load balancer. As alternative of previous solution, you should change smtp_helo_name parameter to match example.com.

That small step will help you to ensuring that your email will arrive in user mailbox. One of my concern about why the ws1.example.com must be resolved is the some spamchecker will check your helo name. Some excerpt from the relevant article

The common reasons why mail servers are blocked for bad HELO’s are:

*Server is announcing itself as “localhost”.

*Server is announcing itself as an IP address.

*Server is announcing itself as a hostname that does not exist.

4
  • Yes, this is my concern. The problem is the web server is behind a load balancer and it only have internal IP assigned. So what record I should set?
    – Ryan
    Sep 22, 2014 at 3:05
  • 1
    ahh... load balancer and private IP. Sorry, I've missed that information. See updated answer
    – postfixer
    Sep 22, 2014 at 5:05
  • Thanks, so by setting smtp_helo_name to my load balancer DNS, will spam checker try to connect to this machine for verification? Since this load balancer only have port 80/443 enabled.
    – Ryan
    Sep 22, 2014 at 7:06
  • It's not necessary. You can leave smtpd port closed on your load balancer
    – masegaloeh
    Sep 22, 2014 at 13:44

Not the answer you're looking for? Browse other questions tagged .