SASL support in postfix

I'm managing a mail server running postfix and dovecot. Right now it's mainly used to relay mail using virtual alias mapping and I would like to enable SASL support so that users can send mail from their accounts. I've added
Code:
smtpd_sasl_auth_enable = yes
to my main.cf, but when I run postconf -a nothing is returned. Does this mean I need to recompile postfix with SASL support? How can I get SASL working?

Thanks!
 
1. Compile and install Dovecot

2. Compile Postfix with SASL support, according to your dovecot version

3. Create the authentication socket in dovecot config (dovecot.conf, if you use dovecot 1.x)
Code:
auth default {
    mechanisms = plain login
    passdb sql {
        args = /usr/local/etc/dovecot/dovecot-mysql.conf
    }
    userdb prefetch {
    }
    userdb sql {
        args = /usr/local/etc/dovecot/dovecot-mysql.conf
    }

[color="Red"]    socket listen {
        client {
            path = /var/spool/postfix/private/auth
            mode = 0660
            user = postfix
            group = postfix
        }[/color]
    }
}

4. Use this socket with postfix (main.cf)
Code:
# SASL
[color="Red"]smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth[/color]
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes

5. Proceed with the remaining SASL options for postfix.
 
I already had dovecot and postfix installed. I ran make deinstall in /usr/ports/mail/postfix and changed the flag for sasl support to on and ran make install clean

After adding the sasl lines to main.cf, postconf -a still returns nothing. Is there a way to tell what is causing this to fail?
 
Try the following:
Code:
cd /usr/ports/mail/postfix
make config
Make sure that 'DOVECOT' (or 'DOVECOT2' if you like) is checked. Then rebuild the package.
 
Back
Top