Okay, I've learned that I can change the name of the user and the domain with the genericstable feature. I posted the following at another site. However, they don't seem to be that quick to respond, so I'm hoping someone here will.
===========================================================
I'm running sendmail on rh linux 8.0. I've got the basics up and running. However, I have a php server on there as well and mail sent from it was setting the "from" address to apache@machine_name.one_of_our_domains.net. What I want is the from to be set to someuser@one_of_our_other_domains.com. And eventually all mail will run through this and I want the domain for all mail to be set to one_of_our_other_domains.com.
I learned that with the MASQUERADE_AS macro, I can change the domain part. So I was able to get apache@one_of_our_other_domains.com. Then I read up (sendmail book by O'Reilly) and found that I can use the genericstable feature so that one user can be mapped to another in the "from" field for outgoing mail. So here is my setup
divert(-1)
#### basic .mc file for my company
divert(0)
VERSIONID(`$Id$')
OSTYPE(`linux')
define(`confCOPY_ERRORS_TO',`postmaster')
FEATURE(`genericstable')
MAILER(`local')
MAILER(`smtp')
GENERICS_DOMAIN(`one_of_our_domains.net')
GENERICS_DOMAIN(`one_of_our_other_domains.com')
MASQUERADE_AS(`one_of_our_other_domains.com')
Then, I set up my genericstable db as such
apache@machine_name.one_of_our_domains.net newuser@one_of_our_other_domains.com'
apache@one_of_our_other_domains.com' newuser@one_of_our_other_domains.com'
I then ran the makemap hash command and moved the resulting genericstable.db file to /etc/mail/genericstable. I then (of course) restarted sendmail.
The mail is being sent just fine. However, although my MASQUERADE_AS macro is working, my genericstable feature seems to be ignored. And I don't see any errors in my mail log. In fact it says it was delievered and returns an ok status, as one would expect considering I get the mail.
Now my question is WHAT AM I DOING WRONG? Sorry! I'm just a little annoyed at sendmail's complexity and am hoping someone can see what I'm doing wrong. Thanks for any help you can give.
===========================================================
I'm running sendmail on rh linux 8.0. I've got the basics up and running. However, I have a php server on there as well and mail sent from it was setting the "from" address to apache@machine_name.one_of_our_domains.net. What I want is the from to be set to someuser@one_of_our_other_domains.com. And eventually all mail will run through this and I want the domain for all mail to be set to one_of_our_other_domains.com.
I learned that with the MASQUERADE_AS macro, I can change the domain part. So I was able to get apache@one_of_our_other_domains.com. Then I read up (sendmail book by O'Reilly) and found that I can use the genericstable feature so that one user can be mapped to another in the "from" field for outgoing mail. So here is my setup
divert(-1)
#### basic .mc file for my company
divert(0)
VERSIONID(`$Id$')
OSTYPE(`linux')
define(`confCOPY_ERRORS_TO',`postmaster')
FEATURE(`genericstable')
MAILER(`local')
MAILER(`smtp')
GENERICS_DOMAIN(`one_of_our_domains.net')
GENERICS_DOMAIN(`one_of_our_other_domains.com')
MASQUERADE_AS(`one_of_our_other_domains.com')
Then, I set up my genericstable db as such
apache@machine_name.one_of_our_domains.net newuser@one_of_our_other_domains.com'
apache@one_of_our_other_domains.com' newuser@one_of_our_other_domains.com'
I then ran the makemap hash command and moved the resulting genericstable.db file to /etc/mail/genericstable. I then (of course) restarted sendmail.
The mail is being sent just fine. However, although my MASQUERADE_AS macro is working, my genericstable feature seems to be ignored. And I don't see any errors in my mail log. In fact it says it was delievered and returns an ok status, as one would expect considering I get the mail.
Now my question is WHAT AM I DOING WRONG? Sorry! I'm just a little annoyed at sendmail's complexity and am hoping someone can see what I'm doing wrong. Thanks for any help you can give.