I have followed this guide line by line: https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql

Finally got emails to be received but I cannot send them and all I get is connecting to mail.. I am using the Claws mail client and it lets me login and receive emails but just not send them. I set it to use port 587 but it just hangs on connecting when sending

Here is my master.cf:

##
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       -       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    unix  n       -       -       60      1       pickup

and I cannot see anything in the logs /var/log/mail.log which says what is going on. Port 587, 465 and 25 are open in the firewall as well.

Where do I go from here to debug this?

UPDATE: I am able to connect via telnet on the server using port 587, postfix is running but I just cannot connect using the Claws Mail client when sending, it receives mail fine, even if I send an email from a Gmail account.

  • telnet your.smtp.hostname 587 can you see the smtp banner? – Marco May 31 '17 at 18:39
  • I tried telnet mail.hostname.com 587 and all I get is "Trying <Server_IP>..." Connection timed out, the port 587 is set to be allowed in UFW? – Ulio110 May 31 '17 at 18:47
  • As I supposed, it's even the local or gateway's firewall blocking your connections. – Marco May 31 '17 at 18:50
  • I am able to use the Claws Mail client to receive mail but just not send, I even connect to the same hostname address and it works for receiving. What would I do now? – Ulio110 May 31 '17 at 18:53
  • Try iptables -P OUTPUT ACCEPT – Marco May 31 '17 at 18:56

Your router or your isp is blocking outgoing connections to port 587. As you did "iptables -P OUTPUT ACCEPT", its not the local firewall for sure. I don't think disabling selinux might help as even telent returns a connection timeout.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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