Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Dovecot and Postfix on a CentOS VPS I have, and am now trying to get it to work. Receiving mail works fine, as does fetching the mailbox with Thunderbird on Windows (using SASL for authentication), but when I'm trying to SEND mail (with Thunderbird again), it almost instantly comes up with a message about the SMTP connection timing out. If I try other ports (other than 465 for the SSL/TLS secured connection), it takes longer but still times out (so I think the port is correct, but something is refusing my connection).

Result of postfix -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_dns_lookups = no
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 104857600
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain =
myhostname =
mynetworks =,,
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains =
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
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_cert_file = /etc/pki/tls/certs/server.crt
smtpd_tls_key_file = /etc/pki/tls/certs/server.key
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
share|improve this question

A knee-jerk reaction: check (with telnet) if your ISP doesn't block outgoing mail ports (25 and 465).

Make sure your firewall allows outgoing connections to TCP ports 25 and 465.

share|improve this answer
I can send mail through other mailservers from Thunderbird, such as GMail, so I think that's not the problem. But I'll try disabling the firewall - my ISP shouldn't block any ports (they don't tend to do that here in Finland). – Miikka Virtanen May 15 '11 at 11:48
In that case we need logs, plenty of logs. Identify the IP to which you cannot connect, put its IP into debug_peer_list and let's see what the logs say ( And I would telnet to the remote port just in case. If you can and postfix cant, then there's a troll in some wire that can distinguish between a telnet to port 25 and postfix connection to port 25. Otherwise we get helpful data. – Paweł Brodacki May 15 '11 at 11:59
Yeah, I can telnet to port 25. Not sure if Postfix can - it seems to timeout the connection between my E-Mail client and Postfix, not between Postfix and the destination. The logs don't say anything when I'm trying to send the mail, either (but there ARE logs of e.g. receiving mail (which works)). – Miikka Virtanen May 15 '11 at 12:55
Hm... Telnet to localhost port 25 and check if postfix is listening there? Smart money is the program is using network connection, not running postfix binary directly. – Paweł Brodacki May 15 '11 at 12:58
Hmm... how should I know it's running? It displays the "connected" message, and tells me the escape character, but that's it. Also, for some reason, telnet doesn't accept any commands (like "quit") anymore. But I can still check mail and get the inbox with Thunderbird, so doesn't that mean Postfix IS running? – Miikka Virtanen May 15 '11 at 13:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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