Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Alex Schaft on November 22, 2005, 11:43:14 AM

Title: White listing with smtpfront-qmail
Post by: Alex Schaft on November 22, 2005, 11:43:14 AM
Hi,

I'm currently using the smtpfront-qmail rbl facility to block spam, which is working very well.

I've now received a letter from Versatel, asking me to white list them due to German law restricting them from fixing the problem.

I've now added a whitelist parameter to the database for smtpfront-qmail, and created a custom script as follows for runenv, using the tried and tested copy someone elses code approach :)

Code: [Select]
{
    my @rbllist = split /:/, ${'smtpfront-qmail'}{RBLList} || '';
    my @whitelist = split /:/, ${'smtpfront-qmail'}{WhiteList} || '';
    if ((scalar @rbllist) || (scalar @whitelist))
    {
        $OUT = 'RBLSMTPD="/usr/local/bin/rblsmtpd ';
        if (scalar @whitelist)
        {
            $OUT .= join " ", map { "-a $_" } @whitelist;
            $OUT .= " ";
        }
        if (scalar @rbllist)
        {
            $OUT .= join " ", map { "-r $_" } @rbllist;
        }
        $OUT .= '"';
    }
    else
    {
        $OUT = "# No RBLs are defined";
    }
}

Does this look right? Thanks go to Ray Mitchell for the original code.

Alex
Title: Re: White listing with smtpfront-qmail
Post by: raem on November 23, 2005, 06:48:35 AM
Elax

> Thanks go to Ray Mitchell for the original code.

That thanks should go to Charlie Brady, Gordon Rowell & others !
Title: ThanksRe: White listing with smtpfront-qmail
Post by: Alex Schaft on November 23, 2005, 07:08:45 AM
Noted. Seem to have missed that on my visits to your
page

Alex