procmail
[Top] [All Lists]

Re: Multiple sort lines problem

2009-05-28 14:28:52
At 17:32 2009-05-28 +0100, Arthur Dent wrote:
Thanks for that. If you see my post, which must have crossed with yours,

As your signed messages have been arriving as attachments, which I generally avoid entirely, I must admit that I haven't read all of your messages.

:0:
* 1^0 ^TO_(me|myothername)\@(mymail|mydomain)
* 1^0 ^Received.*for..(me|myothername)\@(mymail|mydomain)
INBOX/Me

I had never come across scoring before today.
Can you explain the significance of 9876543210 in your recipe vs the 1
in mine?

As I said, it exceeds the "maximal" scoring value (which is 2 to the 31st power - something over 2 billion), and thus stops evaluating scored conditions because that large value says "true enough" for the entire condition set. Your score value - a very low number - means that each condition will be resolved. When you're doing a simple OR, maximal is the way to go. Lower values such as yours are useful when you want to be able to see all the conditions that did mach, when using verbose logging, or if you're using scoring to perform weighted operations (1 point for each recipient identified, minus 5 points for each recipient at your domain, and if still positive, perhaps you consider it spammy) or additive operations (start with a negative initial value and add points for each thing that matches, and if that pushes it into positive territory, then the rule is treated as a TRUE condition, and the action is performed).

'man procmailsc'

> BTW, it really appears as if you're using procmail as an MTA - trying to

Fair point... I have however been using this method quite successfully
in my little family server without problem for some years now. In truth
the recipes are a little more complex than I have portrayed here and
make use of some copy commands as well as delivery commands to overcome
the problem you rightly point out.

To: user1(_at_)example(_dot_)com
Bcc: user2(_at_)example(_dot_)com

or

To: somelist
Bcc: user1(_at_)example(_dot_)com, user2(_at_)example(_dot_)com

Remember that Bcc: doesn't show up on legitimate recieved messages - I'm using it above in that those local recipients would be identified in the SMTP envelope when the messages is received by your MTA. When there are multiple local recipients on a single message, you can generally figure that there won't be a Received line with a "for someaddress(_at_)yourdomain(_dot_)example(_dot_)com" bit in it.

Generally, people using Procmail as an MTA will get more than one message into the first matching mailbox, and nothing into the second (even if it is a clear cc:). Since the messages deliver to a single local user, often you do not get multiple messages to process. With other configurations, sometimes people do. MTAs - applications which are aware of the envelope information - make the best MTAs.

I admit it's not perfect but it works
for me and it's an awful lot easier than trying to get to grips with
Sendmail!

Creating local accounts for users so that they can each access their mail isn't a function of Sendmail - it's basic system administration. Using aliases or virtusertable in Sendmail is also quite trivial. If procmail is your LDA, then you can set up a global procmailrc to handle spam and malware checking before delivery to the individual user mailboxes.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
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>