1847950 Members
4893 Online
104021 Solutions
New Discussion

Re: Issue with sendmail

 
SOLVED
Go to solution
Grayh
Trusted Contributor

Issue with sendmail

Hi Experts,

After a sendmail stop and a start I see the following errors in /var/adm/syslog/mail.log

Mar 26 09:05:50 hp02 /sbin/init.d/sendmail[1421]: #### rebooted ####
Mar 26 09:05:55 hp02 sendmail[1435]: unable to qualify my own domain name (hp02) -- using short name
Mar 26 09:05:55 hp02 sendmail[1435]: be sure to set domain name in Dj macro in sendmail.cf
Mar 26 09:05:55 hp02 sendmail[1435]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 698: fileclass: cannot open '/etc/mail/sendmail.cw': Group writable directory
Mar 26 09:05:55 hp02 sendmail[1436]: unable to qualify my own domain name (hp02) -- using short name
Mar 26 09:05:55 hp02 sendmail[1436]: be sure to set domain name in Dj macro in sendmail.cf
Mar 26 09:05:55 hp02 sendmail[1436]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 698: fileclass: cannot open '/etc/mail/sendmail.cw': Group writable directory
Mar 26 14:21:08 hp02 sendmail[15887]: unable to qualify my own domain name (hp02) -- using short name
Mar 26 14:21:08 hp02 sendmail[15887]: be sure to set domain name in Dj macro in sendmail.cf
Mar 26 14:21:08 hp02 sendmail[15887]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 698: fileclass: cannot open '/etc/mail/sendmail.cw': Group writable directory

I've edited sendmail.cf file and added my domain and uncommented it but still of no use

and in mailq the see the following and the mails do not reach the receipent.

# mailq
Mail Queue (3 requests)
--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
PAA22853 507 Wed Mar 26 15:02 root
(host map: lookup (hp.com): deferred)
d23@hp.com
WAA16704 16 Tue Mar 25 22:10 root
(host map: lookup (hp.com): deferred)
d23@hp.com
VAA16552 20 Tue Mar 25 21:37 root
(host map: lookup (hp.com): deferred)
d23@hp.com

Plz help.

Regards,
Mohan
5 REPLIES 5
Jeeshan
Honored Contributor

Re: Issue with sendmail

Hi Mohan

configure /etc/resolv.conf with domain name, nameserver IP

configure macro DS to DSexchange_relay_name
- configure macro Dj$w. to Dj$w.
then stop and start the sendmail daemon.

check your sendmail is working or not
#echo test | sendmail -v
a warrior never quits
Steven E. Protter
Exalted Contributor
Solution

Re: Issue with sendmail

Shalom Mohan,

The most important problem is that /etc/resolv.conf is not able to determine the MX (Mail Exchanger) record for hp.com.

In most corporate situations, individual servers do not directly deliver their mail to the outside world.

Normally you set the DS directive in sendmail.cf to use a smtp mail relay server.

DShostname.your.exchangeserver

This will say don't bother trying to deliver mail to the public Internet, just send it to the relay server and it will handle things.

I recommend DS directive as a start to solve this issue.

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
Grayh
Trusted Contributor

Re: Issue with sendmail

Hi,

Thanks for the quick reply, I have done that and after the test run got the following

echo test | sendmail -v d12@hp.com
WARNING: local host name (hp01) is not qualified; fix $j in config file
hp.com: Name server timeout
dmv@hp.com... Transient parse error -- message queued for future delivery
dmv@hp.com... queued

Thought these might be of some help:-

Entries in /etc/hosts
----------------------
16.134.154.200 hp01
127.0.0.1 localhost loopback
16.134.154.200 hp01 hp01.hp.com.
----------------------
# hostname
hp01
# domainname
hp.com
---------------------
# cat /etc/resolv.conf
domain hp.com
#search dplogin02.digitalindiasw.net deu.hp.com france.hp.com hp.com
#nameserver 16.130.66.72
#nameserver 16.18.69.44
-----------------------------
Matti_Kurkela
Honored Contributor

Re: Issue with sendmail

Your /etc/hosts has two lines referring to the same IP address. The first one has only the unqualified name, the second has the unqualified name listed first.

Paraphrasing from the man page, /etc/hosts should contain a single line for each IP address with the following information:

[aliases]

In your case, the line for 16.134.154.200 should be:
16.134.154.200 hp01.hp.com hp01
This should be the *only* line in /etc/hosts that refers to IP address 16.134.154.200. The correctness of this line becomes more important if your /etc/resolv.conf does not have any name servers defined, or your server cannot access any of the defined name servers.

The "domainname" command displays the NIS domain name, which is not necessarily related to your fully-qualified DNS hostname. So the output of "domainname" is actually not at all related to this problem

Your /etc/resolv.conf has all the nameserver lines commented out. This means sendmail will have no way to reach any DNS servers. Access to DNS is vital for email servers for various reasons: first, sendmail really wants to confirm the official hostname using DNS lookups. Second, sendmail often needs the MX records from the DNS system: these records cannot be expressed in /etc/hosts file at all.

After fixing these things, your sendmail should be much happier. There may be still other things to fix, but the things mentioned above are some of the basics.

MK
MK
Grayh
Trusted Contributor

Re: Issue with sendmail

Thanks all for the Reply.Issue has been resolved.