Postfix Backup mx configuration

Hi there.

I have a backup mx using postfix at the moment, it is set to route the primary mx of domains using transport mapping.

Is there a way I can tell postfix to deliver only to the primary mx rather than manually mapping it every time?

Thanks in advance.
LVL 1
alexanderfotiAsked:
Who is Participating?
 
bevhostConnect With a Mentor Commented:
The name that you use in the secondary MX, does postfix recognise that as itself?
eg if postfix is behind a NAT gateway, then the MX record will resolve to a IP address that is not bound to the postfix server.
0
 
bevhostCommented:
In the DNS entries for the MX records use a high priority (smaller number) for the primary
0
 
alexanderfotiAuthor Commented:
I think you have misunderstood the question, or I have worded it badly.

At the moment, I already have domains with this postfix server as their second MX.

if I dont implement a transport map, the server will try to deliver to their primary mx, fail (As its down etc) then try to deliver to the second mx which is itself.

It will then go into a mail loop. To prevent this, I have transport maps setup to tell postfix only to send to the primary mx. Whilst this works, it means I need to add it in to the configuration everytime I add a domain.

Is there a way in the config of postfix to tell it to only send to the first mx?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
alexanderfotiAuthor Commented:
No - the server is behind a nat and doesnt recognise it as itself, but, another server I have that ISNT behind a nat behaves in the same way
0
 
gheistCommented:
all mailers should be identical.
some use lowest order mailer to catch spam and make dynamic blacklisting.
0
 
bevhostConnect With a Mentor Commented:
Why do you need a backup MX?
Is the primary connected by dialup? or some other non permanent connection?

Why not allow the mail to queue on the sending MTA?
At least the sender will have some chance of knowing that the mail is not beling delivered yet.

As for why postfix is behaving this way I'm not sure, I would not configure this scenario for the reasons above.  In the MX records, do you use the actual hostname of the backup mx server, (ie the one with the matching forward and reverse DNS entries?) or are you using alias names from the domain you are doing backup MX for.?
0
 
alexanderfotiAuthor Commented:
Thanks - The Backup MX's are provided as a service to prevent end users getting bounecbackswhen a client's site is down from non RFC conforming mail servers.
0
All Courses

From novice to tech pro — start learning today.