Wouter van der Horst wrote:
--=====================_2981497==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
thanks Collin,
maybe i've taken a bit of a roundabout way of describing the situation.
actually it seems quite simple; any mail for my *(_at_)anakha(_dot_)net
friends
should be sent to them. any other mail, including directly to
wouter(_at_)anakha(_dot_)net, should be left in the inbox (even to addresses
which
do not exist).
That's different from what you said earlier :^<
Let me refer you to Jari Aalto's procmail tips page:
http://www.procmail.org/jari/pm-tips.html
for a lot of useful tips.
terminology there - MTA? how could that help me?
that's sendmail, qmail, smail, postfix, exim or whatever.
sendmail has "virtual hosting" or "virtual domains" or something like
that, which might do a better job of routing mail addressed to
*(_at_)anakha(_dot_)net . You now know as much as I do about it....
2. What if people are on mailing-lists? For example, this email
wouldn't match
* ^TO_wouter(_at_)anakha(_dot_)net
. I will ignore this problem for the moment.
?!?! yes it does - i received it twice, that means it triggered at least
_one_ recipe in my .procmailrc (the one you have).
Not necessarily. Consider the following .procmailrc file:
:0c
! ^TO_wouter(_at_)anakha(_dot_)net
{
#things that don't deliver
}
then you will get two copies. Why? Because the 'c' will cause
procmail to "fork" (in the sense of fork(2)); now there are 2 copies
of procmail. Both copies run off the bottom of .procmailrc and put
the result into $DEFAULT (i.e., your mailbox). Note that the mail has
not matched anything at all, yet you can still get two copies.
To see if a mail matches a condition, turn on VERBOSE (see Jari's
tips) and look at the logfile to see what matched. If a mail doesn't
match anything and "falls off" the bottom of .procmailrc, then it will
land in your mailbox.
...
i still can't believe something that seems so simple is so
hard to figure out...
(boy this is getting long!)
i played with it a bit more, and came up with this:
:0:
* !^TO_*wouter(_at_)anakha(_dot_)net
* ^TO_*(_at_)anakha(_dot_)net
{
:0c:
* ^TO_*famke(_at_)anakha(_dot_)net
! m(_dot_)mesch(_at_)wanadoo(_dot_)nl
:0:
* ^TO_*matthijs(_at_)anakha(_dot_)net
! matthijs(_dot_)sneijders(_at_)chorusgroup(_dot_)com
}
:0E:
{
:0c:
* ^TO_*famke(_at_)anakha(_dot_)net
! m(_dot_)mesch(_at_)wanadoo(_dot_)nl
:0c:
* ^TO_*matthijs(_at_)anakha(_dot_)net
! matthijs(_dot_)sneijders(_at_)chorusgroup(_dot_)com
}
What version of procmail are you using? Is it one that understands
"^TO_" ? If so, then you should say
^TO_famke(_at_)anakha(_dot_)net
not
^TO_*famke(_at_)anakha(_dot_)net
The logfile (with verbose on) will help you understand why.
this should do the trick (even though it's not elegant)
but it doesn't! i get messages from this list and my
own test messages, as well as other email, twice.
I don't see how the above .procmailrc could cause this result. Turn
on VERBOSE and look at the log file.
what gives?
does the c flag make a copy on a non-match as well then?
It should not.
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail