Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been following this tutorial : http://www.linuxmail.info/ to set a mail server on centOS 6. Everything was going fine until I reached this section : http://www.linuxmail.info/ . When I try and connect to my domain name via SMTP I get a connection refused but I've I use pop3 I connect to dovecot fine.

share|improve this question
    
Check your logs and give us the error recorded, please –  Dom Aug 8 '12 at 15:37
add comment

2 Answers 2

up vote 1 down vote accepted

There are more official-ish docs on the CentOS wiki:

http://wiki.centos.org/HowTos/postfix

http://wiki.centos.org/HowTos/postfix_sasl

Probably a few others.

There could be a number of things that are wrong. One in particular is your ISP blocking port 25 traffic as an anti-spam measure. In that case, you should be using the SMTP submission port (587) for Postfix, or SMTPS (SSL-enabled SMTP) on port 465.

Verify that Postfix is listening to the public interface, e.g., netstat -pant |grep ":25".

If it's a SASL authentication issue, check your logs.

update

From the netstat output in the comments, it looks like Postfix is only listening to localhost.

Look at CentOS Wiki's Postfix configuration guide for the available options. In particular, you want to set inet_interfaces = all from whatever the default is in /etc/postfix/main.cf and reload.

share|improve this answer
    
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 15363/master –  Frank Astin Aug 8 '12 at 15:44
    
Ah, it's only listening on localhost. In that case, you should have an entry in main.cf like inet_interfaces. Set it so that you have inet_interfaces = all. Check wiki.centos.org/HowTos/… for more details. –  cjc Aug 8 '12 at 16:00
    
lol, I uncommented it and left the localhost one uncommented aswell. Can connect to it fine now, thanks :) –  Frank Astin Aug 8 '12 at 16:07
add comment

doublecheck mynetworks you should include here your local network with netmask or the server probably will relay only emails from localhost

mynetworks = 127.0.0.0/8
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =  permit_mynetworks, 
    permit_sasl_authenticated, 
    reject_unauth_destination
broken_sasl_auth_clients = yes
share|improve this answer
    
Yeah, they're all there. –  Frank Astin Aug 8 '12 at 15:53
    
what about your firewall? Does it allow traffic from external? –  tombolinux Aug 8 '12 at 16:04
add comment

Your Answer

 
discard

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.