Operating System - HP-UX
1752679 Members
5170 Online
108789 Solutions
New Discussion юеВ

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 6
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