Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail Is Doing My Head In

Tony Smith_1
Occasional Advisor

Sendmail Is Doing My Head In

When I try to send mail to myself on a HP-UX 11.00 machine I get the following response:

# mailx -s test1 user@host.domain
.
EOT
Null message body; hope that's ok
# user@host.domain... User unknown
/dead.letter... Saved message in /dead.letter

#


My /etc/nsswitch.conf looks like this:

passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files

Our DNS has MX records for all users on our network. What I really want to be able to do is:

1. If a mail is addressed to user@server.domain then it is delivered locally on server.domain.

2. Use the /etc/mail/alias file to be able to run a program, etc.

4. If a mail is addressed to anyone not on the local server it is redirected to the mail hub servers listed in the DNS MX records.
3 REPLIES
Clemens van Everdingen
Honored Contributor

Re: Sendmail Is Doing My Head In

Hi,

Let us know what is in your /etc/sendmail.cw file.

All forms of name resolving should be in there.

like:
localhost
sultan
sultan.domain.com
sultan.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
John Carr_2
Honored Contributor

Re: Sendmail Is Doing My Head In

Hi

when you are sending mail to someone on the same server you can drop the domain name

mailx -s TEST username


cheers
John.
Tony Walker
Frequent Advisor

Re: Sendmail Is Doing My Head In

Hi Tony,

First off, the null message body can be overcome with:
mailx -s "TEST" username << "TEST".
I would then check the /etc/mail/aliases file to ensure that sendmail knows who you are and where to send the mail. If this exists, try a sendmail -bv username and it will confirm whether the address is deliverable or not.

Tony W