procmail multiple X-loop records
am 03.07.2005 14:59:42 von Bogart
Can I have multiple X-loop records ?
If not then how could I prevent a mutual
recursion where A forwards to B and B forwards
to A. I can put a line in A's .procmailrc that
says "if there's no xloop for "A has been here"
and similarly for B's but they each can ignore
the other.
for example
for A:
WHOTO=B
:0
* ^X-Loop: Abeenhere
dumpmailhere
:0 fw
* ? /usr/bin/sudo /usr/sbin/sendmail -bv $WHOTO
|formail -A "X-Loop: Abeenhere"
and for B:
the same with B substituted.
Am I right in thinking that the formail -A "X-Loop: Abeenhere"
replaces the X-Loop if there is one present ?
bogey
Re: procmail multiple X-loop records
am 03.07.2005 18:09:33 von AK
Bogart wrote:
> Can I have multiple X-loop records ?
>
> If not then how could I prevent a mutual
> recursion where A forwards to B and B forwards
> to A. I can put a line in A's .procmailrc that
> says "if there's no xloop for "A has been here"
> and similarly for B's but they each can ignore
> the other.
>
> for example
>
> for A:
>
> WHOTO=B
>
> :0
> * ^X-Loop: Abeenhere
> dumpmailhere
>
> :0 fw
> * ? /usr/bin/sudo /usr/sbin/sendmail -bv $WHOTO
> |formail -A "X-Loop: Abeenhere"
>
> and for B:
>
> the same with B substituted.
>
> Am I right in thinking that the formail -A "X-Loop: Abeenhere"
> replaces the X-Loop if there is one present ?
>
> bogey
There is no sure fire way to prevent such a recursion. This situation
can be extended to a -> b -> c -> a atc.
If you see that your server uses many resources to handle such forwards,
you might consider precluding forwarding as an option.
Should such forwarding recursion be setup, the end user will be the
first to notice when a mailing never reaches them.
AK