LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to send email from Sendmail (https://www.linuxquestions.org/questions/linux-software-2/unable-to-send-email-from-sendmail-454440/)

rridler 06-13-2006 02:34 PM

Unable to send email from Sendmail
 
I am using Sendmail 8.13.6 on an FC4 machine. I can receive mail, but I am not able to send. Any ideas of what can be causing this and a fix for it?

jeelliso 06-13-2006 02:39 PM

It could be one of a million things. Post the contents of your sendmail.mc file (please remove the dnl commented lines so it won't be so long). I'd be happy to take a look at it.

~Justin

rridler 06-14-2006 11:45 AM

divert(-1)dnl

include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl

define(`confDEF_USER_ID',``8:12'')dnl

define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl

define(`confTO_IDENT', `0')dnl

FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl

FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl

DAEMON_OPTIONS(`Port=smtp,Addr=my.homedns.org, Name=MTA')dnl

FEATURE(`accept_unresolvable_domains')dnl

LOCAL_DOMAIN(`localhost.localdomain')dnl

MAILER(smtp)dnl
MAILER(procmail)dnl

pdeman2 06-14-2006 11:49 AM

I'm not familiar with sendmail, but a couple other things to consider, if it is not your configuration, check your firewall and ISP. Your firewall, or your ISP might be blocking the required ports without you knowing it. This is a common practice for ISPs. Also, make sure DNS is working properly. Sendmail needs to be able to resolve the domains to send the mail.

jeelliso 06-14-2006 12:00 PM

It looks like you've used the exact default sendmail.mc file except you changed Addr=127.0.0.1 to Addr=my.homedns.org. Try changing this part back to the default. I reverted mine to the default and it worked. Now take a look at /var/log/maillog after you try to send a message. Try
Code:

tail /var/logmaillog
to see the end of the file. If you're getting some kind of error similar to this:
Code:

dsn=5.6.0, stat=Data format error
here is the fix that worked for me.

In /etc/mail/sendmail.cf there is a section that reads
Code:

# my official domain name
# … define this only if Sendmail cannot automatically determine your domain
Dj$w.foo.COM

by default. The last line should be changed to
Code:

Dj{myDomain}
where {myDomain} is the qualified domain name of the machine.

If this doesn't work, then we'll try something else.

Good Luck,
~Justin

rridler 06-15-2006 09:34 AM

this is what I get when I run tail /var/maillog
dsn=4.0.0, stat=Deferred: mail2.pomeroy.com.: No route to host

jeelliso 06-15-2006 01:00 PM

Sorry, but could you post the entire messge starting with the date. Here was my error message, for example:
Code:

Jun  1 16:03:25 mailman sendmail[17394]: k51K3Po9017392: to=<jeellison@tva.gov>, ctladdr=<nobody@localhost.localdomain> (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=122110, relay=marvin.cha.tva.gov. [152.85.50.106], dsn=5.6.0, stat=Data format error
The key part of your error is "dsn=4.0.0" The dsn error code refers to RFC 1893. This code corresponds to a "Persistent Transient Failure." This could mean a lot of different things, so post the rest of your error and I'll try to troubleshoot some more.

Just remember to be patient with Sendmail and it will be good to you in the future.

~Justin

rridler 06-15-2006 01:13 PM

Jun 15 13:46:40 sendmail[2890]: k5FHkODr002888: to=<*@pomeroy.com>, ctladdr=<*@*.HomeDNS.org> (500/0), delay=00:00:15, xdelay=00:00:15, mailer=esmtp, pri=120521, relay=mail2.pomeroy.com. [216.68.84.101], dsn=4.0.0, stat=Deferred: mail2.pomeroy.com.: No route to host

jeelliso 06-15-2006 01:26 PM

I looks like you've got Sendmail set up correctly. Since your dsn error is not a 5.x.x error, then the error is not permenant. The "No route to host" means exactly what it sounds like; it can't access the remote location, which is in this case mail2.pomeroy.com. Make sure your computer (i.e. firewall, router) are correctly configured for port 25, which Sendmail uses to send mail. You need port 25 open and that port also needs to be forwarded to your PC if you're behind a router.

An easy way to see if your Sendmail connection is working is to
Code:

telnet 127.0.0.1 25
If it lets you connect then you're probably configured correctly. If you get an error that says
Code:

Unable to connect to remote host:  Connection refused
this means that the remote host you are trying to connect to does not receive connections. I tested mail2.pomeroy.com and received this error. Try sending mail to me: jeelliso@gmail.com and see if it will work.

~Justin

rridler 06-15-2006 01:51 PM

Jun 15 14:41:24 Ridler sendmail[3258]: k5FIfObr003258: to=*@fuse.net,*@gmail.com, ctladdr=*@Ridler.HomeDNS.org (500/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=60536, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k5FIfO3w003260 Message accepted for delivery)
Jun 15 14:41:39 Ridler sendmail[3262]: k5FIfO3w003260: to=<*@fuse.net>, ctladdr=<*@Ridler.HomeDNS.org> (500/0), delay=00:00:15, xdelay=00:00:15, mailer=esmtp, pri=150712, relay=mx1.fuse.net. [216.68.8.211], dsn=4.0.0, stat=Deferred: mx1.fuse.net.: No route to host
Jun 15 14:42:28 Ridler sendmail[3262]: k5FIfO3w003260: to=<*@gmail.com>, ctladdr=<*@Ridler.HomeDNS.org> (500/0), delay=00:01:04, xdelay=00:00:49, mailer=esmtp, pri=150712, relay=gsmtp163.google.com. [64.233.163.27], dsn=4.0.0, stat=Deferred: gsmtp163.google.com.: No route to host
Jun 15 14:46:23 Ridler sendmail[3234]: k5FIcw46003234: *.HomeDNS.org [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

jeelliso 06-15-2006 02:00 PM

So can you or can you not telnet to your local host on port 25?

rridler 06-15-2006 02:03 PM

I can telnet to my localhost

jeelliso 06-15-2006 02:07 PM

The only thing I *think* it could be is some kind of problem with your network; are you behind a router or some other wierd configuration?

What client are you using to try to send the email? If you're not using "mail" then try that.

If you've tried to send a bunch of messages that have failed, you might want to clean out your mqueue (/var/spool/mqueue) so all those back messages don't get send WHEN you get sendmail working.

~Justin

rridler 06-15-2006 02:13 PM

This machine is my router/firewall, it is connected directly to my broadband modem, everything else is behind it.
I am using Webmin for sending the messages, and I keep the mqueue clear.

jeelliso 06-15-2006 02:26 PM

I'm all out sane of ideas except blaming it on your ISP. Who is your internet provider? If you can receive mail, but cannot send it, pdeman2 may have been right when he said your ISP may be blocking certain ports coming out of your machine. Try
Code:

traceroute -p 25 googe.com
and post your results. Sorry I was not able to help much more than I am. Just when you think you understand sendmail, it gets the best of you.

~Justin

rridler 06-15-2006 02:29 PM

traceroute -p 25 googe.com
traceroute to googe.com (68.178.232.99), 30 hops max, 38 byte packets
1 FL-ESR1-216-196-160-1.fuse.net (216.196.160.1) 9.477 ms 5.610 ms 5.882 ms
2 ws-osr1-g3-1.10.zoomtown.com (216.68.212.2) 6.645 ms 6.279 ms 6.587 ms
MPLS Label=432 CoS=0 TTL=1 S=1
3 sw2-g3-15.core.fuse.net (216.68.212.7) 5.768 ms 5.843 ms 6.135 ms
4 core4-g2-0.core.fuse.net (216.68.7.16) 5.926 ms 5.506 ms 6.135 ms
5 ge-5-1.hsa2.Cincinnati1.Level3.net (4.78.218.9) 12.588 ms 12.691 ms 12.683 ms
6 so-5-0-0.mp1.Cincinnati1.Level3.net (4.68.124.241) 12.748 ms 12.633 ms 12.263 ms
7 ae-0-0.bbr1.Chicago1.Level3.net (64.159.1.33) 22.648 ms so-2-0-1.bbr2.Chicago1.Level3.net (64.159.0.162) 12.578 ms ae-0-0.bbr1.Chicago1.Level3.net (64.159.1.33) 13.143 ms
8 ae-24-52.car4.Chicago1.Level3.net (4.68.101.40) 12.653 ms ae-14-53.car4.Chicago1.Level3.net (4.68.101.72) 12.358 ms ae-24-52.car4.Chicago1.Level3.net (4.68.101.40) 12.891 ms
9 att-level3-oc48.Chicago1.Level3.net (4.68.127.166) 31.384 ms att-level3-oc48.Chicago1.Level3.net (209.0.227.78) 32.566 ms 32.876 ms
10 tbr2-p012201.cgcil.ip.att.net (12.123.6.38) 53.091 ms 54.214 ms 54.570 ms
MPLS Label=31986 CoS=0 TTL=1 S=1
11 tbr2-cl7.sl9mo.ip.att.net (12.122.10.46) 53.165 ms 53.300 ms 54.103 ms
MPLS Label=31710 CoS=0 TTL=1 S=1
12 tbr1-cl24.sl9mo.ip.att.net (12.122.9.141) 51.812 ms 51.966 ms 50.981 ms
MPLS Label=31577 CoS=0 TTL=1 S=1
13 tbr2-cl6.dlstx.ip.att.net (12.122.10.90) 51.069 ms 51.302 ms 51.353 ms
MPLS Label=32509 CoS=0 TTL=1 S=1
14 tbr2-cl1592.phmaz.ip.att.net (12.122.10.82) 51.421 ms 51.063 ms 51.413 ms
MPLS Label=30828 CoS=0 TTL=1 S=1
15 12.123.206.29 (12.123.206.29) 49.589 ms 49.535 ms 48.701 ms
16 12.122.255.18 (12.122.255.18) 50.163 ms 49.543 ms 50.273 ms
17 mdf1-bi8k-2-eth-1-5.phx1.attens.net (63.241.129.142) 50.467 ms 50.693 ms 50.908 ms
18 63.241.142.126 (63.241.142.126) 49.152 ms 50.243 ms 49.721 ms

rridler 06-15-2006 02:31 PM

You know so much more than me, and I appreciate all you time and efforts.

jeelliso 06-15-2006 02:37 PM

Unfortunantly, I don't have much more information for you right now. I will ask around and see if I can't some up with something. Keep an eye on this thread and I will let you know if I find out something. If you figure it out on your own, let me know becuase I'm kind of curious now.

Good Luck,
~Justin

pdeman2 06-15-2006 02:45 PM

Rridler, I have found something interesting. I just tried doing a telnet to your server on port 25 and it did not get through. I would imagine that has something to do with the issue.
Code:

telnet> o
(to) ridler.homedns.org 25
Trying 216.196.163.43...
telnet: connect to address 216.196.163.43: Connection refused
telnet: Unable to connect to remote host: Connection refused
telnet>

The thing is though, that traceroute you did looks like it should be getting through.

jeelliso 06-15-2006 02:50 PM

Good call pdeman2, I just assumed that since HE could telnet to his machine that I could also. I can telnet to his port 80, but not to port 25. rridler, run
Code:

ps -aux | grep sendmail
to see if sendmail is actually running correctly. If it is, then it should look something like this:
Code:

[jeelliso@dada ~]$ ps -aux | grep sendmail
root    32353  0.0  0.0  8084 3116 ?        Ss  14:27  0:00 sendmail: accepting connections
smmsp    32361  0.0  0.0  7136 2588 ?        Ss  14:27  0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
jeelliso 32642  0.0  0.0  4872  636 pts/0    S+  15:49  0:00 grep sendmail

Maybe we can fix this after all; I'm not giving up yet.

~Justin

rridler 06-15-2006 03:14 PM

root 2981 0.0 1.2 7960 2060 ? Ss 13:53 0:00 sendmail: accepting connections
smmsp 2989 0.0 1.0 6964 1664 ? Ss 13:53 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 3815 0.0 0.4 4844 672 pts/1 S+ 16:17 0:00 grep sendmail

rridler 06-28-2006 10:09 AM

Any more suggestions?

unSpawn 06-28-2006 10:58 AM

Can you see if the messages you're trying to send are queued with the "mailq" command? If you do "echo "/mx pomeroy.com"|/usr/sbin/sendmail -bt" it should return the three mailserver addresses for the domain. Can you telnet to any and all of them on port 25?

rridler 06-28-2006 12:02 PM

echo "/mx pomeroy.com"|/usr/sbin/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> getmxrr(pomeroy.com) returns 3 value(s):
mail.pomeroy.com.
mail1.pomeroy.com.
mail2.pomeroy.com.

rridler 06-28-2006 12:06 PM

telnet mail.pomeroy.com 25
Trying 216.68.84.41...
telnet: connect to address 216.68.84.41: No route to host
telnet: Unable to connect to remote host: No route to host

telnet mail1.pomeroy.com 25
Trying 65.119.133.132...
telnet: connect to address 65.119.133.132: No route to host
telnet: Unable to connect to remote host: No route to host

telnet mail2.pomeroy.com 25
Trying 216.68.84.101...
telnet: connect to address 216.68.84.101: No route to host
telnet: Unable to connect to remote host: No route to host

frankjoshua 06-28-2006 01:59 PM

Your ISP may be blocking or filtering port 25. You may need to set up a smart host in sendmail.
Check out this article
Setting up Smart Hosts with sendmail

rridler 07-13-2006 01:23 PM

Thanks for all the help, but it does seem to be that my ISP does block port 25 and they don't allow use of port 25 unless I have a business class account with them. RATS!!!!!!!

So much for my own email account. RATS, RATS, RATS!!!!!!!!

Unless you have an other way to work around it...............................


All times are GMT -5. The time now is 12:02 PM.