[Kolab-devel] Testing the email filter setups
Bernhard Reiter
bernhard at intevation.de
Fri Dec 17 20:01:06 CET 2004
Got fed up with manual test mails
and started a script that can later be extended
to generated various test cases for the email
filter setup. This shall help to test that the
email filter setup works.
It is rudimentary in CVS:
/utils/testing
Added Files:
send_filtertest_emails.py
Log Message:
Added send_filtertest_emails.py to start a framework for creation
of test message that test kolabfilter and the mail setup.
On Friday 17 December 2004 15:07, Bernhard Reiter wrote:
> This commit seems to be a regression in that case sensitive from from:
> comparison fail again. :-(
>
> On Tuesday 23 November 2004 12:48, cvs at intevation.de wrote:
> > Author: steffen
> >
> > /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/r
> >es mgr/kolabfilter.php,v retrieving revision 1.9
> > retrieving revision 1.10
> > diff -u -d -r1.9 -r1.10
> >
> > @@ -84,16 +102,13 @@
> > $line = rtrim( $buffer, "\r\n");
> > if( $line == '' ) {
> > // Done with headers
> > - } else if( eregi( '^From:(.*)', $line, $regs ) ) {
> > - $adrs = imap_rfc822_parse_adrlist($regs[1],
> > $params['email_domain']); - foreach( $adrs as $adr ) {
> > - $from = strtolower($adr->mailbox.'@'.$adr->host);
>
> $from has been transformed to lowercase in the old version
>
> > - if( !verify_sender( $sender, $from) ) {
> > - myLog("Invalid From: header. $from does not match envelope $sender\n",
> > RM_LOG_DEBUG); - fwrite(STDOUT,"Invalid From: header. $from does not
> > match envelope $sender\n"); - exit(EX_UNAVAILABLE);
> > - }
> > - }
> > + } else if( $params['verify_from_header'] && eregi( '^From:(.*)',
> > $line, $regs ) ) { + $from = $regs[1];
>
> Here it is not lowercases as far as I can see.
> Shouldn't this be
> $from = strtolower($regs[1]);
> ?
>
> > + if( !verify_sender( $sender, $from) ) {
> > + myLog("Invalid From: header. $from does not match envelope
> > $sender\n", RM_LOG_DEBUG); + fwrite(STDOUT,"Invalid From: header.
> > $from does not match envelope $sender\n"); + exit(EX_UNAVAILABLE);
> > + }
> > } else if( eregi( '^Content-Type: text/calendar', $line ) ) {
> > $ical = true;
> > }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2145 bytes
Desc: signature
URL: <http://lists.kolab.org/pipermail/devel/attachments/20041217/d95b64a9/attachment.p7s>
More information about the devel
mailing list