Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail change sender address

Luk Vandenbussche
Honored Contributor

sendmail change sender address

Hi,

When you send a mail the normal sender address
is root@servername.company.com

With masquerade I can change it to root@company.com

Is there a way to change to servername@company.com?
6 REPLIES
Arunvijai_4
Honored Contributor

Re: sendmail change sender address

Hi Luk,

You can check this link for usefulness,

http://www.sendmail.org/~ca/email/lfaq.html#CHGADDR

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Peter Godron
Honored Contributor

Re: sendmail change sender address

Peter Godron
Honored Contributor

Re: sendmail change sender address

Luk,
another way is:
cat file | sendmail -f new_sender recipient
Christopher Caldwell
Honored Contributor

Re: sendmail change sender address

Users marked "Trusted" in sendmail.cf can change their from addresses without security warning by using the appropriate flag in their mailer
e.g.
sendmail -f
mailx -r

By default, root is trusted on HP.

If you've got a great number of addresses that you'd like to coerce automatically, use the generics table
/etc/mail/genericstable
takes name value pairs like
jdoe john.doe@domain.com

It's a dbm style file, so you'll need to build it using makemap.

You'll also need to uncomment the generics rulesets in sendmail.cf (search for generic in sendmail.cf -- the 3 lines are pretty obvious).

#Kgenerics dbm /etc/mail/genericstable
# handle generics database
#R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 >
#R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2

The m4 technique will work as well, if you're trying to deal cleanly with sendmail.cf configuration management.
KapilRaj
Honored Contributor

Re: sendmail change sender address

sendmail -f kapil@kaps.com

Regds,

Kaps
Nothing is impossible
Steven E. Protter
Exalted Contributor

Re: sendmail change sender address

Shalom,

You can use /etc/aliases

sender@some.net sender@new.net

/etc/mail/genericstable

root@company.com servicename@company.com

I recommend the genericstable.

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