Linux/Mailserver/Small Office Smarthost: Difference between revisions
< Linux | Mailserver
No edit summary |
|||
Line 12: | Line 12: | ||
== postfix == | == postfix == | ||
smtpd_sasl_type = dovecot | |||
# Can be an absolute path, or relative to $queue_directory | |||
# Debian/Ubuntu users: Postfix is setup by default to run chrooted, so it is best to leave it as-is below | |||
smtpd_sasl_path = private/auth | |||
# and the common settings to enable SASL: | |||
smtpd_sasl_auth_enable = yes | |||
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination | |||
== dovecot == | == dovecot == |
Revision as of 22:49, 12 March 2013
This configuration is based on Ubuntu 12.04 LTS
- preparing the system
mkdir /srv/mail/virtual groupadd -g 5000 vmail useradd -s /usr/sbin/nologin -u 5000 -g 5000 vmail id vmail
postfix
smtpd_sasl_type = dovecot
- Can be an absolute path, or relative to $queue_directory
- Debian/Ubuntu users: Postfix is setup by default to run chrooted, so it is best to leave it as-is below
smtpd_sasl_path = private/auth
- and the common settings to enable SASL:
smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
dovecot
- /etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain # optional: login #!include auth-master.conf.ext # disable !include auth-passwdfile.conf.ext
- /etc/dovecot/conf.d/10-logging.conf
log_path = /var/log/dovecot auth_debug = yes # for debugging only mail_debug = yes # verbose_ssl = yes #
- /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:/srv/mail/virtual/%d/%n
- /etc/dovecot/conf.d/10-master.conf
service auth { ... unix_listener /var/spool/postfix/private/auth { mode = 0660 # Assuming the default Postfix user and group user = postfix group = postfix } ... }
touch /var/log/dovecot chown vmail:vmail /var/log/dovecot chmod 660