procmail
[Top] [All Lists]

Re: Bouncing mails to groups

1996-03-19 15:36:37
"D. Emilio Grimaldo T." <grimaldo(_at_)sce(_dot_)philips(_dot_)nl> writes:
 I want to have a single mail address as 'entry' point or distributor
 for the various groups. Incoming mail to account A would have its
 subject scanned, depending on the keywords the mail should be
 BOUNCED (therefore the reply address must be that of the ORIGINAL
 sender) to a group of people. So if for example the subject says
 `market' it will be bounced to the members of the marketing team
 if it contains `system' it will go to the members of the system
 group etc. etc. etc.

 There would be for example one file for each group (marketing,systems)
 and the file(s) contains the addresses (local) of the members of the
 target group.

 Is it possible to do it with procmail? can anybody enlighten me?

Yes, it's possible.


:0
*   ^Subject:.*systems
! `cat addresses.systems`

:0
*   ^Subject:.*market
! `cat addresses.marketing`



The '!' action in procmail is a 'bounce' operation (sometimes also
called a redistribute), as it simply feeds the message into sendmail
sans header changes.  If you want the headers to change (which you
don't in this case) you have to do it yourself with formail or some
such.  The addresses in the files addresses.systems and
addresses.marketing are split up by the shell, so they should not
contain whitespace, even if it's quoted.  One address per line is
usually the simplest to maintain.

BTW: Is there some reason this isn't being done via real email aliases?
Using :include: allows whoever owns the files to change the addresses,
just like the above.


Philip Guenther

----------------------------------------------------------------
Philip Guenther                 UNIX Systems and Network Administrator
Internet: guenther(_at_)gac(_dot_)edu   Voicenet: (507) 933-7596
Gustavus Adolphus College       St. Peter, MN 56082-1498

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