I have just set up postfix (with tasksel install mail-server) with the default settings. Unfortunately, I can not send e-mails from by SMTP server.

Here is my main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mydomain.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.tld, PC-01, localhost.localdomain, localhost
relayhost = 
mynetworks = [::ffff:]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

Where mydomain.tld is my domain (surprise, surprise...).

I have checked /var/log/mail.log and it's keep saying:

Jun 16 20:38:59 PC-01 postfix/smtp[12967]: connect to mta5.am0.yahoodns.net[]:25: Connection timed out

I have also googled the whole night about this problem and others said it could be caused by the ISP since they are blocking port 25. I have checked it online, but I think they are not. (How can I make sure?)

So I would be greatful if you could help me.


Do you get SMTP greeting mesage from a remote mail server?

telnet 25

You may use tcptraceroute to locate the firewall blocking SMTP connections.

man tcptraceroute

  • Thank you for your answer! I have tried out telnet earlier (and now once again) but it keeps time out. Same with tcptraceroute: root@ubuntu:/home/thomas# tcptraceroute traceroute to (, 30 hops max, 60 byte packets 1 * * * [...] 15 * * * 16 mta-v5.mail.vip.bf1.yahoo.com ( <rst,ack> 300.182 ms mta-v5.mail.vip.bf1.yahoo.com ( <rst,ack,cwr> 300.141 ms 300.240 ms and tried out with port 25 (tcptraceroute 25), but that time it did not write line started with "mta-v5" like before. – user2302838 Jun 16 '13 at 23:19

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.