Submitted by quigongren on Sun, 09/20/2009 - 20:26
Hello,
I have read many posts from other users around the net concerning problems sending mail through Virtualmin using an email client but have not been successful in finding a solution that works for me.
I am running Virtualmin on Centos 5 Server and can receive but not send email when I try to setup Outlook. I have tried different settings on Outlook and have also tried to check the Postfix logs but can't seem to find them.
Please help.
Thanks,
Carl
Status:
Closed (fixed)
Comments
Submitted by andreychek on Sun, 09/20/2009 - 21:12 Comment #1
What errors do you see, in both Outlook, as well as in the mail logs (/var/log/mail.log)?
Also, are you sure you've enabled authentication for Outgoing SMTP messages in Outlook? That's not a default, at least in some versions.
Submitted by quigongren on Sun, 09/20/2009 - 21:58 Comment #2
In Outlook I have the "My outgoing server (SMTP) requires authentication" box checked using the same settings as my incoming server option bubbled. Under advanced settings, Incoming POP is using port 110, smtp is using port 25. No encryption is enabled. I am setting up the account in Outlook for the first time so I am using the "test account settings" button. POP completes fine while SMTP errors with: "Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP)."
When I check /var/log/ I find maillog but no mail.log. I have uploaded the maillog file here (had to add .txt extension to upload).
Funny thing is, I don't see any references to my attempted connections using smtp and I should in the entries over the past few hours (using username cgren@technology2reality.com). I definitely see the POP connections being made but absolutely no SMTP chatter.
As a side note, when I try to telnet to port 25 to mail.technology2reality.com the connection fails. I do know that port 25 is open and working on my firewall though because we have other mail servers (exchange) that have no problems with users connecting from outside to smtp.
Thanks,
Carl
Submitted by andreychek on Sun, 09/20/2009 - 22:03 Comment #3
Hi Carl -- it sounds like your ISP may be blocking port 25.
You may want to consider using ports 465 (SMTPS) and/or 587 (Submission) for sending email.
Submitted by quigongren on Sun, 09/20/2009 - 22:14 Comment #4
I was just actually thinking about that. How is this done on the Virtualmin side?
Thanks.
Submitted by andreychek on Sun, 09/20/2009 - 22:22 Comment #5
The simplest method is probably to log in via SSH, edit /etc/postfix/master.cf, and make sure that these lines at the top are uncommented:
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
After uncommenting those lines, restart Postfix with "/etc/init.d/postfix restart", and you should be good to go.
Submitted by quigongren on Sun, 09/20/2009 - 22:42 Comment #6
Thanks. I will try this and post my results.
I don't know if this adds anything but I just attempted to send an email using usermin, it never went through, and I got this returned email message:
Does this shed any light? Thanks,
Carl
Submitted by quigongren on Sun, 09/20/2009 - 23:27 Comment #7
OK. Not sure what my Outlook settings should look like at this point. What port am I using? I've opened up 465 and 587 on firewall. Do I need to also open on CentOS firewall?
Also, I've made the changes and restarted postfix. Tried connecting again from Outlook multiple times with different settings but no go. Opy of the last few entries in log follow:
Sep 21 00:11:51 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:11:51 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:12:16 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:12:16 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:12:31 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:12:31 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:12:37 host1 postfix/smtpd[26105]: connect from acesso03.brbyte.net.br[187.5.94.226] Sep 21 00:12:38 host1 postfix/smtpd[26105]: lost connection after CONNECT from acesso03.brbyte.net.br[187.5.94.226] Sep 21 00:12:38 host1 postfix/smtpd[26105]: disconnect from acesso03.brbyte.net.br[187.5.94.226] Sep 21 00:12:50 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:12:50 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:13:31 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:13:31 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:14:47 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:14:47 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:15:41 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:15:42 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:15:58 host1 postfix/anvil[26107]: statistics: max connection rate 1/60s for (smtp:187.5.94.226) at Sep 21 00:12:37 Sep 21 00:15:58 host1 postfix/anvil[26107]: statistics: max connection count 1 for (smtp:187.5.94.226) at Sep 21 00:12:37 Sep 21 00:15:58 host1 postfix/anvil[26107]: statistics: max cache size 1 at Sep 21 00:12:37 Sep 21 00:16:07 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:16:07 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:20:34 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:20:34 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:20:50 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:20:50 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:21:03 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:21:03 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Sep 21 00:21:24 host1 dovecot: pop3-login: Login: user=<cgren.technology2reality>, method=PLAIN, rip=::ffff:76.108.162.29, lip=::ffff:10.100.199.11 Sep 21 00:21:24 host1 dovecot: POP3(cgren.technology2reality): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Submitted by andreychek on Mon, 09/21/2009 - 12:48 Comment #8
Not sure what my Outlook settings should look like at this point
You'd configure Outlook to use port 465 or 587 for Outgoing SMTP, and check the "Use SSL" box.
If you setup Postfix to listen on those ports, it sounds like you've done everything else you need to on the server side, unless you also have a firewall setup on the server itself (which is not the default).
Submitted by quigongren on Mon, 09/21/2009 - 19:20 Comment #9
OK. Now we're cookin'!
I did have the firewall enabled - but this was not preventing anything. I went ahead and disabled it as I like standards :)
I looked up the directions to have Postfix listen on another port (587) - I added and excluded some additional parameters to the /etc/postfix/master.cf file shown below and voila, I can now send.
Parameters changed: Disabled smtpd on port 25: Excluded: #smtp inet n - n - - smtpd Added: 25000 inet n - n - - smtpd service postfix restart and all is now well.
Thanks so much for your help!!
Parameters changed: Disabled smtpd on port 25: Excluded: #smtp inet n - n - - smtpd Added: 25000 inet n - n - - smtpd service postfix restart and all is now well.
Whoah! Hold on! You can't kill port 25! That's how other mail servers send you mail. ;-)
You want to enable the other ports, so that your email client can get past ISP firewalls...but you want port 25 open so that mail servers out there on the wild wild Internet can send you stuff.
Submitted by quigongren on Thu, 09/24/2009 - 00:14 Comment #11
Whoops. Got it. Dumb.
Submitted by quigongren on Sat, 10/03/2009 - 09:37 Comment #12