System Administration

Not able to send the emails from some servers

 
SOLVED
Go to solution
praveen..
Super Advisor

Not able to send the emails from some servers

Hi,
I am executing one script which will send the output to our email id.

so I am using sendmail on some servers and it is working fine.

but from some servers, I am not getting the test mail.


#/usr/sbin/sendmail -v praveen.singh@hp.com
This is a test mail.
.
# tail -5 /var/log/maillog
Dec 19 01:16:07 server1 sendmail[8296]: kAJ7Fvs1008296: from=root, size=21, class=0, nrcpts=1, msgid=<200612180715.kAJ7Fvs1008196@server1.hp.com>, relay=root@localhost
Dec 19 01:16:07 server1 sendmail[8350]: kAJ7G7wo008350: from=, size=333, class=0, nrcpts=1, msgid=<200612190715.kAJ7Fvs1008296@server1.hp.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Dec 19 01:16:07 server1 sendmail[8296]: kAJ7Fvs1008296: to=praveen.singh@hp.com, ctladdr=root (0/0), delay=00:00:10, xdelay=00:00:00, mailer=relay, pri=30021, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (kAJ7G7wo008350 Message accepted for delivery)



Please suggest, why I am not getting mail from this server - server1

while I am getting the mails from server2 using the same command

Thanks
10 REPLIES 10
Andrew Young_2
Honored Contributor

Re: Not able to send the emails from some servers

Hi Praveen

I am assuming your Mail Delivery Agent is not the local host.

In the sendmail.cf file look for the DS macro and make sure it is set in the form DSmymail.server.com

Also make sure that the local server can resolve an MX record for the final destination server.

Any changes to the sendmail.cf file will require sendmail to be restarted.

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
praveen..
Super Advisor

Re: Not able to send the emails from some servers

sorry, all of these are linux server RHEL

Please let me know which file should i check?
Andrew Young_2
Honored Contributor
Solution

Re: Not able to send the emails from some servers

Hi Praveen.

With sendmail it makes no difference as the config files are in the same place.

The file is /etc/mail/sendmail.cf

Only difference is where the maillog is kept.

On the server you can run "host -t mx hp.com" will tell you whether your mail can be delivered externally.

Regards

Andrew Y


Si hoc legere scis, nimis eruditionis habes
praveen..
Super Advisor

Re: Not able to send the emails from some servers

in sendmail.cf file...

# "Smart" relay host (may be null)
DSmail_server.company.com

is same for both the servers (server1 & server2)

I restarted the send mail,
even i copied server2:/etc/mail/sendmail.cf & sendmail.mc file to server1 and then restarted the sendmail server

but still i am not getting the mails

Andrew Young_2
Honored Contributor

Re: Not able to send the emails from some servers

Hi.

What was the result of that host -t mx test?

The other option is to create a file /etc/mail/service.switch with contents

aliases files
hosts files

and then comment out the

O ServiceSwitchFile=/etc/mail/service.switch

entry in /etc/mail/sendmail.cf

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
praveen..
Super Advisor

Re: Not able to send the emails from some servers

this issue on another server has been solved,
I needed to edit the /etc/fstab file...

but on another server, it was showing "DSN: User unknown"






Dec 19 03:35:30 server1 sendmail[13192]: kAJ9ZQwv013192: from=root, size=33, class=0, nrcpts=1, msgid=<200612190935.kAJ9ZQwv013192@server1.hp.com>, relay=root@localhost
Dec 19 03:35:30 server1 sendmail[13193]: kAJ9ZUbm013193: from=, size=345, class=0, nrcpts=1, msgid=<200612190935.kAJ9ZQwv013192@server1.hp.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Dec 19 03:35:30 server1 sendmail[13192]: kAJ9ZQwv013192: to=praveen.singh@hp.com, ctladdr=root (0/0), delay=00:00:04, xdelay=00:00:00, mailer=relay, pri=30033, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (kAJ9ZUbm013193 Message accepted for delivery)
Dec 19 03:35:30 server1 sendmail[13195]: kAJ9ZUbm013193: to=, ctladdr= (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120345, relay=turkey.hp.com. [170.118.165.11], dsn=5.1.1, stat=User unknown
Dec 19 03:35:30 server1 sendmail[13195]: kAJ9ZUbm013193: kAJ9ZUbm013195: DSN: User unknown
Dec 19 03:35:30 server1 sendmail[13195]: kAJ9ZUbm013195: to=, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31613, dsn=2.0.0, stat=Sent


I am not getting any mail, Please suggest
Andrew Young_2
Honored Contributor

Re: Not able to send the emails from some servers

Hi.

I think the problem is now with the server receiving the emails (turkey.hp.com?). Either it thinks it is the final delivery point for that message when it should be passing it on and/or it cannot find that user.

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
praveen..
Super Advisor

Re: Not able to send the emails from some servers

so there are two servers:

1. server1-- my control
2. turkey.hp.com---another team control

so now do i need to make some changes in server1 or should i follow up with another team for the issue in turkey.hp.com????????


Andrew Young_2
Honored Contributor

Re: Not able to send the emails from some servers

Hi Praveen

I would approach the other team for access at least to their logs as I think the rejection is coming from their server.

Regards

Andrew Y


Si hoc legere scis, nimis eruditionis habes