Koozali.org: home of the SME Server

modifying the greylisting plugin

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
modifying the greylisting plugin
« 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

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
modifying the greylisting plugin
« Reply #1 on: February 15, 2007, 11:05:55 PM »
Mark,

Have you asked your question on any qpsmtp mailing lists?
Regards,
William

IF I give advise.. It's only if it was me....

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
modifying the greylisting plugin
« Reply #2 on: February 22, 2007, 10:31:28 AM »
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