Hi All,
Right now I have a global account which reside in my ISP's server, and I twice a day get all my emails using fetchmail + cron and delivered them to each mailbox using procmail.
Right now I'm using an abundant rules to check agains 'To' and 'Received' header from incoming mails as shown below
==================== :0 * ^To:.+a@domain.com ! a@domain.com
:0 * ^Received:.+a@domain.com ! a@domain.com
:0 * ^To:.+a@domain.com ! a@domain.com
:0 * ^Received:.+a@domain.com ! a@domain.com
. . . . ====================
This rule is very inefficient. As I create new user, I have to add two additional rule entry. Is there any regex alternative to my problem ?
Thanks,
Dino
On Friday 11 May 2007, Linux Geeks wrote:
Hi All,
Right now I have a global account which reside in my ISP's server, and I twice a day get all my emails using fetchmail + cron and delivered them to each mailbox using procmail.
Right now I'm using an abundant rules to check agains 'To' and 'Received' header from incoming mails as shown below
====================
:0
- ^To:.+a@domain.com
! a@domain.com
:0
- ^Received:.+a@domain.com
! a@domain.com
====================
This rule is very inefficient. As I create new user, I have to add two additional rule entry. Is there any regex alternative to my problem ?
Try
:0 * (^To|^Received):.+a@domain.com ! a@domain.com
Anne
On Friday 11 May 2007, Anne Wilson wrote:
On Friday 11 May 2007, Linux Geeks wrote:
Hi All,
Right now I have a global account which reside in my ISP's server, and I twice a day get all my emails using fetchmail + cron and delivered them to each mailbox using procmail.
Right now I'm using an abundant rules to check agains 'To' and 'Received' header from incoming mails as shown below
====================
:0
- ^To:.+a@domain.com
! a@domain.com
:0
- ^Received:.+a@domain.com
! a@domain.com
====================
This rule is very inefficient. As I create new user, I have to add two additional rule entry. Is there any regex alternative to my problem ?
Try
:0
- (^To|^Received):.+a@domain.com
! a@domain.com
This may be a mixture of methods, so may not work. I use structures like
${MAILDIR}.INBOX.Design/
in the destination line.
Anne
On 5/11/07, Anne Wilson cannewilson@googlemail.com wrote:
Try
:0
- (^To|^Received):.+a@domain.com
! a@domain.com
Anne
Hi Anne,
Thanks... it's working :)
I try to simplify & generalize the rule again using...
============================ :0 * (^To|^Received):.+/.+@domain.com ! $MATCH ============================
and it got send also, but when I check my mail queue... it also send to another domain's emails that enlisted also in "To", like user1@domain2.com, user2@domain3.com. Since I only want it to send to user@domain.com it is failing. What's wrong with the MATCH variable & it's rule ?
On Friday 11 May 2007, Linux Geeks wrote:
On 5/11/07, Anne Wilson cannewilson@googlemail.com wrote:
Try
:0
- (^To|^Received):.+a@domain.com
! a@domain.com
Anne
Hi Anne,
Thanks... it's working :)
I try to simplify & generalize the rule again using...
============================
:0
- (^To|^Received):.+/.+@domain.com
! $MATCH
and it got send also, but when I check my mail queue... it also send to another domain's emails that enlisted also in "To", like user1@domain2.com, user2@domain3.com. Since I only want it to send to user@domain.com it is failing. What's wrong with the MATCH variable & it's rule ?
Would you be prepared to send me the recipe, unchanged, off-list. Maybe if I could look at the whole I'd be able to spot the problem.
Anne