[Mimedefang] redirect spam for a single domain to another recipient
Marcus Schopen
lists at localguru.de
Thu Apr 3 04:46:01 EDT 2014
Hi Steffen,
Am Donnerstag, den 03.04.2014, 08:10 +0200 schrieb Steffen Kaiser:
> On Wed, 2 Apr 2014, Marcus Schopen wrote:
>
> > I use stream_by_domain and like to redirect/move spam for a single
> > domain to a special recipient/mailbox and collect it there. Any better
> > code possible?
> >
> > sub filter_end {
> > [...]
> > if ($Domain eq 'mydomain.de' && $hits >= 5) {
> > foreach $recip (@Recipients) {
> > delete_recipient($recip);
> > }
> > add_recipient('spambox');
> > }
>
> Looks good for me. About "$Domain": I'm not sure, whether or not the
> domain is always lower-case and never has a dot at the end, therefore I
> always lower-case domains names and accept an additional final dot, e.g.:
>
> $Domain =~ /\Amydomain\.de\.?\z/i
That's a good point!
> Cosmetic: foreach my $recip ...
> or delete_recipient($_) for @Recipients;
Thanks,
Marcus
More information about the MIMEDefang
mailing list