Re: [Exim] Released: SpamAssassin at SMTP time in local_scan

Página Inicial
Delete this message
Reply to this message
Autor: Marc MERLIN
Data:  
Para: Frank Heydlauf
CC: exim-users
Assunto: Re: [Exim] Released: SpamAssassin at SMTP time in local_scan
On Tue, May 07, 2002 at 09:35:17AM +0200, Frank Heydlauf wrote:
> On Tue, May 07, 2002 at 12:15:30AM -0700, Marc MERLIN wrote:
> >
> > If so, do you mind looking at my code and suggesting a spiffy way of doing
> > $header ~= /^Message-Id:/ in C?
> > (i.e. caseless string matching, strstr won't do that obviously)
>
> convert to lowercase before comparing.
> tolower(3)               - upper case to lower case letter conversion
> toupper(3)               - lower case to upper case letter conversion


I forgot about these. Gotta make a copy of the data and lowercase it
character per character, but it would work. Thanks.
(you can tell it's been a good 5 years since I've had to program in C :-D)
I'll dig in the exim code, it may already have a function to do this or do
caseless header matching.

I've been scanning through RFC 2822 and it seems to confirm that I indeed
need to accept "Message-ID:" as well as "Message-Id:"
I'll add support for that but it's not critical, very few mails use
alternate case in header names, and if my code can't parse a header, nothing
really bad happens anyway.

Marc
--
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking


Home page: http://marc.merlins.org/ | Finger marc_f@??? for PGP key