On Sun, Jun 21, 2009 at 05:42:22PM +0200, Markus Wernig wrote: > > I have sendmail on 4.4 as MX and relay for outgoing mail using smtp > auth. Now some users started using arbitrary from: addresses in their > mail clients. I would like to restrict those sender addresses to the > local domains, i.e. allow them to send mail from [email protected] or > [email protected], and reject their mails from [email protected], > preferably during the smtp dialog between MUA and sendmail. > > I've searched the sendmail docs and google, but can't find how to do > this. Is it possible at all?
Without modifying rulesets or running multiple instances of sendmail, I think the simplest way is to use milter-regex. You can even match the authenticated username against specific envelope senders rather than any local domain. Otherwise, you're probably looking at implementing something similar to this[1] in your configuration file. [1] http://www.sendmail.org/~ca/email/restrict.html

