procmail
[Top] [All Lists]

Re: Can procmail do the "include" command??

1997-09-02 09:11:52
Jeff Fitzgerald <jlf(_at_)webmarquee(_dot_)com> writes:
      Can procmail alias an email address, reading a text file of email
addresses to use as the mailing list? In other words, unix has an
"include" command that can be used like:

      everybody:      :include:"/<path>/email_addresses.txt"

UNIX doesn't have an "include" command.  The program which reads alias
files, sendmail, interpretes addresses of the form

        :include:/path/to/file

as requests to read the specified file for addresses.  This isn't just
some command you can use anywhere but rather a special form provided by
sendmail for alias files.


      Will the include command work in a procmail environment?

From the above, the answer is clearly "no".  However, there are other
ways to accomplish the same thing with varying degrees of reliability.
If the file involved doesn't have too many addresses and isn't too big
(say, less than 500 addresses and smaller than 512KB), than you can
probably use a procmail action that looks like:

        ! `cat /path/email_addresses.txt`

The limits are because there's a maximum size allowed for the argument
vector.  Above those limits you need to either
a) break it into multiple sendmail invocations,
b) use a program like "bulk_mailer" which does the breaking up for you
        (it even sorts the addresses by domain for speed), 
c) use an auxiliarly sendmail alias with some unguessable name and
        then threaten to break the knees of anyone who uses it directly, or
d) use some real mailing list software like smartlist to handle it.


Philip Guenther

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