procmail
[Top] [All Lists]

Re: Mailing to all users

1998-07-16 12:34:25
Hernan Sanchez replied to Timothy Luoma's suggestion,

| I need to use procmail because I don't use "mail" as my local mail agent.

You don't need to use "mail" as your local agent.  There should still be
some bare-bones program called lmail or Mail or rmail or maybe even mail
that will accept a message and either deliver it or give it to the MTA for
delivery.

| How can I do it ?

However, if you must do it or wish to do it within a procmail recipe,

 :0
 * conditions
 ! `cat userfile`

Note that the envelope sender in the From_ line will now be you instead
of the original sender; however, the From: header will be unchanged.

If you name the file by a relative path, it should start from $MAILDIR.

If the userfile gets to be too long for LINEBUF but still fits inside your
shell's command line limit, force a shell by adding a semicolon:

 :0
 * conditions
 ! `cat userfile` ;

or if you need to make two or more files of addresses,

 :0
 * conditions
 ! `cat userfile1`
 :0A
 ! `cat userfile2`
 :0A
 ! `cat userfile3`

and so forth.

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