diff options
author | Jonas Smedegaard <dr@jones.dk> | 2012-03-26 13:40:19 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2012-03-26 13:40:19 +0200 |
commit | 579b8bf760fbf07f8ead276f8cb16057000bca63 (patch) | |
tree | 0a01e1dffeadcbb37f387e3897e52fe26a7cd6c4 | |
parent | 411f5a7a038eb69e9fbe10fe7746bfb2c6f8138c (diff) |
Use Dovecot deliver if available.
-rwxr-xr-x | postfix/postfix.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index 27efb9f..d52bfa6 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -69,8 +69,14 @@ else warn "Cyrus SASL missing - (Debian package sasl2-bin)." fi dovecot= +dovecot_deliver= if [ -x /usr/sbin/dovecot ]; then dovecot=1 + if [ -x /usr/lib/dovecot/deliver ]; then + dovecot_deliver=1 + else + warn "Dovecot deliver missing." + fi else warn "Dovecot missing - (Debian package dovecot-core or dovecot)." fi @@ -247,6 +253,9 @@ $postconf -c "$tempdir" -e "unverified_sender_reject_code = 550" # Trust recipient verification too $postconf -c "$tempdir" -e "unverified_recipient_reject_code = 550" +if [ -n "$dovecot_deliver" ]; then + $postconf -c "$tempdir" -e mailbox_command=/usr/lib/dovecot/deliver +fi if [ -n "$sasl_cyrus" ]; then saslsubdir="sasl" mkdir -p "$tempdir/$saslsubdir" |