procmail
[Top] [All Lists]

RE: Newbie researching

2003-04-17 14:21:26


-----Original Message-----
From: PSE-L(_at_)mail(_dot_)professional(_dot_)org 
[mailto:PSE-L(_at_)mail(_dot_)professional(_dot_)org]
Sent: Thursday, April 17, 2003 12:34 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Newbie researching


At 15:54 2003-04-17 +0700, Indramin Darmadi did say:

But that would require to setup an alias for each user, right?

Indeedy - although the entire configuration would still exist in one file 
(/etc/mail/aliases).  Of course, handling it within an /etc/procmailrc 
poses some issues as well - such as whether the recipient user has a 
.forward which doesn't invoke procmail, instead forwarding it elsewhere or 
whatnot - procmail may not be invoked, thus bypassing your plans to copy 
their email to another party through the use of a recipe in /etc/procmailrc.

I've done a lot of kludges in my day, but I really do prefer to use the 
right tool for any given job, and in this case, that's really an MTA alias.

And I'm looking for a more 'advance' sorting,

IIRC, sorting wasn't in your example.  Generally though, sorting is done 
per-recipient.

such as conditional sorting. I found out that by using alias, great chance 
that a user might receive a double email.

That scame chance exists with procmail copies.  A procmail recipe to make a 
copy for another user is basically:

:0c
* condition
! otheruser(_at_)domain(_dot_)tld

When procmail is invoked during local delivery, it'll be invoked for each 
separate local recipient.  Which means that the above recipe (or whatever 
you actually use) will be invoked multiple times.

Sure, you could put in a dupe checker, such as exists in 'man procmailex', 
using a formail messageid cache.  Of course, you could put one of those on 
the front of each of the forwarded-to mailboxes, which would work just as 
well, and keep the message replication at the MTA level where it belongs.

For example, an email mailed to bill and cc-ed to john, if I use alias, 
then in my 'archive' mail box, I'll have 2 email.

Are you so sure of that?  The MTA should be resolving the recipients in one 
fell swoop.

Set up some mail aliases:

user1: user1, someotheruser
user2: user2, someotheruser

then:

sendmail -bv  user1 user2

How many times does someotheruser get resolved by sendmail?

(this applies to sendmail, I don't know how other MTAs handle alias
expansion)

Anyway, how about outgoing mail?  Can I do filtering with procmail, or 
other tool?  I want to have a carbon copy of all the outgoing email.

Not without some hacking of your MTA.  Procmail is an LDA.

On Thursday, April 17, 2003, at 01:20 PM, Professional Software 
Engineering wrote:
[snip]

Topquoting is generally frowned upon - if you need context, quote it within 
your topical reply, otherwise, don't include it.

---
  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(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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