Docs/SysAdmin/Server/Mail/PostfixCyrus

From Mandriva Community Wiki

Jump to: navigation, search
Using Postfix and Cyrus SASL

This document applies to postfix-2.0.13, cyrus-sasl-2.1.15, cyrus-imapd-2.1.15 or greater for LM 9.2.

By default, Mandriva Postfix runs chroot jail. The following method allows users to config Postfix and Cyrus to run within chroot.


[edit] Setup Postfix to run LMTP over TCP socket

In /etc/postfix/main.cf add:

mailbox_transport = lmtp:$myhostname

Edit /etc/cyrus.conf and comment the line:

lmtpunix cmd="lmtpd" listen="/var/lib/cyrus/socket/lmtp" prefork=1

uncomment:

lmtp cmd="lmtpd" listen="lmtp" prefork=0=

(change the number after "prefork" to suit your needs)

Create a user "cyruslmtp" with a valid (for Cyrus) password. Note: if you would like to authenticate via sasl for smtp auth, you could create the user "cyruslmtp" under cyrus-imapd.

Create a user in the system:

$ useradd cyruslmtp
$ passwd cyruslmtp

Create a user in cyrus-imapd

$ su cyrus
$ cyradm localhost
$ cm user.cyruslmtp
$ quit
$ exit
$ saslpasswd2 cyruslmtp

In /etc/imapd.conf add:

lmtp_admins: cyruslmtp

Create a file /etc/postfix/lmtp_sasl_pass owned by root and mode 600 containing the line:

<host where cyrus is running><TAB>cyruslmtp:<password for cyruslmtp>

Run:

   postmap /etc/postfix/lmtp_sasl_pass
   postconf -e "lmtp_sasl_auth_enable = yes"
   postconf -e "lmtp_sasl_password_maps = hash:/etc/postfix/lmtp_sasl_pass"
   postconf -e "lmtp_sasl_security_options = noanonymous"
Personal tools