Mailserver that sends from a single address via a single relay

How do I configure sendmail to relay all mail through a particular mailserver, and also rewrite the From: header to be a particular address. (the mailserver needs to be authenticated to, and only allows email sent from the authenticated user)

This looks like it should be simple, but I can't get it to work correctly...
 
I only know how to modify the .cf to make it forward all mail to a certain host.

Edit either /etc/mail/freebsd.submit.cf or sendmail.cf (which ever one you use). Look for a line:
Code:
# "Smart" relay host (may be null)
DS
Change that to read something like this:
Code:
# "Smart" relay host (may be null)
DSmail.someserver.somedomain

That will use mail.someserver.somedomain to forward all email.
 
This is 2009 and people still uses horrible sendmail. Switch to postfix. It can route or set smarthost for multiple isp with easy to follow syntax.
 
Nothing horrible about Sendmail. It takes some learning and understanding. A bit like FreeBSD, really.
 
got stuck with authenticating Sendmail with Active Directory, tried Postfix. Slowly killing the last Exchange and buying more hardware with the license monies....
 
Back
Top