Re: [Mimedefang] filter based on From/To headers?

2004-05-10 Thread Kelsey Cummings
On Mon, May 10, 2004 at 01:33:12PM -0500, Damrose, Mark wrote: > Are you sure they all have the hostname at the point MD sees them? > Could your sendmail be re-writing e.g. > to: undisclosed-recipients > as > to: [EMAIL PROTECTED] > after MD returns? Mark - good catch. I wouldn't have guessed th

RE: [Mimedefang] filter based on From/To headers?

2004-05-10 Thread Damrose, Mark
> -Original Message- > From: Kelsey Cummings [mailto:[EMAIL PROTECTED] > Sent: Monday, May 10, 2004 1:01 PM > To: [EMAIL PROTECTED] > Subject: Re: [Mimedefang] filter based on From/To headers? > > > The only thing I can figure now is > that the HEADERS >

Re: [Mimedefang] filter based on From/To headers?

2004-05-10 Thread Kelsey Cummings
On Fri, May 07, 2004 at 11:21:17AM -0700, Kelsey Cummings wrote: > On Fri, May 07, 2004 at 07:54:15PM +0200, Dirk Mueller wrote: > > On Friday 07 May 2004 19:33, Kelsey Cummings wrote: > > > > > next unless /^(To|From|Cc):/; > > > > you're missing /i > > I got the impression that

Re: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread Kelsey Cummings
On Fri, May 07, 2004 at 07:54:15PM +0200, Dirk Mueller wrote: > On Friday 07 May 2004 19:33, Kelsey Cummings wrote: > > > next unless /^(To|From|Cc):/; > > you're missing /i I got the impression that the headers had been normalized by MD. I'm checking case insensitive now and wi

Re: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread Kelsey Cummings
On Fri, May 07, 2004 at 01:40:10PM -0400, David F. Skoll wrote: > On Fri, 7 May 2004, Kelsey Cummings wrote: > > > David, are there any circumstances when MD will not write out a HEADERS > > file? > > I don't think so. What error gets logged? No errors at all. I was thinking maybe HEADERS migh

Re: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread Dirk Mueller
On Friday 07 May 2004 19:33, Kelsey Cummings wrote: > next unless /^(To|From|Cc):/; you're missing /i ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/

RE: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread Damrose, Mark
> -Original Message- > From: Kelsey Cummings [mailto:[EMAIL PROTECTED] > Sent: Friday, May 07, 2004 12:34 PM > > David, are there any circumstances when MD will not write out > a HEADERS > file? I've got mail passing through the system that my code in > filter_begin doesn't seem to see. >

Re: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread David F. Skoll
On Fri, 7 May 2004, Kelsey Cummings wrote: > David, are there any circumstances when MD will not write out a HEADERS > file? I don't think so. What error gets logged? Regards, David. ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDef

Re: [Mimedefang] filter based on From/To headers?

2004-05-07 Thread Kelsey Cummings
On Wed, May 05, 2004 at 05:45:18PM -0400, David F. Skoll wrote: > On Wed, 5 May 2004, Michael Sims wrote: > > > One caveat: I believe it is possible for the To header to contain > > multiple lines. > > When MIMEDefang writes the HEADERS file, it explicitly "unwraps" the > lines to ensure that exa

RE: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread Michael Sims
David F. Skoll wrote: > On Wed, 5 May 2004, Michael Sims wrote: > >> One caveat: I believe it is possible for the To header to contain >> multiple lines. > > When MIMEDefang writes the HEADERS file, it explicitly "unwraps" the > lines to ensure that exactly one complete header appears on each line.

Re: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread Kevin A. McGrail
2001-06-30 David F. Skoll <[EMAIL PROTECTED]> * mimedefang.c (header): Removed embedded newlines and carriage returns so all headers in the HEADERS file are guaranteed to exist on a single line. (Makes parsing headers from Perl easier.) (header): Earlier closing

RE: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread Michael Sims
Kelsey Cummings wrote: > On Wed, May 05, 2004 at 04:10:46PM -0500, Michael Sims wrote: >> Kelsey Cummings wrote: >>> I need to check for 'invalid' From and To headers in our inbound >>> email (primarily to catch spam that inserts >>> '[EMAIL PROTECTED]' into either header.) Does anyone have >>> an

RE: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread David F. Skoll
On Wed, 5 May 2004, Michael Sims wrote: > One caveat: I believe it is possible for the To header to contain > multiple lines. When MIMEDefang writes the HEADERS file, it explicitly "unwraps" the lines to ensure that exactly one complete header appears on each line. Regards, David. _

Re: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread kamal
One caveat: I believe it is possible for the To header to contain multiple lines. Each subsequent line should have a tab character at the beginning. As far as I remember, the HEADERS file has one line per header. ___ Visit http://www.mimedefang.org and h

Re: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread Kelsey Cummings
On Wed, May 05, 2004 at 04:10:46PM -0500, Michael Sims wrote: > Kelsey Cummings wrote: > > I need to check for 'invalid' From and To headers in our inbound email > > (primarily to catch spam that inserts '[EMAIL PROTECTED]' into > > either header.) Does anyone have an example of how they did this

RE: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread Michael Sims
Kelsey Cummings wrote: > I need to check for 'invalid' From and To headers in our inbound email > (primarily to catch spam that inserts '[EMAIL PROTECTED]' into > either header.) Does anyone have an example of how they did this or > pointers on where to wedge it in? You basically need to open and

Re: [Mimedefang] filter based on From/To headers?

2004-05-05 Thread kamal
I need to check for 'invalid' From and To headers in our inbound email (primarily to catch spam that inserts '[EMAIL PROTECTED]' into either header.) Does anyone have an example of how they did this or pointers on where to wedge it in? open FH, " my($from); while(){ if($_ =~ /^from:/i){ $from=