OpenSuse 13.1 x86_64
Something keeps changing my main.cf inet_interfaces from inet_interfaces = all to inet_interfaces = localhost.
It happens every couple of weeks or so, has anyone else seen this?
BTW: Its one of the common reasons for the dreaded “Connection refused” error.
It also results in “Delayed Mail (till being retried)” emails in your local mail
If you modify the postfix config manually, you should probably set MAIL_CREATE_CONFIG=“no” in /etc/sysconfig/mail to prevent the system from regenerating the config.
Or make your configuration in /etc/sysconfig/mail and/or /etc/sysconfig/postfix if possible. In your case the option SMTPD_LISTEN_REMOTE (in mail) is probably the one you might want to change.
Note that you have to run /usr/sbin/config.postfix manually after you modified those files to regenerate the actual postfix config.
If you use YaST to change the settings (either “Network Services”->“EMail Server”, or “/etc/sysconfig editor”), this should be done automatically.
Thaks!
I looked at the file and decided that probably changing SMTPD_LISTEN_REMOTE=no to yes would be the right option. If that doesnt work then i’ll try changing MAIL_CREATE_CONFIG instead.
I get local mail fwd’d from my other system to me so that should do it, no?
Well, yes, I suppose so. Especially if that (inet_interfaces) was the only option that was changed automatically “from time to time” and changing only that back fixed your problems.
/usr/sbin/config.postfix has exactly this code (on 13.2):
if test "$SMTPD_LISTEN_REMOTE" == "yes" ; then
if "$(echo "$POSTFIX_LISTEN" | tr 'A-Z' 'a-z' )" != "" ]; then
$PCONF -e "inet_interfaces = $POSTFIX_LISTEN"
else
$PCONF -e "inet_interfaces = all"
fi
else
$PCONF -e "inet_interfaces = localhost"
fi
So if you have POSTFIX_LISTEN="" in /etc/sysconfig/postfix (which is the default), this will set “inet_interfaces = all” in the resulting postfix config, otherwise it will set inet_interfaces to the value of POSTFIX_LISTEN (and it sets “inet_interfaces = localhost” if SMTPD_LISTEN_REMOTE is “no”).
I checked /etc/sysconfig/postfix and yeh, POSTFIX_LISTEN=""
It looks like /usr/sbin/config.postfix on 13.1 is the same as you posted for 13.2 also
Ok, this should result in “inet_interfaces = all” in the postfix config then.
It looks like /usr/sbin/config.postfix on 13.1 is the same as you posted for 13.2 also
Yes, there haven’t been many changes there in 13.2 AFAIK…
And radically changing the options/config from one release to the next would not be a good thing anyway.