4 messages in net.sourceforge.lists.courier-maildrop[maildropl] Filtering Help?
FromSent OnAttachments
Jeff HooverSep 3, 2002 2:24 pm 
Jeff HooverSep 5, 2002 6:50 am 
hzqbbcSep 5, 2002 4:44 pm 
Jeff HooverSep 6, 2002 6:27 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Filtering Help?Actions...
From:Jeff Hoover (jeff@infotechfl.com)
Date:Sep 3, 2002 2:24:41 pm
List:net.sourceforge.lists.courier-maildrop

I was wondering if anyone could help me. I'm trying to find some way to filter messages in a qmail-courier system so that the from domain has to match the to or cc domain (don't ask why) to be delivered. I was told maildrop would be able to do the trick. I looked at the docs and tried to come up with a filter, but have no way of testing it yet (and I'm not quite sure if I understand everything). Would any filtering experts out there take a look at this and tell me if it would work? If not, could you point me in the right direction?

Thanks in advance, Jeff Hoover

# first get the entire from address

if ( /^From: *!.*/ ) { ADDR=getaddr($MATCH2) }

# now we just want the domain

if (($ADDR) =~ /@.*/) { FROM_DOMAIN=$MATCH }

# now compare to see if each to|cc domain matches

foreach /^(To|Cc): .*/ { foreach (getaddr $MATCH) =~ /@.*/ { if ($FROM_DOMAIN eq $MATCH) { cc "Maildir" } else { # log,return message...do nothing? } } }