django-orchestra/scripts/services/postfix.md

48 lines
1.2 KiB
Markdown
Raw Normal View History

2014-05-08 16:59:35 +00:00
# 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-10-09 17:04:12 +00:00
apt-get install dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-sieve dovecot-managesieved
2014-10-04 09:29:18 +00:00
echo 'mail_location = maildir:~/Maildir
mail_plugins = quota
auth_username_format = %n
service lmtp {
2014-10-03 14:02:11 +00:00
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
2014-10-04 09:29:18 +00:00
}' > /etc/dovecot/local.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-04 09:29:18 +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
2014-10-09 17:04:12 +00:00
# TODO check postfix and dovecot configs
# TODO crontab that deletes message +30 days on spam folders