david wrote:
> Is there any way to setup a 'compound' rule in either the access table
> or a local_rule set?
The latter can be used.
> What I would like to do is setup some rule that will reject mail if it
> matches all of the following condition:
> 1. FROM domain is @mydomain.com
> 2. Connection is received on a specific network address (external
> address, not internal)
> 2. FROM address does not exist as a real or aliased user
3?
Wouldn't it be sufficient to just enforce the last condition?
sendmail X does that by default, for sendmail 8 you can try
something like this:
LOCAL_CONFIG
Kpasswd user -m -a@LOCALUSER
Kalias implicit -m -a@LOCALUSER /etc/mail/aliases
Klocal sequence alias passwd
LOCAL_RULESETS
SLocal_check_mail
R$* $: $>CanonAddr $1 canonify sender address
R$+<@$=w.> $@ $>Localokmail $1 local: check user
SLocalokmail
R$+ $: <?> $1
R<?> $- + $* $: <?> $1
R<?> $+ $: <@> $(local $1 $)
R$+@LOCALUSER $@ OK
R$* $#error $@ 4.1.8 $: "450 Unknown user " $1
--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting my time.