David Lowe <dlowe(_at_)sirius(_dot_)com> writes:
I'm looking into using procmail as my local mail delivery agent. The main
reason is that I would like to restrict off-site users from 'bouncing'
mail off our servers without breaking the functionality of .forward files.
I was wondering if anyone had had any luck at getting procmail, rather
than sendmail, to handle users' .forward files. I can get rudimentary
(just forward if the file contains a single valid address) support using:
This sounds very much like you're using sendmail's check_* rulesets to
prevent off-site users from sending to off-site users, and have found
that your rules reject off-site users trying to mail to on-site
addresses that forward to off-site. The solution to this is to compare
${client_addr} to "0", as that what it will be set to during alias
expansion. For example, the check_rcpt ruleset in use here says (in
part):
...
# Not a local rcpt, check the client address
R$* $: $(dequote "" $&{client_addr} $)
R138.236.$-.$- $@ OK local
R127.0.0.1 $@ OK local
R0 $@ OK alias expansion
...
If I've mis-read your reasons for doing this, then perhaps you could
explain _why_ you would do this, as I have a strong suspicion that
there's a better way to do this.
Philip Guenther