Results 1 to 10 of 10

Thread: Postfix setup and sysconfig

  1. #1
    prsjm3qf NNTP User

    Default Postfix setup and sysconfig

    Hello All,

    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.

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Postfix setup and sysconfig

    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.

  3. #3
    prsjm3qf NNTP User

    Default Re: Postfix setup and sysconfig

    Ah,

    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.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Postfix setup and sysconfig

    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.

  5. #5
    prsjm3qf NNTP User

    Default Re: Postfix setup and sysconfig

    Thanks

    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.

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Postfix setup and sysconfig

    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:

    POSTFIX_ADD_HOME_MAILBOX=Maildir/

    Notice the special prefix POSTFIX_ADD_

  7. #7
    prsjm3qf NNTP User

    Default Re: Postfix setup and sysconfig

    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.

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Postfix setup and sysconfig

    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.

  9. #9
    prsjm3qf NNTP User

    Default Re: Postfix setup and sysconfig

    Thanks for your help.

    I think I understand things better now.

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Postfix setup and sysconfig

    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

    /usr/sbin/postconf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •