procmail
[Top] [All Lists]

Re: retrieve a collective-box and distribute to the users

2001-08-21 08:21:27
Here is one suggestion:

------------------

:0 c
* (^TO_|^.*for\ *<?)\/(aaa(_at_)domain\(_dot_)de)
{
   # Remove duplicates:
   :0 Wh: msgid.lock
   | formail -D 8192 $HOME/$MATCH/msgid_cache

   :0 E
   ! $MATCH
}

:0 c
* (^TO_|^.*for\ *<?)\/(bbb(_at_)domain\(_dot_)de)
{
   # Remove duplicates:
   :0 Wh: msgid.lock
   | formail -D 8192 $HOME/$MATCH/msgid_cache

   :0 E
   ! $MATCH
}

:0
* (^TO_|^.*for\ *<?)\/(ccc(_at_)domain\(_dot_)de)
{
   # Remove duplicates:
   :0 Wh: msgid.lock
   | formail -D 8192 $HOME/$MATCH/msgid_cache

   :0 E
   ! $MATCH
}


Best regards,
Klas
--
Klas Brink                  GSM:    +46 701 808 502
BitSim AB                  Office: +46 8 54 55 56 00
St Eriksgatan 33        Fax:    +46 8 54 55 56 11
112 39 Stockholm       Work:   +46 8 719 54 52
Sweden                       www:    www.bitsim.com

Uwe KLAUS wrote:

Hi,
We have a collective mailbox by our ISP (all mail to xyz(_at_)domain(_dot_)de 
goes
in this box).
User ddd fetches all messages. His procmailrc is as this:
VERBOSE=on
LOGABSTRACT=all
LOGFILE=/home/ddd/procmail
MAILDIR=/var/spool/mail

:0
* ^TO_aaa
! aaa

:0
* ^TO_bbb
! bbb

:0
* ^TO_ccc
! ccc
#the rest is for user ddd himself.

This rule works fin, but - when someone writes a messages to two users
in our domain, in example to aaa(_at_)domain(_dot_)de AND 
bbb(_at_)domain(_dot_)de, the both
adresses are in two mails. Therefore rule one matches by both mail and
so user aaa becomes two mails and user bbb none.
When I change the rules, not to move the mails but to copy them, both
users become the mail twice.
Do you have any Solution?
Thank You
Uwe KLAUS
and
PLEASE FORGIVE MY STUPID ENGLISH
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail