Sendmail won't send/receive email???

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
I can't figure out why but my sendmail email server won't send/receive emails anymore. It worked just a couple of days ago but doesn't now. Funny thing is I don't remember doing anything to it.

Here's what I get from the returned/unreceived messages:
The e-mail system was unable to deliver the message, but did not
report a specific reason. Check the address and try again. If it still
fails, contact your system administrator


Here's what I'm getting when I try to send email.
The connection to the server has failed. Account: 'xxxx@xxxx.net', Server: 'mail.xxxx.net', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10061, Error Number: 0x800CCC0E

I know that there's not a problem with my router...but it does seem that port 25 isn't open anymore when I scan my ports. WTF???

I've looked at /var/log/maillog and it says nothing important. I've lso looked at sendmail.mc and .cf, and all the other files in /etc/mail....they haven't changed.

I have no idea what to do.

 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
first thing is first...establish of port 25 is open or not from outside the router and then local to the mailserver

'telnet mail.xxx.net 25" from a pc behind (on the lan local to the mailserver). If you can't connect, make sure that all the services are running and that you didn't accidentally start ipchains or iptables. Also try 'telnet localhost 25' on the pc that runs the mailserver. that will at least tell you if sendmail is running on localhost.

if you CAN connect from a PC on the LAN side, but not the WAN side then u have a router problem.

Make sure that you're .cf file is edited properly to allow sendmail to listen on eth0 and not just localhost.

Are you using SSL on this mail server? Is your client configured correctly?
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
check your sendmail.mc file and look for this:

Correct:
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')


Incorrect:
if it looks like this (note that the dnl is not on the last line) then sendmail is not listening on anything except localhost any longer. Make the above change and rebuild the .cf file with m4:

dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
thx for the info. I'll check those out, I'm at class right now, but I'll be sure to post back when I'm done. ^_^
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
okay yeah for whatever reason that DAEMON_OPTIONS wasn't "dnl'ed". So I fixed it and now it's listening on port 25 and I can send email...thx! ^_^

However, I still don't seem to be receiving email from the outside world....any clues?

I'm not using SSL and I see nothing about "eth0" in the sendmail.cf file...but then I wasn't sure where to look (maybe you meant .mc and the whoel dnl daemon_options thing?).

Again, thx for the help! :)
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
so your mail server is not accepting mail from outside the LAN? can you telnet to port 25 from outside the lan? whats the bounce message the email sender is getting when trying to send mail to your server?

can you send mail to the server from the LAN?
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
Originally posted by: Need4Speed
so your mail server is not accepting mail from outside the LAN? can you telnet to port 25 from outside the lan? whats the bounce message the email sender is getting when trying to send mail to your server?

can you send mail to the server from the LAN?

Yeah, I can telnet port 25 now since I commented out that loopback daemon_option. It's not accepting mail at all from anyone outside localhost. I can send/accept email from myself to myself just fine (from mail.xxx.net to mail.xxx.net) But not, for example, from a yahoo account to mail.xxx.net. However, I can telnet port 25 from outside the LAN...so the port is listening and the router is working. Unless of course that's not the port sendmail listens for mail on (for that matter I can telnet pop: 110 and imap: 143 outside the LAN as well). I did regenerate my sendmail.cf file as well (just as I'm told to at the top of the .mc file).

to re-iterate the current status:
- can send send mail via smtp (on mail.xxx.net) from anywhere now...good that's fixed
- cannot accept email from anyone outside localhost (mail.xxx.net)
- can telnet all email ports (25, 110, 143) from outside LAN

what does the maillog say about the bounced emails?

There's no mention of emails being bounced....just a whole bunch of logout stuff from me trying to check email.

thx again! ^_^
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
Strange....are you sure that sendmail is the one answering the telnet requests from outside the lan? Is it possible that the router is forwarding the ports to the wrong machine?

The reason I say that is this: If the ports are open and sendmail is indeed listening to them, there should be some bounce message in the maillog as to why it will not accept messages from outside the router. No bounce message generally means that its not listening or that not everyone has permission to use send mail (see #3 below)

Some other things you can check:
1. You didn't mention what distro you are running, but check your your access file (usually /etc/mail/access). It should have something in there about relaying similiar to this:
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
x.x.x.* RELAY

This relays mail for localhost and the entire LAN on x.x.x.* (where x is ip range)

2. make sure that all your local host names for the mail server are defined in /etc/mail/local-host-names
3. make sure that you are allowing the sendmail service to be used by everyone in /etc/hosts.allow. it should have something like this: 'sendmail : ALL'

That's about all I can think of. I'm guessing it's #3 that is cauising your problem.

Oce final bit of advice...If you are going to run a service as complicated as Sendmail, you may want to invest in an O'Reilly book and catch up on some reading. It will at least give you a place to start when you have problems.

-P
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,164
515
126
Just thought I would post to make sure your IP address (or ISP's address block) is not being blacklisted in one of the many email blacklists like MAPS. If you are blacklisted make sure that your sendmail server is not configured to use FEATURE('dnsbl') otherwise you are just blocking yourself :)

Look here to see:
Mail Abuse Prevention System (i.e. MAPS or Realtime Blackhole List)
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
Originally posted by: Need4Speed
Strange....are you sure that sendmail is the one answering the telnet requests from outside the lan? Is it possible that the router is forwarding the ports to the wrong machine?

The reason I say that is this: If the ports are open and sendmail is indeed listening to them, there should be some bounce message in the maillog as to why it will not accept messages from outside the router. No bounce message generally means that its not listening or that not everyone has permission to use send mail (see #3 below)

Some other things you can check:
1. You didn't mention what distro you are running, but check your your access file (usually /etc/mail/access). It should have something in there about relaying similiar to this:
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
x.x.x.* RELAY

This relays mail for localhost and the entire LAN on x.x.x.* (where x is ip range)

2. make sure that all your local host names for the mail server are defined in /etc/mail/local-host-names
3. make sure that you are allowing the sendmail service to be used by everyone in /etc/hosts.allow. it should have something like this: 'sendmail : ALL'

That's about all I can think of. I'm guessing it's #3 that is cauising your problem.

Oce final bit of advice...If you are going to run a service as complicated as Sendmail, you may want to invest in an O'Reilly book and catch up on some reading. It will at least give you a place to start when you have problems.

-P

Hmmmm....this is discouraging. I've verified everything in your list there, and made sure it was the right machine listening from outside the LAN (it tells me sendmail on mail.xxxx.net). I originally had nothing in either hosts.deny or hosts.allow. I left hosts.deny as it is and put ALL: ALL (just to be sure) in hosts.allow. Perhaps I'm looking for the wrong thing, or in the wrong place for the maillog. I'm using redhat 7.3 (sorry I didn't mention this earlier) and am looking for any pattern matching "bounce" in /var/log/maillog....as it stands there's nothing like that.

Just thought I would post to make sure your IP address (or ISP's address block) is not being blacklisted in one of the many email blacklists like MAPS. If you are blacklisted make sure that your sendmail server is not configured to use FEATURE('dnsbl') otherwise you are just blocking yourself

Yeah just checked that to make sure and I'm neither using the feature nor am I in that list.

Thx again fellas. (I really mean it) I just don't understand when/how/where/why my sendmail config which was working just 3 days ago would have suddenly changed and stopped. I wonder if up2date updated the sendmail package recently or something....but I don't see why that would have affected it in such a way. hmmmmmm. Maybe completely remove everything that has to do with sendmail including all configs and whatnot and trying to start over? (or trying postifx or qmail if that doesn't work?) :-/

 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
also give me as much info about the lan as you can...hostname and ip's etc and i will take a look when i get some free time tonight
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
I don't see your email in your profile (and I don't want to assume that the email from your "My Web Page" link is yours...just in case. ;) ).

Anyway, the host is bclx.net or mail.bclx.net, router ip=68.112.193.180

There are 8 machines behind a linksys router and a 16-port switch, with ips ranging from 192.168.100 to .107
The server is 192.168.1.101 and ports 21, 22, 25, 80, 110, 143, 8000-8001 are forwarded to it (both TCP and UDP).

All the ports can be scanned and respond correctly with something like SuperScan and/or Telnet.
I'll get you the maillog as soon as I see your email.

Are you getting beligerant (sp?) and determined to solve this? ;) I know I am.
Thx again for your help. What a great community this is! :D

 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
I sent the maillog.

I'll be sure to try pinging and telneting from a friend's computer later today. My ISP was doing maintainence late last night and this morning so it's possible they weren't finished at that time.