[Mimedefang] which charset is being used in a mail?

Karel.DeBruyne at ua.ac.be Karel.DeBruyne at ua.ac.be
Mon May 13 09:27:20 EDT 2002


I always had the impression I should do the tasks on the complete message
in filter_begin and the tasks for each attachement in filter

So, I am checking with spamassassin in filter_begin.
The load caused by spamassassin is high (people tell me), so I don't check
each message with spamassassin.
Lately, I am getting a lot of spam in non-european charsets, so I would
like to decide in the filter_begin...

Any advice on this ?

Thanks a lot,

Karel

On Mon, 13 May 2002, David F. Skoll wrote:

> On Mon, 13 May 2002 Karel.DeBruyne at ua.ac.be wrote:
>
> > Is there a way to find out the charset of the first (and often only) part
> > in filter_begin ?
>
> Yes, if you use the MIME::Tools functions.  It's a bit messy, so I will
> not demonstrate how. :-)
>
> But why do you need it in filter_begin?  You could do it like this:
>
> sub filter_begin {
> 	$FirstPass = 1;
> }
>
> sub filter {
> 	# ...
> 	if ($FirstPass) {
> 		# Do something with charset
> 	}
> 	$FirstPass = 0;
> }
>
> sub filter_end {
> 	# Decide something based on charset?
> }
>
> Remember, by the time mimedefang.pl is invoked, almost all of milter
> has happened and sendmail is just waiting for the return from
> smfi_eom.  So you gain virtually no performance benefits by trying
> to cram everything into filter_begin.  If you organize the rest
> of your filter carefully, you can skip unnecessary processing once
> a discard or bounce decision has been taken.
>
> Regards,
>
> David.
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>

=======================================================================
Karel De Bruyne
System/Network Manager                      phone      + 32 3 820 22 04
UIA - Network Service                       fax        + 32 71 83 43 00
Universiteitsplein 1 - B0.12                email  dbruyne at uia.ua.ac.be
B 2610 Wilrijk - Belgium              http://www.uia.ua.ac.be/u/dbruyne
=======================================================================




More information about the MIMEDefang mailing list