Re: [SLE] Sample Postfix file ...main.cf and master.cf

From: Thibaut Cousin (linux_at_thibaut-cousin.net)
Date: 02/07/05

  • Next message: Tage Danielsen: "[SLE] mail postfix"
    To: suse-linux-e@suse.com
    Date: Mon, 7 Feb 2005 17:34:51 +0100
    
    
    

    Le Lundi 7 Février 2005 15:08, Savyn Vydelingum (GTT) a écrit :
    > Can someone email me a sample main.cf and master.cf...I really would
    > like to really understand how to configure Suse 9.2 pro as an email
    > server. I've read the following doc, but since I am new to this...any
    > help is appreciate.

      Here is the detail of what we did with a friend for a small network. The
    SMTP / IMAP server is a 9.2 box. Here is, mostly, what we did, starting with
    default RPM packages from SUSE.
      The strategy was as follows : the SMTP server (Postfix) is able to
    communicate with the outside world, but relays only local mails. The IMAP
    server (Cyrus) is cut from the outside. So the users can contact the IMAP
    server only from the local network, and they use Squirrelmail (a webmail
    interface) if they're outside the local network. So there is *no*
    authentification mechanism, justified by the fact that there are only a
    couple of users on that local network and they are trusted.

    1) /etc/postfix/main.cf
      Here are the variables we changed, for a domain "domain.org". Postfix sends
    the mails to their provider's SMTP server smtp.myprovider.com, as a relay
    host.

    mydomain = domain.org
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    local_recipient_maps =
    mynetworks_style = subnet
    mynetworks = 127.0.0.0/8, 192.168.0.0/24
    alias_database = hash:/etc/aliases
    relay_domains = $mydestination
    relayhost = smtp.myprovider.com
    mailbox_transport = cyrus
    alias_maps = hash:/etc/aliases

      As you can see from the "mynetworks" line, Postfix is configured to relay
    only messages from the local network.
      Then you can restart Postfix. If your firewall is correctly configured, it
    should work directly.

    2) /etc/aliases
      Let's say the postmaster has a real Unix account (probably not so secure,
    but sufficient for a small server) whose username is "webadmin" so I added or
    modified the lines :

    postmaster: webadmin
    mailer-daemon: postmaster

      After that, run "newaliases" as root for those changes to take effect.

    3) /etc/imapd.conf

      I had to add only three lines to get it to work :

    admins : cyrus
    lmtp_luser_relay: webadmin
    sieveusehomedir: yes

      Replace "webadmin" with the name of the postmaster, see above. The first
    line says that only user cyrus is allowed to administer the mail boxes. The
    second line makes "webadmin" an email collector account. The third line
    implies that users will be able to setup SIEVE rules in their home folders,
    and Cyrus will catch them and use them directly.

    4) Creating the mailboxes

      Give a real password to the account cyrus with the good old "passwd" command
    or the YaST2 user module. Then log in the Cyrus interface with the command :

    $ cyradm --auth login localhost --user cyrus

      Then type the following commands to create the mailbox for a user called
    choeger. The "user." in front of the username must not be changed.

    localhost> createmailbox user.choeger
    localhost> setacl user.choeger cyrus lrswipcda
    localhost> exit

      If you want to add subfolders to the mail box, create them in the same way,
    for example :

    localhost> createmailbox user.choeger.suse
    localhost> setacl user.choeger.suse cyrus lrswipcda

    will create a subfolder "suse" to the main inbox folder.

      And it's finished! You can use your favorite mail client to connect to the
    IMAP server.
      As we aren't network specialists, I'm not saying this configuration is the
    best. It works, it can be setup in a matter of minutes and it's reasonnably
    secure in a small network where users can be trusted. :-)
      Have fun !

    -- 
    Thibaut Cousin
    http://www.thibaut-cousin.net
    
    


    • application/pgp-signature attachment: stored

  • Next message: Tage Danielsen: "[SLE] mail postfix"

    Relevant Pages

    • Re: Suse Web Server Access problem
      ... while I can access the web page fine from the server as localhost, ... try to access the web page from another PC on my Local network, ... What does the listening port look like in a 'netstat -tan'? ...
      (comp.os.linux.networking)
    • Mirroring Cyrus IMAP
      ... I have an external mailserver running Postfix which is MX ... I can access Cyrus through the local network via IMAP and from outside ...
      (comp.mail.imap)
    • Re: Building a mail server
      ... > thinking about was Cyrus or maybe find something that stores mail in mySQL, ... Cyrus gives you a pop3 server in addition to an imap server. ... It could also be used for just general mail filters like ... > not have to open that account for them. ...
      (Debian-User)
    • Re: mailutil and ignoring bad headers?
      ... bad headers" nor why the IMAP server is unhappy; all it knows is that the IMAP server refused *and* cancelled the entire transfer. ... The error messages that you see come from Cyrus. ... Having the luxury of such a world, Cyrus refuses to permit the injection of bad messages, whether via IMAP or via SMTP. ...
      (comp.mail.imap)
    • Re: KMail Error with IMAP Inbox folder?
      ... > The problem was isolated to the Windows Bases workgroup Mail server. ... Posted a mini-HowTo for Cyrus last week, ... Use the Network Services->Mail Transfer Agent to configure fetchmail. ... This would create a public access folder with lookup, ...
      (alt.os.linux.suse)