2

So I installed Postfix, Dovecot and MySQL as per this guide:

Uses encryption and only SSL and seems like a newbie way of going secure from the beginning, but I have a problem. For an odd reason I am able to use Mail.app on OS X successfully to send and receive emails but with Airmail, I can't. I just get connection refused on the App and the following error on my server:

Jul 16 15:35:26 apple dovecot: imap-login: Login: user=my@email, method=PLAIN, rip=xxx, lip=xxx, mpid=31389, TLS, session=xxx
Jul 16 15:35:26 apple dovecot: imap(my@email): Disconnected: Logged out in=24 out=707
Jul 16 15:35:26 apple postfix/smtpd[31390]: connect from unknown[xxx]
Jul 16 15:35:27 apple postfix/smtpd[31390]: disconnect from unknown[xxx]
Jul 16 15:35:46 apple postfix/smtpd[31372]: disconnect from unknown[xxx]

$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = localhost
myhostname = sub.domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks, 
reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/dovecot/dovecot.pem
smtpd_tls_key_file = /etc/dovecot/private/dovecot.pem
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains =
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps =
mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
  • It's probably a configuration option you need to set, what options does Airmail present to you in terms of session encryption? – NickW Jul 16 '13 at 15:47
  • Only PLAIN and CRAM-MD5, but I even enabled CRAM-MD5 in Dovecot, it tries to login that way but it says the user and password are incorrect. If I use plain it says it just had connection refused. – Lucas Gomez Jul 16 '13 at 15:52
  • So you have auth_mechanisms = plain login cram-md5 ? – NickW Jul 16 '13 at 15:58
  • In airmail are you using fulltls or tls ? – NickW Jul 16 '13 at 15:59
  • Correct @NickW, I tried both, neither have worked. – Lucas Gomez Jul 16 '13 at 16:10
1

PLAIN/CRAM-MD5 it just method of authentication. As I see from the guide, they have used

smtpd_tls_auth_only = yes

that mean you MUST use SSL/TLS to get authentication to work. You can just disable those restriction (set it to no) or enable ssl/tls in Airmail

| improve this answer | |
  • Ok, so it does work if I disable TLS auth only, but why? I am using TLS in Airmail, I want to keep the security on. – Lucas Gomez Jul 16 '13 at 16:14
  • 1
    I can't answer "why". You could try to increase debug level in postfix with debug_peer_list/debug_peer_level options and try again. One more thing, could you show the output of postconf -n – ALex_hha Jul 16 '13 at 16:18
  • Went ahead and added that on my main post. – Lucas Gomez Jul 16 '13 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.