Scenario:
Opensuse 12.3 as a mail server on public IP
Postfix configured and managed manually, with very complex main.cf file
Today I entered a ssh shell and managed some minor network changes with text Yast (added a secondary dns server into network devices menu)
After exiting correctly form yast, I noticed that postfix began to signal “Relay denied” and reject messages … it had a completely broken main.cf. For example, my smtpd_recipients_restrictions were changed to defaults, the virtual_alias_domains disappeared … I had to retrieve it from a backup and check it line by line.
I never used to change /etc/sysconfig/postfix because I was used to manage it manually, and suseconfig never changed it.
The problem seem to be in the new /usr/sbin/config.postfix that does not see that main.cf (and also master.cf ) are been touched.
Plese help. Did I do something wrong or it’s a huge bug? You cannot use Yast if you have your own postfix?
On 2013-11-13 22:06, fmalfatto wrote:
>
> Scenario:
> Opensuse 12.3 as a mail server on public IP
> Postfix configured and managed manually, with very complex main.cf file
> Today I entered a ssh shell and managed some minor network changes with
> text Yast (added a secondary dns server into network devices menu)
You did not touch the yaST “mail” module?
> After exiting correctly form yast, I noticed that postfix began to
> signal “Relay denied” and reject messages … it had a completely broken
> main.cf. For example, my smtpd_recipients_restrictions were changed to
> defaults, the virtual_alias_domains disappeared … I had to retrieve it
> from a backup and check it line by line.
Ugh
> I never used to change /etc/sysconfig/postfix because I was used to
> manage it manually, and suseconfig never changed it.
> The problem seem to be in the new /usr/sbin/config.postfix that does not
> see that main.cf (and also master.cf ) are been touched.
Did you change “/etc/sysconfig/postfix” at all?
> Plese help. Did I do something wrong or it’s a huge bug? You cannot use
> Yast if you have your own postfix?
If you changed “/etc/sysconfig/postfix”, the system might alter postfix
configuration. You should only alter files in “/etc/postfix/”, and leave
sysconfig alone. If you touched that file, the logic might fail.
The old SuSEconfig script kept the “/var/adm/SuSEconfig/md5/” directory
with checksums of files. If the checksum was altered after SuSEconfig
run, on subsequent runs it would refuse to alter the files.
But SuSEconfig has been removed, and maybe the replacement does not
check. A quick grep does not find “md5” in the
“/usr/sbin/config.postfix” script.
IMO, it is a bug.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
I never touched /etc/sysconfig/postfix and I only entered Yast mail at installation time to activate postix and have it started at boot time.
If I repeat the whole process (after saving main.cf and master.cf) without modyfing anything, it should avoid any change, but I loose my postfix files again.
If it’s a bug, it’s strange that nobody has already discovered it. I think I have some problem in my installations.
I replicated it in another host that is not a mail server, without doing anything, and it also changes main.cf to default values contained in /etc/sysconfig/postfix!
> I replicated it in another host that is not a mail server, without doing
> anything, and it also changes main.cf to default values contained in
> /etc/sysconfig/postfix!
FWIW, the same happened on our server the two times that I changed network settings over the past week. (We also run 64-bit openSUSE 12.3.) In my case main.cf, master.cf and sasl_passwd.db were overwritten, breaking the setup. If someone figures out how to disable this ‘feature’ please let me know. I’m not sure if I ever touched /etc/sysconfig/postfix.
On 2014-02-10 20:46, dezwart wrote:
>
> FWIW, the same happened on our server the two times that I changed
> network settings over the past week. (We also run 64-bit openSUSE 12.3.)
> In my case main.cf, master.cf and sasl_passwd.db were overwritten,
> breaking the setup. If someone figures out how to disable this ‘feature’
> please let me know. I’m not sure if I ever touched
> /etc/sysconfig/postfix.
Bugzilla number?
If there is no Bugzilla, it will never be solved.
You can disable automatic config by editing “/etc/sysconfig/mail”:
I have set MAIL_CREATE_CONFIG=“no” as a workaround for now, but I believe there should be no default Yast rule that can silently cause data loss. For example, NetworkManager does not modify /etc/resolv if it was already manually changed
but I believe there should be no default Yast rule that can silently cause data loss.
Well, it seems you’re not supposed to modify postfix’s config manually by default.
Configure it in /etc/sysconfig or YaST instead.
That’s definitely easier for standard scenarios too, and is actually independent of which mail daemon you use (sendmail is also supported).
If you need manual control, turn off the automatisms, via MAIL_CREATE_CONFIG=“no”.
That’s nothing new btw, that’s how it is since years at least AFAIK.
I’m not in a position to decide whether that’s ok or should be changed though.
For example, NetworkManager does not modify /etc/resolv if it was already manually changed
True, and that also causes/caused problems for some users, if it got broken for some reason.
Although I think it’s only left alone if the line “### Please remove (at least) this line when you modify the file!” is removed.
If you leave it in, your modifications probably get just overwritten too.
Btw, that’s nothing NetworkManager does, but netconfig…