Link to home
Create AccountLog in
Avatar of cinglez
cinglezFlag for Brazil

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?
Avatar of gheist
gheist
Flag of Belgium image

What are you trying to accomplish?
Most anti-spam systems will reject mail from mailbox that does not accept one.
Avatar of jar3817
jar3817

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')dnl

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





Avatar of cinglez

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
ASKER CERTIFIED SOLUTION
Avatar of jar3817
jar3817

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of cinglez

ASKER

I will try it
Avatar of cinglez

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`)dnl

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?