smtp problem in sendmail
Hi everyone,
I tried to use "mail" command to send email. It does not work(I've not received any email. I checked if the sendmail is working, I typed ps -aux | grep sendmail root 835 0.0 0.7 5004 1836 ? S Mar25 0:00 sendmail: accepti Also, I can't restart sendmail, it's freezing...(see below) [root@pe-web init.d]# sendmail restart restart... User unknown Also, I tried this [root@pe-web /root]# telnet localhost 25 Trying 127.0.0.1... Connected to pe-we.... Please help..... |
Quote:
Code:
service sendmail restart Code:
/etc/init.d/sendmail restart You have to check the logs (/var/log/maillog) to see what happens to your emails Regards |
Quote:
first Code:
tail -f /var/log/maillog | grep user@host & Code:
mail -v user@host it doesnt look like you have any need to restart sendmail right now. it is running fine...but in case you do want to, the command is Code:
service sendmail restart |
Quote:
Here is the log...Thank you so much... Mar 21 05:00:01 pe-web sendmail[29834]: o2KL01g29834: from=root, size=327, class=0, nrcpts=1, msgid=<201003202100.o2KL01g29834@pe-web.org>, relay=root@localhost Mar 21 05:00:01 pe-web sendmail[29834]: o2KL01g29834: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 22 05:00:00 pe-web sendmail[7234]: o2LL00d07234: from=root, size=327, class=0, nrcpts=1, msgid=<201003212100.o2LL00d07234@pe-web.org>, relay=root@localhost Mar 22 05:00:00 pe-web sendmail[7234]: o2LL00d07234: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 23 05:00:00 pe-web sendmail[675]: o2ML00D00675: from=root, size=327, class=0, nrcpts=1, msgid=<201003222100.o2ML00D00675@pe-web.org>, relay=root@localhost Mar 23 05:00:00 pe-web sendmail[675]: o2ML00D00675: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 24 05:00:01 pe-web sendmail[30858]: o2NL00H30858: from=root, size=327, class=0, nrcpts=1, msgid=<201003232100.o2NL00H30858@pe-web.org>, relay=root@localhost Mar 24 05:00:01 pe-web sendmail[30858]: o2NL00H30858: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 24 15:21:58 pe-web sendmail[7419]: o2O7LwN07419: from=nobody, size=370, class=0, nrcpts=1, msgid=<201003240721.o2O7LwN07419@pe-web.org>, relay=nobody@localhost Mar 24 15:22:03 pe-web sendmail[7421]: o2O7LwN07419: to=test <123@yahoo.com>, ctladdr=nobody (99/99), delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=30370, relay=c.mx.mail.yahoo.com. [206.190.54.127], dsn=5.0.0, stat=Service unavailable Mar 24 15:22:03 pe-web sendmail[7421]: o2O7LwN07419: o2O7M3M07421: DSN: Service unavailable Mar 24 15:22:03 pe-web sendmail[7421]: o2O7M3M07421: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30470, dsn=2.0.0, stat=Sent Mar 25 05:00:00 pe-web sendmail[16003]: o2OL00O16003: from=root, size=327, class=0, nrcpts=1, msgid=<201003242100.o2OL00O16003@pe-web.org>, relay=root@localhost Mar 25 05:00:00 pe-web sendmail[16003]: o2OL00O16003: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 25 10:00:49 pe-web sendmail[825]: alias database /etc/aliases rebuilt by root Mar 25 10:00:49 pe-web sendmail[825]: /etc/aliases: 40 aliases, longest 10 bytes, 395 bytes total Mar 25 10:00:49 pe-web sendmail[835]: starting daemon (8.11.2): SMTP+queueing@01:00:00 |
It looks like yahoo are not accepting mail from your server. CAn you try a test to another email address? Hotmail or Google? It might be a good idea to configure your mail server so that the from email address is routeable. A lot of mail servers would reject email if this is not the case. Somebody@localhost is not a valid email address.
|
1. check. is it possible to send mail locally by
# mail -v user@loaclhost 2. then check the log /var/log/maillog for delivery success or not. 3. If it is ok. then u need to check with /etc/hosts, /etc/hosts.allow, hosts.deny |
Quote:
please help [root@pe-web /root]# mail -v smmsp@localhost Subject: testing |
Quote:
Mar 28 05:00:00 pe-web sendmail[24512]: o2RL00424512: from=root, size=327, class=0, nrcpts=1, msgid=<201003272100.o2RL00424512@pe-web.org>, relay=root@localhost Mar 28 05:00:00 pe-web sendmail[24512]: o2RL00424512: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 29 05:00:00 pe-web sendmail[6198]: o2SL00V06198: from=root, size=327, class=0, nrcpts=1, msgid=<201003282100.o2SL00V06198@pe-web.org>, relay=root@localhost Mar 29 05:00:00 pe-web sendmail[6198]: o2SL00V06198: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent |
Can you post the output of:
#chkconfig --list | grep sendmail and #service sendmail status Thank you |
NOt sure what Brian or barshani are trying to say, but your sendmail is up and running fine. Your mail server must answer with a proper dns name for a start. You can add this in /etc/hosts. Must be resolvable in dns
|
mail -v user@localhost
Subject: test --> (Press Enter) . --> (Press .) Cc: --> (Press Enter) Null message body; hope that's ok |
I found anohter post which is similar as my case. Finally, he made a port redirection from 25 to 26 and worked. Therefore, I did the same thing yesterday.
iptables -A INPUT -p tcp --dport 26 -j ACCEPT iptables -A PREROUTING -t nat -p tcp --dport 26 -j REDIRECT --to-port 25 After I applied the iptables, it still doesn't work for me. Here is my maillog.Please help...Thank you Mar 28 05:00:00 pe-web sendmail[24512]: o2RL00424512: from=root, size=327, class=0, nrcpts=1, msgid=<201003272100.o2RL00424512@pe-web.org>, relay=root@localhost Mar 28 05:00:00 pe-web sendmail[24512]: o2RL00424512: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 29 05:00:00 pe-web sendmail[6198]: o2SL00V06198: from=root, size=327, class=0, nrcpts=1, msgid=<201003282100.o2SL00V06198@pe-web.org>, relay=root@localhost Mar 29 05:00:00 pe-web sendmail[6198]: o2SL00V06198: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent Mar 29 10:32:05 pe-web sendmail[10887]: o2T2W5w10887: ruleset=check_relay, arg1=pe-web.org, arg2=127.0.0.1, relay=pe-web.org [127.0.0.1], reject=550 5.7.1 Access denied Mar 29 11:32:05 pe-web sendmail[10887]: o2T2W5w10887: timeout waiting for input from pe-web.org during server cmd read Mar 29 11:32:05 pe-web sendmail[10887]: NOQUEUE: pe-web.org [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 29 14:37:06 pe-web sendmail[689]: alias database /etc/aliases rebuilt by root Mar 29 14:37:06 pe-web sendmail[689]: /etc/aliases: 40 aliases, longest 10 bytes, 395 bytes total Mar 29 14:37:06 pe-web sendmail[699]: starting daemon (8.11.2): SMTP+queueing@01:00:00 Mar 29 14:45:10 pe-web sendmail[1021]: o2T6jAw01021: from=nobody, size=343, class=0, nrcpts=1, msgid=<201003290645.o2T6jAw01021@pe-web.org>, relay=nobody@localhost Mar 29 14:45:11 pe-web sendmail[1023]: o2T6jAw01021: to=peweb@cuhk.edu.hk, ctladdr=nobody (99/99), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30343, relay=cwemgw2.itsc.cuhk.edu.hk. [137.xxx.xxx.29], dsn=2.0.0, stat=Sent (ok: Message 145665710 accepted) Mar 29 15:02:29 pe-web sendmail[1281]: o2T72TJ01281: from=root, size=49, class=0, nrcpts=1, msgid=<201003290702.o2T72TJ01281@pe-web.org>, relay=root@localhost Mar 29 15:02:29 pe-web sendmail[1283]: o2T72TJ01281: to=cchance@cuhk.edu.hk, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30049, relay=cwemgw2.itsc.cuhk.edu.hk. [137.xxx.xxx.29], dsn=2.0.0, stat=Sent (ok: Message 145667296 accepted) Mar 29 23:19:29 pe-web sendmail[11433]: o2TFJTh11433: from=nobody, size=371, class=0, nrcpts=1, msgid=<201003291519.o2TFJTh11433@pe-web.org>, relay=nobody@localhost Mar 29 23:19:30 pe-web sendmail[11435]: o2TFJTh11433: to=moon <pemoon-2005@163.com>, ctladdr=nobody (99/99), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30371, relay=mxnew-a.163.com. [220.xxx.xxx.43], dsn=2.0.0, stat=Sent (Mail OK queued as mx3,NcCowKD7j9TUw7BLZFloAQ--.852S2 1269875669) Mar 30 05:00:01 pe-web sendmail[15635]: o2TL00R15635: from=root, size=327, class=0, nrcpts=1, msgid=<201003292100.o2TL00R15635@pe-web.org>, relay=root@localhost Mar 30 05:00:01 pe-web sendmail[15635]: o2TL00R15635: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30327, dsn=2.0.0, stat=Sent |
Quote:
[root@pe-web /root]# chkconfig --list | grep sendmail sendmail 0:off 1:off 2-5:on 6:off |
Quote:
[root@pe-web /root]# service sendmail status sendmail (pid 699) is running... Thank you |
Quote:
Your mailserver appears to be working correctly. All i can see is that some mail servers will not allow you to send mail to them because of RFC 821/822 (mailserver configuration). thats all. IF you are still having problems, you may have to pm me as this seems to be going a bit off track.. |
All times are GMT -5. The time now is 06:52 PM. |