3

In trying to set up Postfix to use dovecot for SASL (using mysql for virtual_*) I am unable to send email, either through telnet or Outlook, to a domain other than the one that is on the server. I am able to receive POP3 email just fine.

For SMTP, I am authenticating in Outlook on port 25, using TLS.

Update (probably important): I cannot authenticate via telnet. When I try auth login I receive the error 503 5.5.1 Error: authentication not enabled

I get the error 554 5.7.1 Relay Access Denied.

I have included below the output of postconf -n, please let me know if you need additional information - any help is appreciated!

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = /etc/mailname
myhostname = emaproduction.truckingshow.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = truckingshow.net
readme_directory = no
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks,         reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
smtpd_tls_key_file = /etc/ssl/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

This is the output of doveconf -n:

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.7-x86_64-linode38 x86_64 Ubuntu 14.04 LTS ext3
auth_mechanisms = plain login
auth_verbose = yes
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap pop3 lmtp
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 0
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}
  • @chris-rockwenn and in /etc/postfix/master.conf is sasl_auth enabled for smtp TLS? (e.g. smtps inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes) – mcantsin Apr 28 '14 at 20:53
  • @mcantsin - yes it is. It is commented out under the submission section – Chris Rockwell Apr 28 '14 at 21:01
  • submission would be port 587 then. – mcantsin Apr 28 '14 at 21:25
  • @mcantsin should I have either submission or smtps un-commented? Right now both are. I tried port 587 and port 465 with TLS - same result (I can send to local domains, not external). – Chris Rockwell Apr 29 '14 at 0:43
  • well, depends what you want. Port 25 ist smtp unencrypted, port 587 submission port (TLS) and port 465 smtps (SMTP-SSL). You can have all three, if you wish. – mcantsin Apr 29 '14 at 13:56
-1

Connect to port 587 to submit mail and enable TLS.

  • 1
    Unfortunately that doesn't work. I can send to local users with TLS on ports 587 and 465, but still can't relay. – Chris Rockwell Apr 29 '14 at 0:43
  • does your isp block port 25? – Thufir Jun 16 '14 at 3:16
  • This doesn't solve the issue if they can't get the authentication part of SMTP (to integrate with Dovecot) working. – Thomas Ward Feb 14 '18 at 21:51

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.