Cannot get SMTP email to work!

Hi

This has been driving me nuts for two days now, so I really hope someone out there can spot my problem! Virtualmin is working very nicely, I think I have my DNS and everything else working except for the ability to send emails from mail clients, such as Outlook.

I have seen lots of other forum posts on possible issues but cannot seem to track down a solution, so here goes with my set-up and what I’m seeing (or rather not seeing!)…

Centos 5.7
Virtual 3.90.gpl
Webmin 1.580

Hostname: vps2.simplyprandeventswww.co.uk
Postfix & Dovecot up and running

CSF firewall - tested with it off and on - port 25 appears to be open, it works when I telnet to it.

Output of main.cf and master.cf attached

When I create an account in Outlook, I am using the following:
username: webmaster.domain
Incoming mail server: mail.domain.com
Outgoing mail server: mail.domain.com

My outgoing server (SMTP) requires authentication = ticked

When I try to send mail I get I get timeout messages.

These are the last couple of entries from my maillog file, can’t see any errors?

Feb 28 18:05:37 simplyprandeventswww postfix/qmgr[11757]: A52362A293: from=root@simplyprandeventswww.co.uk, size=3944, nrcpt=1 (queue active)
Feb 28 18:05:37 simplyprandeventswww postfix/local[12457]: A52362A293: to=root@simplyprandeventswww.co.uk, orig_to=, relay=local, delay=0.14, delays=0.1/0/0/0.04, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Feb 28 18:05:37 simplyprandeventswww postfix/qmgr[11757]: A52362A293: removed

Having run pingability I get:
Error There was a problem while talking with the mail server. Got ‘SocketTimeoutException: Read timed out’

So clearly something is not allowing connection through, but even with firewall off it still doesn’t work. I did make a bit of a hash of hostnames when setting up the server so maybe its time to go back to square one and start again but I’m sure this must be something stupid that I just can’t see having spent two days looking at it.

Really appreciate any help anyone can offer.

If port 25 works with telnet (do you get the SMTP greeting line?), firewall should not be the issue.

Do any lines appear in the mail log, or the syslog (should be /var/log/messages on CentOS) when you try to send mail from outside?

Does the hostname you use for mail correctly resolve to your IP?

Thanks for the response Locutus.

In the end it seems my main.cf config was rubbish - I think I spent so long changing it based on various forum posts it ended up being a complete mess.

I also discovered a setting in the firewall which combined with fixing the main.cf file seemed to finally do the trick.

Thanks anyway

I’m having the same exact problem you were having… could you tell me how you fixed yours?

It sounds like that particular fellow ended up resetting his main.cf file.

If you post the specific errors you’re seeing, and the output of “postconf -n”, we may be able to help out with the problems you’re having.

-Eric

hi, i’ve SMTP error too, can;t login from outlook & android, but no problem appear when i used mobile cellular (nokia)

this is output from postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = debian, aura, localhost.kotabatu.net, localhost, aura.kotabatu.net
myhostname = aura.kotabatu.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = inet:localhost:8891
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual

thanks for your help, sorry if my english not good :slight_smile:

Your Postfix config looks good… what errors do you get when trying to login?

Also, if you look in the mail logs, either /var/log/maillog or /var/log/mail.log, do you see any errors or clues there?

Also, what ports are you trying to connect to when sending and receiving an email?

-Eric

hi, thanks for your reply

error message from mail.log is “relay access denied”, after searching about this problem i try to change SMTP port to 587, and now it’s work normally

regards