Linode Forum
https://forum.linode.com/

Ubuntu 11.10 broke dovecot + postfix + systemaccounts
https://forum.linode.com/viewtopic.php?f=11&t=7937
Page 1 of 1

Author:  croxis [ Thu Oct 20, 2011 12:06 pm ]
Post subject:  Ubuntu 11.10 broke dovecot + postfix + systemaccounts

I followed this guide in setting up email on 10.10 and upgraded to 11.04 when it came out with no issues. The 11.10 upgrade caused all sorts of mishaps for sending email by smtp and receiving.

SMTP:
My SMTP server does not support LOGIN. I've telnetted in and it is not listed.
5.7.8 Error: Authentication failed. Invalid authentication mechanism

postfix/main.cf
Code:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

readme_directory = no

smtpd_tls_cert_file = /etc/ssl/postfix.pem
smtpd_tls_key_file = /etc/ssl/postfix.key
smtpd_use_tls = yes
smtpd_sasl_application_name = smtpd
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = nimbus.croxis.net
alias_maps = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = nimbus.croxis.net, localhost.croxis.net, croxis.net, localhost, mail.croxis.net, never7.net, imaginative-studios.com, davidradford.name
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = mail/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -n -m "${EXTENSION}"
smtp_use_tls = yes
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom


master.cf
Code:
smtp      inet  n       -       -       -       -       smtpd
submission inet n       -       -       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       -       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

 
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}


/etc/postfix/sasl/smtpd.conf
Code:
pwcheck_method: saslauthd



Dovecot

Sending mails to any of the addresses bounces back with the following error:

Code:
The mail system

<croxis@nimbus.croxis.net> (expanded from <david@davidradford.name>): command
   line usage error. Command output: /usr/lib/dovecot/deliver: invalid option
   -- 'n' Usage: dovecot-lda [-c <config file>] [-a <address>] [-d <username>]
   [-p <path>]                    [-f <envelope sender>] [-m <mailbox>] [-e]
   [-k]

Final-Recipient: rfc822; [redacted]
Original-Recipient: rfc822;[redacted]
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; /usr/lib/dovecot/deliver: invalid option -- 'n' Usage:
   dovecot-lda [-c <config file>] [-a <address>] [-d <username>] [-p <path>]
   [-f <envelope sender>] [-m <mailbox>] [-e] [-k]


I'm not sure what the relevant configs would be to diagnose this. Thank you for any help at all!

Author:  hoopycat [ Thu Oct 20, 2011 2:09 pm ]
Post subject: 

This sounds a lot like bug 875440... there's a temporary workaround to try there. Might be worth adding your information to the bug report. Bonus points if someone can figure out what's broken and produce a patch, so that it stops being broken.

Author:  hoopycat [ Thu Oct 20, 2011 2:12 pm ]
Post subject: 

Correction: you might actually have two problems there. The bouncing problem seems to be due to the -n option on the deliver command line. Try removing it?

Author:  croxis [ Thu Oct 27, 2011 11:21 am ]
Post subject: 

I fixed the dovecot issue by removing -n and downgraded according to the fix in the bug bug report. However I am still having the same issue in sending emails which is why I think it might be a configuration issue I am not seeing. Here is my ehlo:

Code:
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Author:  mozart_ar [ Sat Oct 29, 2011 11:45 pm ]
Post subject: 

thanks! I solved my problem reading this thread.

I had upgraded from Ubuntu 11.04 to 11.10 and I did not receive my local email.
Then I see this line in /etc/postfix/main.cf:
Code:
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -n -m "${EXTENSION}"


Then I removed the "-n" option , restart postix and it works again!

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/