[Mimedefang] Filter by sender/recipient
Richard Whelan
richard.whelan at pipex.net
Thu Oct 14 11:20:17 EDT 2004
Hi David, Jim
Thanks for your answers.
>On Thu, 14 Oct 2004, Jim McCullars wrote:
>
>
>
>>sub filter_recipient {
>> my ($recipient, $sender, $ip, $hostname, $first, $helo,
>> $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
>>
>>
>
>
>
>> if($recipient =~ /<?postmaster\@/i) {
>> return('ACCEPT_AND_NO_MORE_FILTERING', "ok")
>> }
>> return ('CONTINUE', "ok");
>>}
>>
>>
>
>
>
I already use filter_recipient so I can slot this in nicely.
>That works perfectly.
>
>But you'd better hope that spammers and virus-writers don't discover
>that you're doing it, because then they can inject spam to anyone at all
>as long as they include postmaster in the list of recipients.
>
>
>
Virus scanning isn't a problem. It's done on a separate system after
going through these systems.
>I would rather do this: In filter_begin, filter, filter_multipart
>and filter end:
>
> if ($#Recipients == 0 && $Recipients[0] =~ /<?postmaster\@/i) {
> # Skip processing
> return;
> }
>
>It involves more overhead than Jim's solution (because the message is still
>parsed into MIME parts), but is a bit safer.
>
>
>
The systems I have are not the most powerful around, so, for the moment,
I'd rather stick with the solution that has the least overhead, but when
I do upgrade to something a little more robust, I will possibly work
this in instead.
>Regards,
>
>David.
>
>
thanks again for you quick responses.
Cheers,
Richard
>_______________________________________________
>Visit http://www.mimedefang.org and http://www.canit.ca
>MIMEDefang mailing list
>MIMEDefang at lists.roaringpenguin.com
>http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
>
>
--
Richard Whelan
Senior Systems Administrator
PIPEX
Direct: +44 (0) 1865 381568
Mobile: +44 (0) 7786 276020
website: http://www.pipex.net/
This e-mail is subject to: http://www.pipex.net/disclaimer.html
More information about the MIMEDefang
mailing list