django-orchestra/scripts/services/postfix.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2014-05-08 16:59:35 +00:00
apt-get install postfix
# http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox
# https://help.ubuntu.com/community/PostfixVirtualMailBoxClamSmtpHowto
2014-07-08 15:19:15 +00:00
# http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix
# http://www.mailscanner.info/ubuntu.html
2014-05-08 16:59:35 +00:00
2014-07-08 15:19:15 +00:00
apt-get install dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-sieve
2014-10-03 14:02:11 +00:00
sed -i "s#^mail_location = mbox.*#mail_location = maildir:~/Maildir#" /etc/dovecot/conf.d/10-mail.conf
echo 'auth_username_format = %n' >> /etc/dovecot/conf.d/10-auth.conf
echo 'service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}' >> /etc/dovecot/conf.d/10-master.conf
2014-07-08 15:19:15 +00:00
cat > /etc/apt/sources.list.d/mailscanner.list << 'EOF'
deb http://apt.baruwa.org/debian wheezy main
deb-src http://apt.baruwa.org/debian wheezy main
EOF
wget -O - http://apt.baruwa.org/baruwa-apt-keys.gpg | apt-key add -
2014-05-08 16:59:35 +00:00
2014-07-08 15:19:15 +00:00
apt-get update
apt-get install mailscanner
2014-09-29 12:22:45 +00:00
apt-get install postfix
2014-10-03 14:02:11 +00:00
echo 'home_mailbox = Maildir/' >> /etc/postfix/main.cf
echo 'mailbox_transport = lmtp:unix:private/dovecot-lmtp' >> /etc/postfix/main.cf
2014-09-29 12:22:45 +00:00
2014-10-03 14:02:11 +00:00
/etc/init.d/dovecot restart
/etc/init.d/postfix restart
2014-09-29 12:22:45 +00:00