1 Apr 2011 21:38
postfix+tmda-postfix-policy.sh
Darek M <fafaforza <at> gmail.com>
2011-04-01 19:38:25 GMT
2011-04-01 19:38:25 GMT
Hi there,
I think I'm missing a step in this policy script. In this bit of
code, which is pretty much the meat and potatoes of the whole thing:
tmda-filter -M $recip $sender | grep MATCH | grep -q bounce$
## If they find something in the filters, dispose of the message.
if [ $? = 0 ]; then
[ -n "$LOGGER" ] && $LOGGER -p mail.info -t postfix/tmda \
"Rejecting email recieved from $sender to $recip"
echo "action=reject Message rejected by recipient (TMDA)."
echo
else
[ -n "$LOGGER" ] && $LOGGER -p mail.info -t postfix/tmda \
"Permitting email recieved from $sender to $recip"
echo action=permit
echo
fi
If I put a sender address in the 'bounce' filter file, it gets rejected at SMTP.
But if the address isn't listed anywhere (the "else" block), the
message gets passed right on through to the inbox. Am I reading this
right? Where is the challenge created? I must be missing a step as
it seems the script only checks if a sender is explicitly blacklisted,
and if not, the mail is permitted.
--
--
Darek
(Continue reading)
RSS Feed