[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: E-mail setup / catch-all address - procmail ...



"Johan Pretorius" <johan@xxxxxxxxxx> wrote:
> Steve,
>
> Thank you for the reply - I'm new to the Cobalt server, not to
> Unix as such ;-)  But I need to brush up on my Apache/sendmail
> skills - sendmail.org, here I come!
>
> Do you mind forwarding me the .forward and procmail solutions? Is the
> latter a sendmail replacement?

A .forward file forwards email to other email addresses and is placed in the
user's home directory.  I almost never use them so I can't recall offhand if
you need to put email addresses one per line or on the same line separated
by commas, but a quick test on your end should tell you which method works.

procmail is a mail processing system, not a sendmail replacement.  To really
understand procmail you need to read some tutorials to learn the syntax and
structure.  The first step is to create a file called .procmailrc and put it
in the user's home directory.  Make it chmod 644 and chown'ed to the user.
Here is a simplified version of how one of mine is setup.  The idea is that
you create separate files for like groups of procmail "recipes" (what they
are officially referred to as).  Most of mine are for filtering email from
mailing lists to the proper folders and are in rc.lists, but for forwarding
I would use rc.forward.

SHELL=/bin/sh
        VERBOSE=off
        MAILDIR=$HOME/mail
        PMDIR=$HOME/.procmail
        LOGFILE=$PMDIR/log
        INCLUDERC=$PMDIR/rc.lists
        INCLUDERC=$PMDIR/rc.forward
        INCLUDERC=$PMDIR/rc.move

Create a directory .procmail in the user's home directory, go to it and make
a file rc.lists.  All of these should be chown'ed to the user.  Inside it do
something like this:

# Forward email for sales@xxxxxxxxxx to johan@xxxxxxxxxx and
steve@xxxxxxxxxxxxx
:0
    * ^TOjoe@xxxxxxxxxx
    ! johan@xxxxxxxxxx, steve@xxxxxxxxxxxx

If you want to also leave a copy on the server change the ":0" to ":0c".

Here are some good places to start for more procmail info.
http://www.ling.helsinki.fi/users/reriksso/procmail/mini-faq.html
http://www.procmail.org/
http://www.procmail.org/jari/pm-tips.html

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/