1835329 Members
2680 Online
110078 Solutions
New Discussion

Re: sendmail

 
Claudio_17
Frequent Advisor

sendmail

Hello,

in sendmail.cf I've added following line ..

Dj$w.mydomane.com

otherwise I'd an error on mail relay server.

My question is : is possible avoid that mydomane.com appair in From line .. for example

From: pippo@hostname.mydomane.com

Thnks
5 REPLIES 5
Claudio_17
Frequent Advisor

Re: sendmail

Sorry for two post .
Massimo Bianchi
Honored Contributor

Re: sendmail

Stuart Abramson_2
Honored Contributor

Re: sendmail

Let me get this straight:

1. You want the email "From" to look like this:

pippo@hostname

Is that what you want?

2. I can tell you how to do this:

pippo@mydomain.com

That is called "site hiding", and you get it by doing this:

vi sendmail.cf
Set:
DMdomain.com
Unset:
CE root


/sbin/init.d/sendmail stop; /sbin/init.d/sendmail start

does that help?
Scott McCort
Advisor

Re: sendmail

Stuart has the right idea. This will change it for all users sending email.
If you want to be more flexible, use the user.db functionality.
This will allow you make changes per each user.
pippo@hostname.mydomane.com can become
Claudio@mydomane.com.
1) Uncomment the user.db line in sendmail.cf
2) Create a file /etc/mail/userdb with entries:
pippo:mailname Claudio@mydomane.com
Claudio:maildrop pippo

The first line changes outgoing mail from pippo and the second line allows return email to Claudio to be forwarded to pippo's account.

3)Compile this text file:
# makemap btree ./userdb.db < ./userdb

4)Restart sendmail
# killsm
# /sbin/init.d/sendmail start
Steven E. Protter
Exalted Contributor

Re: sendmail

You could...

Change
Dj$w.mydomane.com


to


Djmydomane.com


You could make sure the hostname.mydomain.com entries actually resolve at least on Internal DNS servers, preferably on both.

If your host name in /etc/rc.config.d/netconf is hostname.mydomain.com and you have DNS resolution on that name inside and out, you will accomplish your goal.

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