Need help! Mail server won't send out mail

30 posts / 0 new
Last post
#1 Mon, 09/22/2008 - 16:02
wheelmanky

Need help! Mail server won't send out mail

I have installed Virtualmin GPL on CentOS 5.1 using the install script. Everything is running good except mail. I can receive email, but it won't send email. When I look in the queue the reason given was connection timed out or blocked by isp. I tried changing it to relay by my isp and that didn't work either. I am using the free account at dyndns.com as my dynamic domain and dns. I can manage my way around linux a little, and this is my first time using virtualmin. Can anyone give me some help?

Tue, 09/23/2008 - 05:30
andreychek

Hello,

After you changed your server to relay through your ISP, did new emails go out through it, even if emails already in the queue did not?

While some ISP's do block port 25, you should definitely be able to relay email through your provider.

It's possible your provider requires authentication.

When you setup your system to relay through your ISP, do you see any errors in the logfile, /var/log/maillog ?
-Eric

Tue, 09/23/2008 - 07:08 (Reply to #2)
wheelmanky

I changed the relayhost to my isp and I don't think they require authentication. Still wouldn't send out email. I checked the logs, I'm just getting connection timed out (port 25).

I read somewhere it's because I am running a dynamic ip address and dynamic dns service and the servers from ATT, Yahoo, Gmail are detecting that. Could that be the problem?

Tue, 09/23/2008 - 08:26 (Reply to #3)
andreychek

Well, having a dynamic address is why a 3rd party site (Yahoo, Google, etc) may reject emails, had you emailed them directly.

But, it should absolutely work to relay mails through your ISP (otherwise, no home user would ever be able to send email to Gmail).

If you're getting a connection timed out message trying to relay through them, my first suspicion would be that it's the incorrect address to use for SMTP -- perhaps there's another SMTP server address?
-Eric

Tue, 09/23/2008 - 17:21 (Reply to #4)
wheelmanky

I used the same smtp address that my mail client is setup with for my isp email. That is mail.bellsouth.net. I have tried sending email out to addresses at gmail, yahoo, and bellsouth, the ones that are sent to gmail and yahoo addresses are timed out and the ones sent to bellsouth address is block. I have tried all that I know to do. The free dns from dyndns.com doesn't provide MX records, would that be the problem? It just allows A records, the A record allows me to receive email, serve http and ftp.

Tue, 09/23/2008 - 18:07 (Reply to #5)
wheelmanky

<b>andreychek wrote:</b>
<div class='quote'>Hello,

After you changed your server to relay through your ISP, did new emails go out through it, even if emails already in the queue did not?

While some ISP's do block port 25, you should definitely be able to relay email through your provider.

It's possible your provider requires authentication.

When you setup your system to relay through your ISP, do you see any errors in the logfile, /var/log/maillog ?
-Eric</div>

i event set relayhost to my isp and enabled smtp_auth, the error i get in the queue says connection timed out.

Tue, 09/23/2008 - 18:38 (Reply to #6)
andreychek

Can you describe your network layout where your server is located? Also, where does your desktop sit?

I'd like to hear about firewalls, routers, dmz's, and similar goodies :-)

Also, what all did you have to setup in order to connect your desktop client to the SMTP server? Can you verify that it's connecting to port 25, and not using authentication or SSL?
-Eric

Wed, 09/24/2008 - 12:39 (Reply to #7)
wheelmanky

I have a linksys router and the server is connected to it through ethernet cable and the router has a DMZ open to the server. The router also has a built in update client that pushes my current ip to dyndns.com. Dyndns.com is providing A record, not a MX record. I have tried the desktops and laptop on my network and the virtualmin webmail for trying to send out mail through my server.

Does that seems to be the info you are looking for?

Wed, 09/24/2008 - 15:09 (Reply to #8)
andreychek

Okay.

So, before we get too far, your linksys router -- is connected to your Bellsouth provider?

If so, if you log onto your server, if you type:

telnet mail.bellsouth.net 25

Do you get some sort of SMTP banner, or does it just hang?
-Eric

Wed, 09/24/2008 - 16:49 (Reply to #9)
wheelmanky

it sits there at

Connected to mail.bellsouth.net (207.115.11.17).
Escape character is '^]'.
220 isp.att.net - Maillennium ESMTP/MULTIBOX frfwmhc03 #192

and doesn't do anything else.

Wed, 09/24/2008 - 16:54 (Reply to #10)
andreychek

Okay. That all looks good.

What does this command output:

grep relayhost /etc/postfix/main.cf

Thu, 09/25/2008 - 18:11 (Reply to #11)
wheelmanky

# The relayhost parameter specifies the default host to send mail to
# no relayhost is given, mail is routed directly to the destination.
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = smtp.gmail.com

Thu, 09/25/2008 - 18:20 (Reply to #12)
andreychek

Well, it doesn't look like you have a relayhost in there. That's what Postfix uses in order to relay mail through your ISP.

Try editing /etc/postfix/main.cf, and add the line:

relayhost mail.bellsouth.net

And then restart Postfix:

/etc/init.d/postfix restart

Sun, 07/31/2011 - 13:50 (Reply to #13)
melissiagoodwin

i'm new to networking field, i want to buy a router and can't really make a choice, I read an article but it doesn't cover all categories. looking for some help Mellissia

Sun, 07/31/2011 - 14:20 (Reply to #14)
andreychek

Howdy,

Well, there's lots of folks here with a variety of networking experience. Hopefully they'll chime in with some input!

My suggestion would be to start a new forum thread, and in that thread, describe the setup you're hoping to build there.

A few things you may want to go over --

  • What sort of Internet connection do you have?

  • How many pubilc IP addresses are you looking to use?

  • How many servers will be behind this router?

  • What all are you looking to use the router for?

If there's any other information you can offer about your setup, that would be helpful as well!

But if you could put all that into a new forum post, that would be great... and it would also be likely to attract the most responses :-)

Thanks!

-Eric

Fri, 09/26/2008 - 12:22 (Reply to #15)
wheelmanky

i have do that. still no luck. i have the firewall in centos turned off. i can not think of anything else.

Fri, 09/26/2008 - 12:35 (Reply to #16)
Joe
Joe's picture

Whats' in the maillog when you try to send?

--

Check out the forum guidelines!

Fri, 09/26/2008 - 17:14 (Reply to #17)
wheelmanky

here is some towards the end:

Sep 23 04:46:32 server1 postfix/smtp[24431]: connect to a.mx.mail.yahoo.com[209.191.118.103]: Connection timed out (port 25)
Sep 23 04:47:02 server1 postfix/smtp[24431]: connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out (port 25)
Sep 23 04:47:32 server1 postfix/smtp[24431]: connect to f.mx.mail.yahoo.com[209.191.88.247]: Connection timed out (port 25)
Sep 23 04:48:02 server1 postfix/smtp[24431]: connect to c.mx.mail.yahoo.com[216.39.53.2]: Connection timed out (port 25)
Sep 23 04:48:32 server1 postfix/smtp[24431]: connect to b.mx.mail.yahoo.com[66.196.97.250]: Connection timed out (port 25)
Sep 23 04:48:32 server1 postfix/smtp[24431]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=22267, delays=22117/0.16/150/0, dsn=4.4.1, status=deferred (connect to b.mx.mail.yahoo.com[66.196.97.250]: Connection timed out)
Sep 23 06:09:21 server1 postfix/qmgr[8651]: 36C8E6015B: from=&lt;jim@wheelmanky.podzone.net&gt;, size=1504, nrcpt=1 (queue active)
Sep 23 06:09:51 server1 postfix/smtp[25820]: connect to g.mx.mail.yahoo.com[209.191.88.239]: Connection timed out (port 25)
Sep 23 06:10:21 server1 postfix/smtp[25820]: connect to c.mx.mail.yahoo.com[216.39.53.2]: Connection timed out (port 25)
Sep 23 06:10:51 server1 postfix/smtp[25820]: connect to c.mx.mail.yahoo.com[216.39.53.3]: Connection timed out (port 25)
Sep 23 06:11:21 server1 postfix/smtp[25820]: connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out (port 25)
Sep 23 06:11:51 server1 postfix/smtp[25820]: connect to a.mx.mail.yahoo.com[209.191.118.103]: Connection timed out (port 25)
Sep 23 06:11:51 server1 postfix/smtp[25820]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=27266, delays=27116/0.02/150/0, dsn=4.4.1, status=deferred (connect to a.mx.mail.yahoo.com[209.191.118.103]: Connection timed out)
Sep 23 07:32:41 server1 postfix/qmgr[8651]: 36C8E6015B: from=&lt;jim@wheelmanky.podzone.net&gt;, size=1504, nrcpt=1 (queue active)
Sep 23 07:33:12 server1 postfix/smtp[27238]: connect to d.mx.mail.yahoo.com[66.196.82.7]: Connection timed out (port 25)
Sep 23 07:33:42 server1 postfix/smtp[27238]: connect to c.mx.mail.yahoo.com[216.39.53.3]: Connection timed out (port 25)
Sep 23 07:34:12 server1 postfix/smtp[27238]: connect to c.mx.mail.yahoo.com[216.39.53.2]: Connection timed out (port 25)
Sep 23 07:34:42 server1 postfix/smtp[27238]: connect to a.mx.mail.yahoo.com[209.191.118.103]: Connection timed out (port 25)
Sep 23 07:35:12 server1 postfix/smtp[27238]: connect to g.mx.mail.yahoo.com[209.191.88.239]: Connection timed out (port 25)
Sep 23 07:35:12 server1 postfix/smtp[27238]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=32267, delays=32117/0.02/150/0, dsn=4.4.1, status=deferred (connect to g.mx.mail.yahoo.com[209.191.88.239]: Connection timed out)
Sep 23 08:56:01 server1 postfix/qmgr[8651]: 36C8E6015B: from=&lt;jim@wheelmanky.podzone.net&gt;, size=1504, nrcpt=1 (queue active)
Sep 23 08:56:31 server1 postfix/smtp[28582]: connect to b.mx.mail.yahoo.com[66.196.97.250]: Connection timed out (port 25)
Sep 23 08:57:01 server1 postfix/smtp[28582]: connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out (port 25)
Sep 23 08:57:31 server1 postfix/smtp[28582]: connect to f.mx.mail.yahoo.com[209.191.88.247]: Connection timed out (port 25)
Sep 23 08:58:01 server1 postfix/smtp[28582]: connect to g.mx.mail.yahoo.com[209.191.88.239]: Connection timed out (port 25)
Sep 23 08:58:31 server1 postfix/smtp[28582]: connect to g.mx.mail.yahoo.com[206.190.53.191]: Connection timed out (port 25)
Sep 23 08:58:31 server1 postfix/smtp[28582]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=37266, delays=37116/0.02/150/0, dsn=4.4.1, status=deferred (connect to g.mx.mail.yahoo.com[206.190.53.191]: Connection timed out)
Sep 23 10:13:40 server1 postfix/sendmail[30041]: fatal: usage: sendmail [options]
Sep 23 10:19:21 server1 postfix/qmgr[8651]: 36C8E6015B: from=&lt;jim@wheelmanky.podzone.net&gt;, size=1504, nrcpt=1 (queue active)
Sep 23 10:19:51 server1 postfix/smtp[30151]: connect to b.mx.mail.yahoo.com[66.196.97.250]: Connection timed out (port 25)
Sep 23 10:20:21 server1 postfix/smtp[30151]: connect to f.mx.mail.yahoo.com[209.191.88.247]: Connection timed out (port 25)
Sep 23 10:20:51 server1 postfix/smtp[30151]: connect to f.mx.mail.yahoo.com[68.142.202.247]: Connection timed out (port 25)
Sep 23 10:21:21 server1 postfix/smtp[30151]: connect to d.mx.mail.yahoo.com[66.196.82.7]: Connection timed out (port 25)
Sep 23 10:21:51 server1 postfix/smtp[30151]: connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out (port 25)
Sep 23 10:21:51 server1 postfix/smtp[30151]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=42267, delays=42117/0.02/150/0, dsn=4.4.1, status=deferred (connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out)
Sep 23 10:33:28 server1 dovecot: imap-login: Login: user=&lt;wheelmanky&gt;, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Sep 23 10:33:29 server1 last message repeated 5 times
Sep 23 10:33:30 server1 dovecot: IMAP(wheelmanky): Connection closed
Sep 23 10:33:31 server1 last message repeated 5 times
Sep 23 11:42:41 server1 postfix/qmgr[8651]: 36C8E6015B: from=&lt;jim@wheelmanky.podzone.net&gt;, size=1504, nrcpt=1 (queue active)
Sep 23 11:43:12 server1 postfix/smtp[31612]: connect to c.mx.mail.yahoo.com[216.39.53.2]: Connection timed out (port 25)
Sep 23 11:43:42 server1 postfix/smtp[31612]: connect to f.mx.mail.yahoo.com[68.142.202.247]: Connection timed out (port 25)
Sep 23 11:44:12 server1 postfix/smtp[31612]: connect to b.mx.mail.yahoo.com[66.196.97.250]: Connection timed out (port 25)
Sep 23 11:44:42 server1 postfix/smtp[31612]: connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out (port 25)
Sep 23 11:45:12 server1 postfix/smtp[31612]: connect to c.mx.mail.yahoo.com[216.39.53.3]: Connection timed out (port 25)
Sep 23 11:45:12 server1 postfix/smtp[31612]: 36C8E6015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=47267, delays=47117/0.02/150/0, dsn=4.4.1, status=deferred (connect to c.mx.mail.yahoo.com[216.39.53.3]: Connection timed out)

Fri, 09/26/2008 - 17:36 (Reply to #18)
andreychek

See, you shouldn't be seeing those attempts to connect to Yahoo if the relayhost is setup/working. Postfix should only ever be talking to your ISP.

Can you post your actual config file, /etc/postfix/main.cf? Something doesn't seem quite right.

Thanks,
-Eric

Fri, 09/26/2008 - 18:25 (Reply to #19)
wheelmanky

my relayhost is set at the very end of the file [file name=main.txt size=27824]http://www.virtualmin.com/components/com_fireboard/uploaded/files/main.t...

Fri, 09/26/2008 - 19:07 (Reply to #20)
andreychek

Okay, and just to verify, you did restart Postfix after adding that line?

Sat, 09/27/2008 - 03:21 (Reply to #21)
wheelmanky

yes, everytime i made a change, i would restart it

Sun, 09/28/2008 - 07:54 (Reply to #22)
andreychek

Interesting :-)

How about this -- what does this command show:

postconf -n

That should tell us if Postfix is seeing the relayhost line you have in there.
-Eric

Mon, 09/29/2008 - 10:53 (Reply to #23)
wheelmanky

Yes it sees the relayhost. I wondered if its because bellsouth blocks port 25, but that shouldn't matter since we are trying to use their server. Right?

Mon, 09/29/2008 - 15:02 (Reply to #24)
wheelmanky

No I am getting No Route Host Found error message, the mail is still not being delivered. My relayhost is set to mail.bellsouth.net

Here here the latest of my maillog:

Sep 29 19:57:07 server1 postfix/postsuper[23685]: BE1D66015B: removed
ep 29 19:39:08 server1 postfix/smtp[23006]: connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host (port 25)
Sep 29 19:39:08 server1 postfix/smtp[23009]: connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host (port 25)
Sep 29 19:39:08 server1 postfix/smtp[23009]: AD4B160176: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=103437, delays=103398/0.04/39/0, dsn=4.4.1, status=deferred (connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host)
Sep 29 19:39:08 server1 postfix/smtp[23006]: 5717C60172: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=174297, delays=174258/0.03/39/0, dsn=4.4.1, status=deferred (connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host)
Sep 29 19:39:20 server1 postfix/smtp[23010]: connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host (port 25)
Sep 29 19:39:20 server1 postfix/smtp[23010]: F2C166014E: to=&lt;jweswarner@bellsouth.net&gt;, relay=none, delay=1851, delays=1800/0.05/51/0, dsn=4.4.1, status=deferred (connect to mx01.mail.bellsouth.net[205.152.58.33]: No route to host)
Sep 29 19:39:28 server1 postfix/smtp[23007]: connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out (port 25)
Sep 29 19:39:28 server1 postfix/smtp[23008]: connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out (port 25)
Sep 29 19:39:28 server1 postfix/smtp[23007]: E790E60173: to=&lt;jwarner@btadd.com&gt;, relay=none, delay=269557, delays=269497/0.02/60/0, dsn=4.4.1, status=deferred (connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out)
Sep 29 19:39:28 server1 postfix/smtp[23008]: 7858060174: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=171410, delays=171350/0.04/60/0, dsn=4.4.1, status=deferred (connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out)
Sep 29 19:39:28 server1 postfix/qmgr[22997]: 0366D6017A: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=73165, delays=73105/60/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out)
Sep 29 19:39:28 server1 postfix/qmgr[22997]: BE1D66015B: to=&lt;jweswarner@yahoo.com&gt;, relay=none, delay=333226, delays=333166/60/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mx00.mail.bellsouth.net[205.152.58.32]: Connection timed out)

Tue, 09/30/2008 - 08:24 (Reply to #25)
andreychek

Ahh! Isn't that odd.

So from that same server, you can telnet to mail.bellsouth.net on port 25, and you get the banner message you had posted previously.

But, when relaying email from Postfix to mail.bellsouth.net, you get all those timeout messages?

What happens if you use the IP address &quot;207.115.11.17&quot; rather than the name &quot;mail.bellsouth.net&quot; on the relayhost line in your main.cf?
-Eric

Tue, 09/30/2008 - 18:37 (Reply to #26)
wheelmanky

that ip address works great, it actually works.........what server is it, and why does it work?

Tue, 09/30/2008 - 19:21 (Reply to #27)
andreychek

Well, that's just one of the IP addresses associated with &quot;mail.bellsouth.net&quot;.

It looks when using a relayhost, Postfix sends email to the MX address for the relayhost, not the A record (which I find non-intuitive, but I digress).

In your case, the address associated with the MX record, mx00.mail.bellsouth.net / 205.152.58.32, isn't accepting emails from you.

So to get around that, I ran:

host mail.bellsouth.net
mail.bellsouth.net has address 207.115.11.17
mail.bellsouth.net has address 204.127.217.17

And just picked one of those IP's.

Have a good one,
-Eric

Fri, 05/06/2011 - 11:11 (Reply to #28)
Ned

Hello, I have the same problem.

For 9 mounts everything was super. But now I can receive emails, but it can't send some emails. When I look in the queue the reason given was connection timed out:

"connect to mx1.mail.cnh.yahoo.com[203.209.228.250]:25: Connection timed out".

I try to find the relayhost line in my main.cf. But I cant. Please can you explain more detailed what to do?

Fri, 05/06/2011 - 12:26 (Reply to #29)
andreychek

Howdy,

Well, it's unusual to see an ISP blocking some port 25 connections, and not all of them... but I suppose that's possible :-)

However, you could certainly setup a relayhost, and see if that solves the problem.

There wouldn't necessarily be a relayhost line in your Postfix config already, you may need to manually add one.

The exact parameter is described here:

http://www.postfix.org/postconf.5.html#relayhost

You'd need to obtain your ISP's mail server address, and add that to the relayhost field.

-Eric

Topic locked