procmail
[Top] [All Lists]

Re: Inclusive recipe

2007-10-24 15:03:03
On 2007.10.24 23:36:38 +0000, Dallman Ross wrote:
Rem P Roberti wrote Wednesday, October 24, 2007 7:58 PM:

On 2007.10.24 19:17:29 +0000, Dallman Ross wrote:

Are the addresses all local users on your system?  If so, in
the systemwide /etc/rcfile:

  DROPPRIVS = yes

  :0:
  * LOGNAME ?? ^^(foo|bar|baz)^^
  mailbox

I'm sorry, I should have been more clear on this.  I'm the only
user on the system, and the addresses are all for folks that
belong to a single organization.  I want all of this email to
go to the one proprietary mailbox.

If Bcc's might be involved or if multiple recipients in the
same group, you will have problems.  Are the recipients
not doubled up, and are they found individually on the To: line?
And not on the Cc: line?  How many addresses are we talking about?
Only a few?  Dozens?  Hundreds?  Do all addresses share one domain?

If only a few, you can get away with doing it without grepping
through external files.

   SPACE = ' '
   TAB = '    '
   WS = $SPACE$TAB
   ADDRESS = (foo|bar|baz)

   :0:
   * $ ^To:.*(.*\<)?$ADDRESS(_at_)example[(_dot_)]com\>
   mailbox

could work.  Note that there are corner-cases that could be
problematic, which is why I asked all those questions.
The main rule is that procmail is an MDA, not an MTA.
It can't distinguish undisclosed addresses that were on
the Envelope-To when the message was Bcc'd and contains
multiple recipients, for example.

-- 
dman

Once again, my lack of explanation is probably making things difficult.
I receive and email.  The "From:" header tells me who the email is from.
I want a number of different senders, with different "From:" addresses
to go into the same mailbox.  It has been suggested that the form of the
recipe should be something like this:

:0
* ^From: (address |\
     address |\
     address |\
     address)
theonemailbox


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