Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

What could cause spontaneous changes to Postfix config (main.cf)?

I'm running Snow Leopard Server (10.6.8) on a Mini that is connected to the Internet via an AirPort Extreme that is connected to a DSL modem. If the DSL line goes down – more often than not – the values of mydomain and myhostname in the Postfix configuration file (/etc/postfix/main.cf) get rewritten. They usually end up being set to the machine's .local address. E.g.


mydomain = local

myhostname = hostname.local


This causes mail to start bouncing, which in turn causes the gnashing of teeth…


Does anybody have any ideas about what could be causing this? Server Admin? For now I'm dealing with it by running a script that checks main.cf and replaces it with the correct version whenever mydomain or myhostname change. It seems to be working, but it's a hack.

Mac mini, Mac OS X (10.6.8)

Posted on Jul 24, 2012 11:08 PM

Reply
4 replies

Jul 26, 2012 6:36 AM in response to Douglas Urner

The usual suspect for confusion with most anything on OS X or OS X Server that's using IP and that needs security or integrity is an errant DNS set-up.


DNS errors have caused this problem with Postfix before, too.


I'd avoid a mail server using multicast DNS; that .local TLD used on the host name. (Per the RFCs, SMTP mail servers are configured with DNS A (machine) records, and various other SMTP servers interoperating with your mail server can and variously will depend on that A record as part of spam filtering and related tasks. And a .local isn't an A record that another server can resolve.)


Launch Terminal.app and issue the usual (diagnostic) tool to verify your local DNS set-up.


sudo changeip -checkhostname


It'll prompt for an administrative password, then display some configuration information and an indication that DNS is valid and no changes are required, or that there are host or DNS errors.

Jul 26, 2012 7:07 AM in response to Douglas Urner

I had this problem on a Mini SL Server for ages, tracked it to whenever the DSL line went down, this fix courtesy of this forum fixed the problem for me, as, to date, even if the DSL line has gone down the hostname remains correct !



"sudo scutil --set HostName applecrackers.co.uk [replace with your hostname]" [without the quotes!]



You MUST be Logged in as "root" !


HTH ** Mike **

What could cause spontaneous changes to Postfix config (main.cf)?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.