procmail
[Top] [All Lists]

Trying to find the problem...

1999-01-08 17:10:20


HI All!  Happy new year!  I just got here to the list, and I am new to
procmail in general.


This is my problem:  I have an account (akeem(_at_)best(_dot_)com
<mailto:akeem(_at_)best(_dot_)com> ) and my own domain name (ebji.org).  Any 
mail
sent to my domain name goes to my account, regardless of who it is
addressed to.   I've decided to try and use procmail to forward mail to
other people who belong to our organization.  So, what I'd like to do is
to forward the mail to my colleagues, and then forward my own stuff to
my work mail account.  Ideally, I'd like to return an error to the
sender when the mail to my domain was not forwarded.  Pretty
straightforward.  Problem is when someone sends the same message to
multiple addresses.  In this case, it either keeps stopping after the
first forward (so the first matching recipe gets a bunch of copies) or
everybody it gets sent to gets a bunch of copies.  I think this should
solve it, but it doesn't see to work, it keeps falling through...  My
.procmailrc file looks like this:


#
# SET VARIABLES

# Internal Variables

SHELL=/bin/sh               #Shell used to run procmail.  Be sure this
points to
                            #your system's copy of sh.  DO NOT
substitute a
                            #different shell unless you really know UNIX

LINEBUF=4096                #Needed to keep Procmail from choking on
long
                            #"recipes", or instructions on what to do
with
                            #particular kinds of email.

PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
                            #Path for your programs -- this is probably
best
                            #left alone.

VERBOSE=off                 #Change this to "on" when you try a new
recipe
                            #so that Procmail will log literally every
step
                            #it takes.  DO NOT LEAVE IT ON, though,
because
                            #it creates huge logfiles.

# Default Program & file locations

MAILDIR=$HOME/Mail          #you'd better make sure this directory
exists

DEFAULT=$HOME/inbox         #default incoming mailbox for shell2-5 users
                            #on Best Internet.  Substitute the correct
                            #setting for your system.

ADMINFOLDER=$MAILDIR/admin.incoming  #for bounced mail, mail from root,
                                     #postmaster, abuse, etc. Change
this to
                                     #$DEFAULT if you use
                                     #Eudora, Pegasus Mail, Netscape,
Internet
                                     #Explorer, or another Windows- or
Mac-based
                                     #POP email program.

BULKFOLDER=$MAILDIR/bulk.incoming    #for bulk mail which appears
legitimate, such
                                     #as mail from mailing lists or mail
sent using
                                     #Bcc:  Change this to $DEFAULT if
you use
                                     #Eudora, Pegasus Mail, Netscape,
Internet
                                     #Explorer, or another Windows- or
Mac-based
                                     #POP email program.

LOGFILE=$MAILDIR/log        #Logs message disposition.  Recommended --
otherwise
                            #errors are emailed to you. :/

FORMAIL=/usr/local/bin/formail #useful for autoreply recipes.  If you
                               #are not on Best Internet, modify this to
                               #your system's copy of formail.

SENDMAIL=/usr/sbin/sendmail    #useful for autoreply recipes.  If you
are
                               #not on Best Internet, modify this to
point
                               #to your system's copy of sendmail.

# SpamBouncer settings
#
# You can ignore these if you aren't installing the Spam Bouncer.
# If you are installing the Spam Bouncer, PLEASE BE SURE TO READ
# the installation instructions at <http://www.best.com/~ariel/nospam>

ALTFROM=otheremail(_at_)othersite(_dot_)com     #An alternate email address 
which
doesn't
                                     #show your normal email address, so
that
                                     #spammers don't get your usual
email address
                                     #from complaints.  Set this to a
real email
                                     #address, but not one you use for
private
                                     #email, preferably.

BLOCKFOLDER=$MAILDIR/block.incoming  #for suspicious mail, but possibly
not spam

BLOCKREPLY=SILENT                    #SILENT tells the SpamBouncer to
just filter
                                     #blocked email, and not reply to
it.
                                     #NOTIFY tells the SpamBouncer to
tell the
                                     #sender that his/her email was
blocked, and
                                     #tells them how to bypass the
filter if their
                                     #email is legitimate.

BYPASSWD=zeugma                      #Password that allows people who
send you
                                     #legitimate email, but whose email
is
                                     #blocked for some reason by the
Spam Bouncer,
                                     #to bypass the Spam Bouncer.
Change this
                                     #frequently.

FREEMAIL=INTERNAL                    #Tells the Spam Bouncer whether to
filter
                                     #email from sites which offer free
email
                                     #addresses, and which list to use.

NOBOUNCE=$HOME/nobounce              #Tells the Spam Bouncer where your
NOBOUNCE
                                     #file is located.

NOLOOP=$ALTFROM                      #Setting for email address used in
X-Loop:
                                     #header, a header which should
prevent
                                     #mailing loops.  Leave this alone
unless
                                     #you know what you're doing.

PATTERNMATCHING=NONE                 #Enables the Spam Bouncer's Pattern
Matching
                                     #filter.  NONE disables the filter;
SILENT
                                     #causes it to filter out suspected
spam
                                     #but not notify the senders; NOTIFY
causes it
                                     #to both filter out suspected spam
and notify
                                     #the sender exactly as for other
blocked email.

SBDIR=$HOME/shared                   #Directory where SpamBouncer
program files
                                     #are located.  Edit this to point
to that
                                     #directory on your system.

SPAMFOLDER=$MAILDIR/spam.incoming    #change this to
SPAMFOLDER=/dev/null
                                     #to delete spam entirely.

SPAMREPLY=SILENT                     #SILENT tells the Spam Bouncer to
filter spam,
                                     #but not attempt to autocomplain
about it.
                                     #BOUNCE tells the Spam Bouncer to
send a
                                     #"MAILER-DAEMON" bounce message to
the spammer.
                                     #COMPLAIN tells the Spam Bouncer to
send an
                                     #autocomplaint to the spammer's
postmaster and
                                     #upstream sites.

# BEGIN RECIPES

# Nuke duplicate messages
:0 Wh: msgid.lock
| $FORMAIL -D 8192 msgid.cache

# If we've got a message addressed to the ebji domain, filter it...
:0:
* ^TO(_dot_)*(_at_)ebji(_dot_)org
{
    #since we got rid of the dupes, go through each one...

    # test account
    :0c
    * ^TO(_dot_)*test(_at_)ebji(_dot_)org
    !disrael(_at_)pacbell(_dot_)net

    # Last part of the test.
    :0c
    * ^TO(_dot_)*last(_at_)ebji(_dot_)org
    !danielis(_at_)mosaix(_dot_)com

    # We *MAY* be sending mail to one or more EBJI accounts as well
    # as the parent account (akeem(_at_)best(_dot_)com) so we may drop in here
    # and have to send to the parent...  Take care of that here...
    :0c
    * ^TO(_dot_)*akeem(_at_)best(_dot_)com
    !danielis(_at_)mosaix(_dot_)com

    # necessary copies have been distributed, so kill this one!!
    # NOTE: if someone misspelled an account name, there is no
    # current way to bounce it
    :0
    /dev/null
}

# Dropped through.  Must be only for the parent account!!
:0e
!danielis(_at_)mosaix(_dot_)com

:0
/dev/null

# Done :)



What I'd like to do is 2 things:

1.      Figure out why this doesn't work...
2.      Figure out how to send a message when the '@ebji.org' address
doesn't get forwarded.




Any help or hints is appreciated.  Thanks!!!



-D. Israel
danielis(_at_)mosaix(_dot_)com <mailto:danielis(_at_)mosaix(_dot_)com> 

Measure wealth not by the things you have, but by the things you have
for which you would not take money.


<Prev in Thread] Current Thread [Next in Thread>
  • Trying to find the problem..., Daniel Israel <=