OT: Reject non local users with sendmail, help
Pentland G.
G.Pentland at soton.ac.uk
Fri Oct 20 13:02:42 IST 2006
I use the following code, with /etc/mail/usermap as a hash map generated
every 10 minutes.
Gary
LOCAL_CONFIG
# Usermap - for my code later
Kusermap hash -T<TMPF> /etc/mail/usermap
LOCAL_RULE_0
SLocal_check_rcpt
R$* $: $>3 $1
R$* < @ $=w . > $* $@ $>user_unknown $1 # Is in
@ class=w do passwd lookup
Suser_unknown
R$* $: $>3 $1
R$* <@ $+ > $* $: $1 # Dicard
host part of address
R$+ $: $(isalias $1 $: $1 $) # call
isalias for stuff with a . in
R$+ @ $* $: $>check_rcpt $1 @ $2 . # If
isalias returns a full email address, jump through loop again
RRELAY $#RELAY
R$+ $: $(usermap $1 $: notfound $) #call
passwd lookup for whats left
Rnotfound $#error $@ 5.1.3 $: "User does not exist
at this site"
More information about the MailScanner
mailing list