1

I spent a lot of time searching for answers on related posts here, but to no avail. So that's why I am asking this question here.

  • I have: Debian 8, Postfix, Dovecot
  • I can send and receive emails with roundcube.
  • I can receive emails with thunderbird.
  • I cannot send emails with thunderbird.
  • Thunderbird says it connects to the server, but it times out because there is no response from the server.
  • I disabled my firewall.
  • I am not sure what to fill out in the server name field.
  • The emails I am trying to send end up in the concepts box on the server

I followed https://workaround.org/ispmail/jessie

This is my current config.

config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = server.example.com, localhost.example.com, localhost
myhostname = server.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = local:/opendkim/opendkim.sock
policyd-spf_time_limit = 3600
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_sasl_auth_enable = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = local:/opendkim/opendkim.sock
smtpd_recipient_restrictions = reject_unauth_destination, check_policy_service unix:private/policyd-spf, permit_sasl_authenticated, permit_mynetworks
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
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/mail_example_com_bundle.crt
smtpd_tls_key_file = /etc/.ssl/mail_example_com.key
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
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
root@server:/etc/dovecot/conf.d# clear
root@server:/etc/dovecot/conf.d# 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_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = server.example.com, localhost.example.com, localhost
myhostname = server.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = local:/opendkim/opendkim.sock
policyd-spf_time_limit = 3600
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_sasl_auth_enable = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = local:/opendkim/opendkim.sock
smtpd_recipient_restrictions = reject_unauth_destination, check_policy_service unix:private/policyd-spf, permit_sasl_authenticated, permit_mynetworks
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
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/mail_example_com_bundle.crt
smtpd_tls_key_file = /etc/.ssl/mail_example_com.key
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
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

postconf | grep smtpd_sasl_auth_enable:

smtpd_sasl_auth_enable = yes

postconf | grep smtp_sasl_auth_enable:

smtp_sasl_auth_enable = yes

when I connect using telnet to port 25 I get the following response from ehlo

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

AUTH is not enabled. Why?

When I try connect using telnet on 587 I see a blank screen.

I have no clue. Hope someone here does.

Thanks a lot.

  • look for error messages in /var/log/mail.log – cstamas Aug 5 '16 at 9:45
  • that is a good suggestion. it got me this: fatal: invalid "-o smtp_sasl_auth_enable" option value: missing '=' after attribute name.. I got spaces there... this solved the issue indeed – dexter Aug 5 '16 at 9:48
  • I can successfully connect, but still not send. Relay access denied. So I guess something else needs tweeking as well. @cstamas Also still not getting AUTH in my telnet when I connect to 587. – dexter Aug 5 '16 at 9:55
3

You need to tell to postfix to listen to the submission port. Look in master.cf, usually under /etc/postfix, and uncomment the line:

submission inet n       -       -       -       -       smtpd

Also, check the firewall(s) settings to be sure the port 587 is reachable from your client.

  • That's right. I already have this in the master.cf: \n submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtp_sasl_auth_enable = yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject – dexter Aug 5 '16 at 9:37
  • also for your reference I include the scan of ports: PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 80/tcp open http 110/tcp open pop3 111/tcp open rpcbind 143/tcp open imap 443/tcp open https 465/tcp open smtps 587/tcp open submission 993/tcp open imaps 995/tcp open pop3s 8080/tcp open http-proxy – dexter Aug 5 '16 at 9:43
  • I am having a new situation: I can now connect, but mails are not sent, most likely because of: postfix/smtp[4793]: fatal: specify a password table via the 'smtp_sasl_password_maps' configuration parameter – dexter Aug 5 '16 at 10:53
  • finally I had to remove: smtp_sasl_auth_enable = yes from the main.cf. It works fine now. Thank you all! – dexter Aug 5 '16 at 12:36
0

For submission this is something you should have in master.cf

submission inet n       -       -       -       -       smtpd
 -o syslog_name=postfix/submission
 -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
0

@cstamas ' suggestion was a good one. I noticed having spaces around the = in smtp_sasl_auth_enable = yes that should be smtp_sasl_auth_enable=yes then the first problem is solved.

after that I got an error 'Relay access denied', which was solved by adding:

  -o smtpd_recipient_restrictions=permit_sasl_authenticated

in the /etc/postfix/master.cf

Then I also had an error in the client configuration. I should use a server name that has a valid certificate installed, so the client can verify the servers identity.

  • also see my other answer below. There is a reason this is the debian default configuration file. e.g: it does enable authentication for the submission port only and ensures tls encryption. – cstamas Aug 5 '16 at 10:44

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.