LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sendmail Issue.. (http://www.linuxquestions.org/questions/linux-newbie-8/sendmail-issue-911246/)

k_balaa 11-01-2011 09:04 AM

Sendmail Issue..
 
Unable send a mail to user

My SMTP server ip is : 10.3.9.161.

Added in /etc/mail/sendmail.mc

DAEMON_OPTIONS(`Port=smtp,Addr=10.3.9.161, Name=MTA') dnl

df -h | mail -s “disk space report” bala@123.com

tail -f /var/log/maillog
Nov 1 18:24:42 rilpg12 sendmail[20578]: pA1IOgCM020578: from=root, size=407, class=0, nrcpts=3, msgid=<201111011824.pA1IOgCM020578@rilpg12>, relay=root@localhost
Nov 1 18:24:42 rilpg12 sendmail[20578]: pA1IOgCM020578: to=space,report.,balamurugan.kumaresan@ril.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=90407, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

bathory 11-01-2011 09:30 AM

Hi,

If you want sendmail to listen on both local loopback interface and the public IP, you should use:
Code:

DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
Regards

k_balaa 11-01-2011 11:30 PM

Thanks ,but not working...

Nov 2 09:02:59 rilpg12 sendmail[25810]: daemon MTA: problem creating SMTP socket
Nov 2 09:03:04 rilpg12 sendmail[25810]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Cannot assign requested address
Nov 2 09:03:04 rilpg12 sendmail[25810]: daemon MTA: problem creating SMTP socket
Nov 2 09:03:04 rilpg12 sendmail[25810]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting


-- Sendmail.mc

define(`SMART_HOST', `10.3.9.161')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=10.3.9.161, Name=MTA') dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA') dnl

btmiller 11-02-2011 12:37 AM

Looks like sendmail is having trouble binding to port 25. You might want to check with netstat and make sure that nothing else is bound to that port.

k_balaa 11-02-2011 01:05 AM

nmap -sS -O 127.0.0.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-11-02 10:37 GMT
Interesting ports on alpha1.localdomain (127.0.0.1):
Not shown: 1667 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
--

k_balaa 11-02-2011 01:43 AM

Fixed.

from : define(`SMART_HOST', `10.3.9.161')dnl
to : define(`SMART_HOST', `hostname')dnl

Working Fine now.


All times are GMT -5. The time now is 08:11 PM.