Operating System - HP-UX
1826499 Members
1769 Online
109692 Solutions
New Discussion

Re: sendmail - when problems occurs

 
SOLVED
Go to solution
Daniel Aquere de Olivei
Regular Advisor

sendmail - when problems occurs

hi everyone,

I need to configure my server to send mail for a specific e-mail count when occurs problems with a process.

The count is management@mydomain.com.br.

What configurations I need to do for this.

I use HP-UX 11.0 and sendmail 8.9.3.

Thanks in advance.

Daniel
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: sendmail - when problems occurs

Hi Daniel:

You can configure the "smart relay" macro in '/etc/mail/sendmail.cf' like:

DSmailservername.mydomain.com.br

...where "mailservername" is the smart relay name. THis relays all non-local mail to the relay host via SMTP.

Then when you do something like:

# mailx -s "Test Message" management@mydomain.com.br < /dev/null

...the message is sent thusly.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail - when problems occurs

Shalom Daniel,

Its not a matter of configuring sendmail as it is making sure sendmail can deliver the mail.

The daemon does not have to even be running to send outbound mail.

On the most basic level, if the HP-UX machine can do an nslookup on the MX mail exchange server, then it should be able to deliver scripted emmail to that server.

This scenario requires no change to sendmail confguration.

If as it is in many corporate lans an Exchange server, then that server needs to permit relay form the HP-UX box to itself. The default is not to permit it.

What many admins do is have all HP-UX mail relayed by another box. This is a smtp or exchange server and once again relay from this HP-UX box must be set up in advance.

You modify sendmail.cf which is usually in /etc or /etc/mail

DShostnameexchangeserver

or
DS
[192.168.0.10]

save the file, and now all mail will be relayed through the chosen mail relay.

Again, you don't need to have the sendmail daemon running to send mail, only to receive it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Daniel Aquere de Olivei
Regular Advisor

Re: sendmail - when problems occurs

Hi Steven / James,

Thanks for your attention.

I did how recommended but, when the message is sent she doesn't arrive to the destiny, not even in the mail server.

I change the file "/etc/nsswitch.conf":

aliases: files nis
for
aliases: files (only files)

Sendmail informs OK for the sending of the message. But the same doesn't arrive to the server mail.

# mailx -s "Test Message" -u root -r management@mydomain.com.br < /dev/null

Some idea of the one what can be happening?

Regards.

Daniel
ricky2
Frequent Advisor

Re: sendmail - when problems occurs

1.whenever you change the config file sendmail.cf restart the sendmail

/sbin/rc2.d/S540sendmail stop
/sbin/rc2.d/S540sendmail start

2.send a test mail using

sendmail -v

3.open another window and check the error message simultaneously after u send the testmail
at the log

tail -f /var/adm/syslog/mail.log

or with

matail command

4.If the mail is not recieved ,send the error message

5.Also do a telnet to the mailserver ip at smtp port
telnet 198.xxx.xx.xx 25
check if u are able to connect if not send the error message

thanks,
Ricky
Daniel Aquere de Olivei
Regular Advisor

Re: sendmail - when problems occurs

Hi Ricky,

The message doesn´t arrived.

Error message:

May 17 11:38:35 svnnm08 sendmail[20958]: starting daemon (8.9.3 (PHNE_29773)): SMTP+queueing@00:30:00
May 17 11:40:34 svnnm08 sendmail[21714]: LAA21714: from=root, size=162, class=0, pri=30162, nrcpts=1, msgid=<200605171440.LAA21714@svnnm08.flim.bus>, relay=root@localhost
May 17 11:40:34 svnnm08 sendmail[21716]: LAA21714: to=daniel.oliveira@primesys.com.br, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=10.6.3.6, stat=Host unknown (Name server: 10.6.3.6: host not found)
May 17 11:40:34 svnnm08 sendmail[21716]: LAA21714: LAA21716: DSN: Host unknown (Name server: 10.6.3.6: host not found)
May 17 11:40:34 svnnm08 sendmail[21716]: LAA21716: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Sent
May 17 11:49:49 svnnm08 sendmail[28069]: LAA28069: from=root, size=162, class=0, pri=30162, nrcpts=1, msgid=<200605171449.LAA28069@svnnm08.flim.bus>, relay=root@localhost
May 17 11:49:49 svnnm08 sendmail[28071]: LAA28069: to=daniel.oliveira@primesys.com.br, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=10.6.3.6, stat=Host unknown (Name server: 10.6.3.6: host not found)
May 17 11:49:49 svnnm08 sendmail[28071]: LAA28069: LAA28071: DSN: Host unknown (Name server: 10.6.3.6: host not found)
May 17 11:49:49 svnnm08 sendmail[28071]: LAA28071: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Sent
May 17 11:56:01 svnnm08 sendmail[497]: Warning: .cf file is out of date: sendmail 8.9.3 (PHNE_29773) supports version 8, .cf file is version 6

With telnet, the message has send OK.

Tks.

Daniel
ricky2
Frequent Advisor

Re: sendmail - when problems occurs

the error showing that stat=Host unknown,seems that it is not able to resolve the host
check if you are able to resolve the hostname/ip of the relay server

nslookup
nslookup 10.6.3.6

if it is not able to resolve add it in /etc/hosts also check if u are having the correct DNS entries in the /etc/resolv.conf

2.Try to get the exact host name of the relay server and make the entry in the sendmail.cf file as
in the below example of my server..
DSrelayserverhostname
# "Smart" relay host (may be null)
DSink-relay.wenx.com

restart the sendmail daemon and check again

Thanks,
Ricky
Daniel Aquere de Olivei
Regular Advisor

Re: sendmail - when problems occurs

Hi Ricky,

Thanks, again...

The problem is solved.

Regards.

Daniel