[H-GEN] Sieve filters

Harry Phillips harry at tux.com.au
Wed Sep 10 19:33:31 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Harry Phillips wrote:
> 
> I have a catchall account. The Bynari server then collects that mail 
> (using fetchmail). I want the account it passes it to to do some 
> sorting. Easy enough, until you get a single piece of mail sent to two 
> (or more) addresses.
> 
> The first user it matches will get a copy the second user (and any 
> others) won't and none of it gets kept in the INBOX.
> 
> In procmail I would simply use rules such as:
> 
> :0c
> * ^TO_user1@
> ! user1 at localhost
> 
> :0c
> * ^TO_user2@
> ! user2 at localhost
> 
> If all the rules start with :0c
> 1. The mail will hit all the rules
> 2. All the users that it is addressed to will receive a copy, and
> 3. It will fall out bottom into the INBOX.
> 

Just to let everyone know. I found the answer to my Sieve filter 
problem. I read the RFC and it gave good examples there. I combined 
several to get what I want done.

> I have logged a ticket with Bynari asking them, surely they must know 
> what filter rules thier web form generator is attempting to produce (but 
> fails to).
> 

Ha, their developers didn't even know about the rule that allows you to 
trigger a mail rule when something isn't there. I pointed out the 
relevant section in the RFC, they were surprised and will *try* to 
implement it. I also asked about using procmail instead, they didn't 
comment.

To get my problem solved I used one global rule and every individual got 
a rule as well.

The global rule was to send the incoming mail to every single user. The 
individual rules stated that if the message isn't wasn't addressed to 
them then send it to /dev/null.

The one little bug I have is that if sender used the BCC field then the 
user name isn't in the header and the rule deletes the mail when they 
should get it.

-- 
Regards,
Harry Phillips
--- Failure is not an option,
     it comes bundled with your Microsoft product.


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list