Procmail Regex

Procmail Regex

am 11.05.2007 07:06:54 von Indo Geek

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

Re: Procmail Regex

am 11.05.2007 07:17:52 von Indo Geek

Sorry.. I wrongly typed my rules..

Regards,

Dino

On May 11, 12:06 pm, Indo Geek 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
>
> :0
> * ^To:.+b@domain\.com
> ! a...@domain.com
>
> :0
> * ^Received:.+b@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

Re: Procmail Regex

am 11.05.2007 11:24:08 von chris-usenet

Indo Geek wrote:
> 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

[...]

> 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 ?

Fetchmail will do this for you without needing recourse to procmail.
Take a look at the manpage, with a particular eye on an options string
such as "user 'yourdomain.com' there is * here".

Chris