procmail
[Top] [All Lists]

Re: "Synchronizing" mail in 2 accounts

2000-02-02 04:11:25
On Tue, 1 Feb 2000 13:21:55 -0500 (EST),
"Colin J. Raven" <cjraven(_at_)ddf-lab(_dot_)com> wrote:
:0 c
! user(_at_)account2
# wont send anything that originally came from account2
* !^X-Loop: user(_at_)account2

Oog. Conditions go +before+ the action. And for the X-Loop to be
useful to prevent mail loops, you should +add+ the X-Loop thing when
forwarding. Annnd, you should check against your local X-Loop header
instead (or, also):

    :0c
    * ! ^X-Loop:[       ]*user(_at_)account1
    * ! ^X-Loop:[       ]*user(_at_)account2
    | formail -A "X-Loop: user(_at_)account1" \
      | $SENDMAIL $SENDMAILFLAGS user(_at_)account2

Anyway, if you look at the procmailex(5) example, it should tell you
everything you need to know.

#What happens if user is sent mail to both, or sent to 1 and Cc'd to 2

You get two copies to both accounts. One original and one forward from
the other account. You can use Message-Id duplicate checking to
automatically throw away duplicates, of course, but it's hard to
prevent the duplicate from being sent in the first place. (Consider
the old BCC scenario. Read the FAQ if you aren't familiar with the Bcc
header and why it's problematic.

/* era */

Um, the FAQ is at <http://www.iki.fi/era/procmail/mini-faq.html> --
and yes, the periodic reminder should have been posted a few days ago,
but the host where this all is supposed to be happening is down for
maintenance a lot these days :-(

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

<Prev in Thread] Current Thread [Next in Thread>