procmail
[Top] [All Lists]

Emails delivered twice

2008-05-15 03:04:56
Dear all,

I am struggling to get my email processing just right.
The problem I'm working on now is that although I have my own domain, and
all email addresses are valid (user1(_at_)domain(_dot_)com, 
blablablah(_at_)domain(_dot_)com,
etc.), I get them all forwarded to a single pop3 mailbox and pick them up
via fetchmail. (Fetchmail was having trouble with the pop3 server on THAT
host, but not the one on the other host. But I only have one pop3 mailbox
on the "good" host.)

Anyway, I get mail for me and family members. If a mail comes in for only
one of us, my existing recipes can handle that. BUT, if I get an email to
two or more of us, I need to make sure we each get a copy, which is not
happening with my simple system.

ALSO, if the email is not addresses to any one individual, then it's mine
(I register for websites with unique email addresses, like
company(_at_)domain(_dot_)com)

So, I am developing a solution, using a testbed as described in
http://lipas.uwasa.fi/~ts/info/proctips.html#testbench

My procmailrc file looks like:

---------------------------------------------------------
SHELL=/bin/sh
TESTDIR=${HOME}/test
MAILDIR=${TESTDIR}
LOGFILE=${TESTDIR}/Proctest.log
LOG="--- Logging for ${LOGNAME}, "

#Troubleshooting:
VERBOSE=yes
LOGABSTRACT=all

:0c
* ^TO_mandy
{ MANDY=1 }

:0c
* ^TO_garth
{ GARTH=1 }

:0c
* ^TO_nancy
{ NANCY=1 }

:0c
* ^TO_ally
{ ALISTAIR=1 }
:0c
* ^TO_alistair
{ ALISTAIR=1 }

:0:
* ! GARTH ?? ^^^^
${TESTDIR}/GARTH

:0:
* ! NANCY ?? ^^^^
${TESTDIR}/NANCY

:0:
* ! MANDY ?? ^^^^
${TESTDIR}/MANDY

:0:
* ALISTAIR ?? 1
* ! ALISTAIR ?? ^^^^
${TESTDIR}/ALISTAIR

:0:
* NANCY ?? ^^^^
* GARTH ?? ^^^^
* MANDY ?? ^^^^
* ALISTAIR ?? ^^^^
${TESTDIR}/DEFAULT

:0
/dev/null
---------------------------------------------------------

So, I set some variables, then test them. If any are set, it indicates
that we deliver to that mailbox (this is a testbench setup, so I'm using
temporary locations)

BUT, when I put my email message in:

---------------------------------------------------------
Received: from 208.49.148.34
        (SquirrelMail authenticated user allym)
        by oof.yarwl.org with HTTP;
        Wed, 14 May 2008 10:07:12 +0100 (BST)
Message-ID: 
<7627(_dot_)208(_dot_)49(_dot_)148(_dot_)34(_dot_)1210756032(_dot_)squirrel(_at_)oof(_dot_)yarwl(_dot_)org>
Date: Wed, 14 May 2008 10:07:12 +0100 (BST)
Subject: test
From: "Alistair McDonald" <alistair(_at_)yarwl(_dot_)com>
To: mandy(_at_)yawrl(_dot_)com,
 garth(_at_)yawrl(_dot_)com,
 alistair(_at_)yawrl(_dot_)com
Reply-To: alistair(_at_)yawrl(_dot_)com
User-Agent: SquirrelMail/1.4.13
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal

It's a test


-- 
Author of the SpamAssassin book: (http://www.packtpub.com/spamassassin/)
Tel: 07017 467 396 (Office) / 07812 829 020 (Mobile)
---------------------------------------------------------

then I have two problems:
1: the DEFAULT processing is hit, but it shouldn't be
2: ALISTAIR gets one copy of the email, but MANDY gets two, and GARTH gets
four!


I'm hoping it's an easy one to solve, if you can help then I'd be vrey
grateful.

Cheers,

Alistair


-- 
Alistair McDonald, InRevo Ltd (http://www.inrevo.com)
Author of the SpamAssassin book: (http://www.packtpub.com/spamassassin/)
Tel: 07017 467 396 (Office) / 07812 829 020 (Mobile)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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