Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: mark on February 15, 2007, 10:36:52 PM
-
the greylisting plugin /usr/share/qpsmtpd/plugins/greylisting contains:
# Decline if ALL recipients are whitelisted
if (($transaction->notes('whitelistrcpt')||0) == scalar($transaction->recipients)) {
$self->log(LOGWARN,"all recipients whitelisted - skipping");
return DECLINED;
}
can someone suggest how I could modify this code to return DECLINED if the sender (mail from) contains .nz at the end of the address?
something like:
# Decline if mail from ends in .nz
if ((sender == *.nz)) {
$self->log(LOGWARN,"sender from nz domain - skipping");
return DECLINED;
}
any suggestions appreciated
cheers
Mark Signal
-
Mark,
Have you asked your question on any qpsmtp mailing lists?
-
yup
and this code was suggested:
if ($transaction->sender->format =~ /\.nz>$/i) {
$self->log(LOGWARN, "Sender from NZ - skipping");
return DECLINED;
}
but is doesnt seem to work. Any sufggestions appreciated..
cheers
Mark