I’m finding it impossible to get a good postfix setup on suse 11.
Is it possible to disable the suse sysconfig for postfix so I can properly control it myself.
I think my edits to the postfix config files are getting overridden from outside the config files, ie sysconfig/yast.
All I want to do is deliver incoming mail to local mailboxes and to relay mail for trusted networks. I don’t need or want sasl, tls or ldap at this stage - I want to see it work first. I have set mynetworks parameter in main.cf but this, and other stuff, seems to be getting ignored or produces unpredictable results.
In trying to do something simple am I making it too complicated?
I notice that mail system configuration is the one thing conspicuously absent from the suse system setup pdf docs.
Why is this?
Can someone please point me in the right direction.
If you change main.cf, SuSEconfig will no longer create it from /etc/sysconfig/postfix and you are on your own, which is what you wanted.
Having said that, there is generally no need to edit main.cf yourself. It all can be controlled from /etc/sysconfig/postfix and the defaults are nearly all suitable as is, no TLS, SASL or LDAP is selected by default. You also have to edit /etc/sysconfig/mail and set SMTPD_LISTEN_REMOTE=yes to be able to receive mail.
So have I actually made a mess of it all from the start by editing the config file myself? … oops
If so how do I get back on track?
I’m quite happy doing either but I need to do one or the other - not both.
I only delved into the config file cos it didn’t work out of the box.
You will see a main.cf.SuSEconfig in /etc/postfix I think. Move this to main.cf and you’re back under sysconfig control. Maybe also a master.cf.SuSEconfig, deal with it similarly.
I’ll give it a try.
Presumably if I get back under sysconfig control and set SMTPD_LISTEN_REMOTE=yes as you suggested it will then work “out of the box” maybe?
Is there anything particularly to consider when it comes to getting postfix working with dovecot? It works fine at the moment but I suspect sysconfig will break it because this didn’t work out of the box when I first started either.
There are one or two settings you need to set in dovecot.conf but they don’t interact with postfix settings.
One thing I changed in the default postfix and dovecot settings was to use Maildir storage format instead of mbox storage format. But actually I didn’t do anything to the postfix config since my mail is filtered through procmail and procmail delivers to Maildir. So my only changes to sysconfig/postfix were RELAYHOST and POSTFIX_ADD_MYNETWORKS_STYLE=“subnet”, on the assumption that you are serving your LAN. RELAYHOST is important to set to your ISP’s relay because if you are on a dynamic address broadband connection the IP address range is probably blacklisted by recipients.
To set Maildir format in sysconfig/postfix you would add:
Notice the special prefix POSTFIX_ADD_
I don’t want to relay our mail through an ISP. ISPs don’t like the size of our attachments. I have set all the DNS stuff, MX records etc. (I have been running a windows based mailserver in this way for years but want to move it to suse). Also, I want to accept mail from trusted networks only so I should probably set mynetworks as a list of IPs somewhere?
Am I correct in assuming from your replies that sysconfig keeps a shadow copy of the config files and then overwrites the /etc/postfix/main.cf, etc? Does it do more than this? The reason I ask is that I’m sure my main.cf was correct but it just seemed to be getting overridden.
SuSEconfig generates main.cf from the sysconfig and if it hasn’t been modified by the user (I think it does a checksum comparison or a shadow copy, not sure which), it installs it. As I said, if you modified main.cf yourself, SuSEconfig would have left it alone. And SuSEconfig is only run when YaST is run, or when invoked explicitly.
Thanks for your help.
I think I understand things better now.
One thing to watch out for is that for directives in main.cf, whether handwritten or generated, the last one wins. E.g. if you have
setting = something
then later down the file
setting = another thing
the last one wins. So if you keep editing the first instance, it will have no effect. To see all the current directives, do