Procmail Regex
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 [at] domain\.com
! a [at] domain.com
:0
* ^Received:.+a [at] domain\.com
! a [at] domain.com
:0
* ^To:.+a [at] domain\.com
! a [at] domain.com
:0
* ^Received:.+a [at] domain\.com
! a [at] 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
Sorry.. I wrongly typed my rules..
Regards,
Dino
On May 11, 12:06 pm, Indo Geek <indolinux.ge... [at] gmail.com> 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 [at] domain\.com
> ! a... [at] domain.com
>
> :0
> * ^Received:.+a [at] domain\.com
> ! a... [at] domain.com
>
> :0
> * ^To:.+b [at] domain\.com
> ! a... [at] domain.com
>
> :0
> * ^Received:.+b [at] domain\.com
> ! a... [at] 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
Indo Geek <indolinux.geeks [at] gmail.com> 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