Operating System - HP-UX
1834528 Members
3525 Online
110068 Solutions
New Discussion

Re: hostname is appended to domain with email

 
SOLVED
Go to solution
Terrence
Regular Advisor

hostname is appended to domain with email

I have a server called "python" with HPUX 11.23. I have an account called "alert". My domain is chicomhos.org.

I have various monitoring scripts that send emails for events.

When the account "alert" sends email from those scripts it appends "python" to the domain so the address become alert@python.chicomhos.org

How do I prevent the server name from being included so the email just says alert@chicomhos.org?

My default domain is set correctly in /etc/resolv.conf.

One of my vendors cannot receive these emails because it cannot resolve the (nonexistent) domain of python.chicomhos.org
7 REPLIES 7
Vipulinux
Respected Contributor
Solution

Re: hostname is appended to domain with email

Hi Terrence

You will need to do masquerading, with this all mails will go thru the server as chicomhos.org

Check this out

http://www.sendmail.org/m4/masquerading.html

Cheers
Vipul
Victor Fridyev
Honored Contributor

Re: hostname is appended to domain with email

Hi,

You can either use macros DM in /etc/mail/sendmail.cf or run
cat message| sendmail -f alert@chicomhos.org myvendor@someth.com

HTH
Entities are not to be multiplied beyond necessity - RTFM
Ivan Ferreira
Honored Contributor

Re: hostname is appended to domain with email

Edit /etc/rc.config.d/mailservs and configure:

Edit the file /etc/rc.config.d/mailservs:
SENDMAIL_SERVER=0
SENDMAIL_SERVER_NAME="domain.com"


Or change /etc/mail/sendmail.cf


# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
Djdomain.com
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Scott Lindstrom_2
Regular Advisor

Re: hostname is appended to domain with email

As a heads-up to everyone, if you send email notifications to pagers or cell phones you will probably need to make this change.

We kept encountering more and more companies that would not deliver our pages without being able to resolve the 'from' domain. (They were being adddressed exactly as Terrence described).

Scott
TwoProc
Honored Contributor

Re: hostname is appended to domain with email

Scott,

I've had that very problem of not being able to send to beeper companies. Please clarify, you posted that we'd probably "have to make this change." Which of the "these changes" above do we have to make?
We are the people our parents warned us about --Jimmy Buffett
Terrence
Regular Advisor

Re: hostname is appended to domain with email

For the record, the correct answer to my issue was to "mascarade" my domain.

This is done via /etc/mail/sendmail.cf. Here is the piece I edited.

# who I masquerade as (null for no masquerading) (see also $=M)
DMchicomhos.org
Kent Ostby
Honored Contributor

Re: hostname is appended to domain with email

I had similar issues a while back.

Here is the thread response to my questions:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=685447
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"