[Greylist-users] Re: greylisting and per-message sender ids

Ken Raeburn raeburn at raeburn.org
Sat Oct 11 19:06:45 PDT 2003

I found I needed to tweak my substitution function a little, because
it didn't deal correctly with cases like "<>" with no "@" in them, and
I found another pattern used by the lists.math.uh.edu mailer.

    sub do_verp_substitutions {
        my ($x) = @_;
        my ($localpart, $hostpart) = split("@", $x, 2);

        if (!defined $hostpart) {
            return $x;

        # The most popular form seems to be
        # "listid-msgnumber-encodedrecipient at listhost".  The message
        # number has dashes before and after it.
        $localpart =~ s/-[0-9][0-9]*-/-#-/g;

        # Do it again in case there are three such blocks strung together,
        # as in Yahoo Groups sender ids.
        $localpart =~ s/-[0-9][0-9]*-/-#-/g;

        # The mailer used at lists.math.uh.edu for the Gnus developers'
        # list uses these forms.  Not sure what list package they're using.
        $localpart =~ s/\+M[0-9][0-9]*$/+M#/;
        $localpart =~ s/\+M[0-9][0-9]*=/+M#=/;

        return "$localpart\@$hostpart";

So far, still no spam has matched that wouldn't have already.

More information about the Greylist-users mailing list