cinglez
asked on
Masquerade Sender - SendMail
Hello.
I have a server running sendmail, just for some application-generated mail, NOT AUTHENTICATED.
What I need is to masquerade ALL messages to have the same sender address (like no-reply@xxx.com), despite of the original sender.
What is the easiest way to accomplish this?
I have a server running sendmail, just for some application-generated mail, NOT AUTHENTICATED.
What I need is to masquerade ALL messages to have the same sender address (like no-reply@xxx.com), despite of the original sender.
What is the easiest way to accomplish this?
sender mapping is what the generics table was created for. Put entries like this in your /etc/mail/genericstable file:
nobody: noreply@yourdomain.com
apache: noreply@yourdomain.com
oracle: noreply@yourdomain.com
yougetthepicture: something@yourdomain.com
Makes sure sendmail is set to use it, this should be in your sendmail.mc:
FEATURE(`genericstable')dn l
Create the generics database:
# makemap hash /etc/mail/genericstable < /etc/mail/genericstable
Recreate the sendmail config (if you changed the mc file) and restart sendmail
nobody: noreply@yourdomain.com
apache: noreply@yourdomain.com
oracle: noreply@yourdomain.com
yougetthepicture: something@yourdomain.com
Makes sure sendmail is set to use it, this should be in your sendmail.mc:
FEATURE(`genericstable')dn
Create the generics database:
# makemap hash /etc/mail/genericstable < /etc/mail/genericstable
Recreate the sendmail config (if you changed the mc file) and restart sendmail
ASKER
I don't have any genericstable file in /etc/mail. Should I create one?
In your examples, if an email has the sender oracle@yourdomain.com, it will be remapped to noreply@yourdomain.com?
Sorry, I don't have any experience on this. How should I recreate sendmail.mc?
Thanks
In your examples, if an email has the sender oracle@yourdomain.com, it will be remapped to noreply@yourdomain.com?
Sorry, I don't have any experience on this. How should I recreate sendmail.mc?
Thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I will try it
ASKER
Well, something did not work.
I created the genericstable file with:
orcamento@xxx.com.br: no-reply@xxx.com.br
Then I issued the command:
# makemap hash /etc/mail/genericstable < /etc/mail/genericstable
Then added on sendmail.mc:
FEATURE(`genericstable`)dn l
Then
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
And got:
NONE:0: m4: ERROR: end of file in argument list
I created the genericstable file with:
orcamento@xxx.com.br: no-reply@xxx.com.br
Then I issued the command:
# makemap hash /etc/mail/genericstable < /etc/mail/genericstable
Then added on sendmail.mc:
FEATURE(`genericstable`)dn
Then
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
And got:
NONE:0: m4: ERROR: end of file in argument list
Can you post your /etc/mail/sendmail.mc file?
Most anti-spam systems will reject mail from mailbox that does not accept one.