Domain routing email with procmail?

Replies:

Parents:

  • None.
Hi folks,

I thought I'd look at procmail as a way of routing email
for my new domain "purplecrayon.org". The following recipe
seems to do what I want it to do:
1) Forward mail to N people on the purple crayon mailing list
2) Give me a copy
3) Put a copy in a mailbox that will be used to build
   an HTML archive

Here's the recipe:

--------------------------------------------------
# Forward, then copy to IN.pc and my local mailbox
:0
* ^TO_people@purplecrayon\.org
{
#       :0c
#       ! [email protected] [email protected] ...

       :0c:
       my-local-mailbox

       :0:
       purple-crayon-mailbox
}
-------------------------------------------------

Here's the question: Should I not be using procmail at all?
I haven't tried out SmartList or anything else.

Currently Mail goes from the machine that hosts purplecrayon.org
to my email account on another machine (the sysfolks did that for
me). It's on that machine (tux) that I am using this procmail
recipe.

Any suggestions welcome. The next step after this one will be
building an online archive. The next step after that may be to
provide secure access to that archive. All on a machine where
I don't have root access!

- Ian


--
Ian Jacobs ([email protected])   http://www.w3.org/People/Jacobs
Tel:                         +1 831 457-2842
Cell:                        +1 917 450-8783

Re: Domain routing email with procmail?

Replies:

  • None.

Parents:

>From: Ian Jacobs <[email protected]>
>Organization: W3C - World Wide Web Consortium
>
>Hi folks,
>
>I thought I'd look at procmail as a way of routing email
>for my new domain "purplecrayon.org". The following recipe
>seems to do what I want it to do:
> 1) Forward mail to N people on the purple crayon mailing list
> 2) Give me a copy
> 3) Put a copy in a mailbox that will be used to build
>    an HTML archive
>
>Here's the recipe:
>
>--------------------------------------------------
># Forward, then copy to IN.pc and my local mailbox
>:0
>* ^TO_people@purplecrayon\.org
>{
>#       :0c
>#       ! [email protected] [email protected] ...
>
>        :0c:
>        my-local-mailbox
>
>        :0:
>        purple-crayon-mailbox
>}
>-------------------------------------------------
>
>Here's the question: Should I not be using procmail at all?
>I haven't tried out SmartList or anything else.
>
>Currently Mail goes from the machine that hosts purplecrayon.org
>to my email account on another machine (the sysfolks did that for
>me). It's on that machine (tux) that I am using this procmail
>recipe.
>
>Any suggestions welcome. The next step after this one will be
>building an online archive. The next step after that may be to
>provide secure access to that archive. All on a machine where
>I don't have root access!

On the shared box that Purplecrayon.org is on?  I don't see why you
can't have root, you want me to add your key?

You could do all (to multiple recipients, to file and to process[es])
that within the aliases file, which would require root or procmail.
Procmail is much more flexible.

Smarlists is procmail based and does the subscription, recipient
lists, and other administrative tasks.  It hands off to hypermess a
close relative of hypermail http://www.hypermail.org for generating
the web page archives.  **Make sure you have it split out by month
(there's FAQ on hypermail's site for that) or it has to recreate the
indexes by author, date and thread on an increasingly larger archive
and will chomp the cpu.

Web access restrictions can be configured in your case in apache with
.htaccess and simple base authentication.

Gerald,

How do you get your main index pages?   I like it's by month tallies
and last 10 messages format.

http://impressive.net/archives/fogo/

Here's a sample (actually fogo gets lumped in with a number of other
lists I'm on).  I moved my web and mail services to a machine at MIT
instead of hosting from home and should generate my archives there but
haven't moved them yet and they aren't part of my rsynching setup.  

:0 c:
* ! ^TO.*[email protected]
| /usr/local/bin/msg2archive -L lists -A /usr/local/apache.guilds.net/htdocs/archives/lists -H /usr/local/bin/hypermail -l "random lists"  -M /usr/local/apache.guilds.net/htdocs/archives/lists/.mailbox

--
Ted Guild <[email protected]>
http://www.guilds.net

Re: Domain routing email with procmail?

Replies:

  • None.

Parents:

On Sun, Feb 04, 2001 at 01:59:51AM -0500, Ian Jacobs wrote:
> Hi folks,
>
> I thought I'd look at procmail as a way of routing email
> for my new domain "purplecrayon.org". The following recipe
> seems to do what I want it to do:
>  1) Forward mail to N people on the purple crayon mailing list
>  2) Give me a copy
>  3) Put a copy in a mailbox that will be used to build
>     an HTML archive

Here is what I use for fogo right now, though it's not very good
and I should be using something else (like real list software.)

/etc/postfix/aliases has:

   fogo-dist:      :include:/usr/local/lists/fogo
   fogo-request:   gerald

/usr/local/lists/fogo is a flat text file of email addresses.

/etc/postfix/virtual has:

   impressive.net          un.impressive.net
   @impressive.net         gerald

which causes [email protected] to go to gerald. (along with
anything else that isn't explicitly listed in the aliases file)

~gerald/.procmailrc has:

   ARCHIVEDIR=`date +%Y/%m/%d`

   UMASK=022
   # archive an extra copy of fogo stuff
   :0c
   * ^TO.*[email protected]
   $HOME/archives/fogo/$ARCHIVEDIR/.
   UMASK=077

   :0c
   * ^TO.*[email protected]
   | $HOME/bin/sleep-and-update-fogo-archive

   # fogo mailing list (munge a bit, then forward to dist alias)
   :0
   * ^TO.*[email protected]
   {
     :0f
     | formail -I"List-Id: <fogo.impressive.net>" \
               -I"List-Help: <http://impressive.net/people/gerald/1999/12/fogo/>" \
               -I"List-Archive: <http://impressive.net/archives/fogo/>"

     :0
     ! [email protected]
   }

(I did s/fogo/sample/ on that last one to prevent spambots from
sending directly to the fogo-dist address.)

> Here's the question: Should I not be using procmail at all?
> I haven't tried out SmartList or anything else.

probably not, because without real list software you don't have
very good bounce/loop detection (I think postfix will catch most
of the loops that I care about, though I don't know for sure),
and you lack other features like:

 - restricting the ability to post to those on the dist list
   (fortunately, spam hasn't become a problem on fogo yet)

 - letting people add/remove themselves to the list automatically

I keep meaning to install Mailman [1] on un, but never get around
to it. (in part because I think there are a few things that I
won't like, like the URIs it uses for its web interfaces.)

[1] http://www.list.org/

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny