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: 

problem with sendmail

JOAN FERRAN
Occasional Visitor

problem with sendmail

Hi! I've got sendmail running in relay mode. But now I need to hide and change the user who send the mail. For instance, instead of "from user@server.com" I want all the users send the mails with an alias like "all@server.com". Then there are only one adress to recieve the replies.
thanks
Joan Ferran
5 REPLIES
John Carr_2
Honored Contributor

Re: problem with sendmail

Hi

I think what you need to do is set the reply-to option on outgoing mail so it all comes back to one central point, unless you need to hide who sent the mail originally.

John.
Christopher Caldwell
Honored Contributor

Re: problem with sendmail

(Assuming sendmail 8.8 and above), use the genericstable to map the sender's address to a new address.

To make it work, uncomment the following rulesets in /etc/mail/sendmail.cf:

# Generics table (mapping outgoing addresses)
#Kgenerics dbm /etc/mail/genericstable

[...]

S93

# handle generics database
#R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark
#R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark
#R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 >
#R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 >
#R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified
#R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified
#R< > $* $: $1 not found

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

The file you edit is
/etc/mail/genericstable
entries are of the form
user newuser@newhost.com

The file is a dbm style file:
/usr/sbin/makemap dbm /etc/mail/virtusertable
Rita C Workman
Honored Contributor

Re: problem with sendmail

Well I'm not 100% certain how to respond. Let me expalin.

To masquerade your host you can edit the /etc/mail/sendmail.cf file and go down to the line that says:
"who I masquerade as..."
DM

Now after DM add your masquerade the hostname as:
DMabc.com for example

To masquerade your user you would edit just above there as deemed appropriate.
CE root as an example
*******************
Now here's why I say not 100% sure how to respond.

I have users (albeit not all thankfully) that require email to go out, but to be aliased to another mail address, that all our developers use for return mail. I did this by creating entries in a userdb and then ran the makemap option...Now for all your users this may be an arduous task, but it is an option and you may want to check it out.
See this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xaaf16c96588ad4118fef0090279cd0f9,00.html

Hope this helps,
Rita

JOAN FERRAN
Occasional Visitor

Re: problem with sendmail

Hi! I've been read your answers. For our problem, i follow Rita's help. I masquered the my host (now it appears foo.com instead of my host) That it works. I've created the file userdb with the entries user: mailname name and name: maildrop user. But it doesn't work. Maybe I've done something wrong...
thanks for your help
Joan Ferran
Rita C Workman
Honored Contributor

Re: problem with sendmail

Joan,

Did you remember to stop and then restart sendmail? This is something you should do whenever you make certain changes..

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

Hope that helps,
Rita