From 31eec9fa1cd0de5827a5a5edf1f3447fe8dcd894 Mon Sep 17 00:00:00 2001 From: Morteza Milani Date: Sun, 25 Jan 2015 23:37:01 -0800 Subject: [PATCH 1/2] Add POP3s support --- setup/mail-dovecot.sh | 6 +++++- setup/spamassassin.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index 959ab39..aaf77e2 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -21,7 +21,7 @@ source /etc/mailinabox.conf # load global vars # Install packages... apt_install \ - dovecot-core dovecot-imapd dovecot-lmtpd dovecot-sqlite sqlite3 \ + dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-sqlite sqlite3 \ dovecot-sieve dovecot-managesieved # The `dovecot-imapd` and `dovecot-lmtpd` packages automatically enable IMAP and LMTP protocols. @@ -84,6 +84,10 @@ sed -i "s/#port = 110/port = 0/" /etc/dovecot/conf.d/10-master.conf tools/editconf.py /etc/dovecot/conf.d/20-imap.conf \ imap_idle_notify_interval="4 mins" +# Set POP3 UIDL +tools/editconf.py /etc/dovecot/conf.d/20-pop3.conf \ + pop3_uidl_format = %08Xu%08Xv + # ### LDA (LMTP) # Enable Dovecot's LDA service with the LMTP protocol. It will listen diff --git a/setup/spamassassin.sh b/setup/spamassassin.sh index e8db15e..0240cf5 100755 --- a/setup/spamassassin.sh +++ b/setup/spamassassin.sh @@ -71,6 +71,7 @@ chown -R spampd:spampd $STORAGE_ROOT/mail/spamassassin # Enable the Dovecot antispam plugin. # (Be careful if we use multiple plugins later.) #NODOC sed -i "s/#mail_plugins = .*/mail_plugins = \$mail_plugins antispam/" /etc/dovecot/conf.d/20-imap.conf +sed -i "s/#mail_plugins = .*/mail_plugins = \$mail_plugins antispam/" /etc/dovecot/conf.d/20-pop3.conf # Configure the antispam plugin to call sa-learn-pipe.sh. cat > /etc/dovecot/conf.d/99-local-spampd.conf << EOF; From 916063a79ba27a4cebaef568c95e26767fc712fb Mon Sep 17 00:00:00 2001 From: Morteza Milani Date: Wed, 8 Apr 2015 21:32:14 -0700 Subject: [PATCH 2/2] Better documentation for POP3 settings, UIDL. UIDL assigns a unique string to each email. This allows emails to be left on the server after a client downloads them. --- setup/mail-dovecot.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index aaf77e2..abc13a5 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -85,6 +85,9 @@ tools/editconf.py /etc/dovecot/conf.d/20-imap.conf \ imap_idle_notify_interval="4 mins" # Set POP3 UIDL +# UIDLs are used by POP3 clients to keep track of what messages they've downloaded. +# For new POP3 servers, the easiest way to set up UIDLs is to use IMAP's UIDVALIDITY +# and UID values, the default in Dovecot. tools/editconf.py /etc/dovecot/conf.d/20-pop3.conf \ pop3_uidl_format = %08Xu%08Xv