sendmail question (linux)

I just configured my sendmail to be able to send & receive mail to/from the internet, and it’s working like a champ except for one thing:

return address is coming up as instead of Yeah, it’s a minor thing, but it’s bugging me to no end.

Relevant information includes the fact that I’m behind a router, with ports 1 to 110 forwarded to the linux machine. I’m running a dns on that machine, which, obviously, is the primary dns for my domain and network. (originally thought this could be it - that sendmail is doing a gethostbyaddress on itself, until I realized that the linux box has an address of, being behind the router and all.) After I post this, I’m going to examine my /etc/hosts and see if that has anything to do with it.

Any ideas on how I can get this to stop?

Ideally, even though the machine has a hostname and domain name, sendmail should be able to use just the domain name, right? After all, having mail sent from appear as is pretty common, right?

Near the beginning of your file there should be a line that looks something like:


Try changing the line to read:


Make sure you uncomment it if it is commented.

The O’reilly sendmail book is a good resource to have for these kind of issues.

One other thing, have you checked your server for open relay? Sendmail can be tricky and complicated to set up and it is easy to miss things that would allow spammers and other people of questionable moral character to bounce their stuff off of your server, which could possibly get your server blacklisted. There are many places on the web that allow you to test your server, including the following site which seems to be reasonably comprehensive:




Thanks for the reply, but that didn’t do it. So far the only thing that’s working is to manually set the user-domain in the mail client (pine). But I know sendmail can strip out the hostname - I’ve had it working once before, just can’t remember what I did.