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 u...@my.domain or
> u...@my.other.domain, and reject their mails from u...@foreign.domain,
> 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

Reply via email to