procmail
[Top] [All Lists]

Re: Trying to run procmail with Cyrus imapd and sendmail

2001-06-15 20:21:55
On 06/15/01 07:28 PM, Philip Guenther sat at the `puter and typed:
...
Actually, you don't want procmail to be delivering to /var/spool/mail.
Cyrus doesn't look there; that's way you invoke 'deliver'.  The problem
there is that you changed the HOST assignment to use your actual hostname.
The point of the assignment is to tell procmail to give up on the
message, but it only does that if the value assigned to HOST *doesn't*
match your actual hostname.  So, change the "HOST=acadia" to just "HOST",
which will unset the variable and thereby not match.


Ahh.  Makes sense.  This is a case of me outsmarting myself.  The
script I borrowed this from actually ended with "HOST="  I just
assumed I needed to fill in the blank.

It looks like procmail is not passing the $h ($2) parameterm on to
deliver.  I wonder if this is related to the locfile issue?

Nope.  It's because you didn't quote everything properly.  This following
would work:

      TRAP = '/usr/cyrus/bin/deliver -e -m "$2" -- "$1"'
      HOST

Not quoting things properly also creates security holes.

Ok, this makes sense so far.


However, it's not clear why you would use TRAP here instead of just
putting in real recipes.  When this came up on bugtraq last July,
Dylan Griffiths <Dylan_G(_at_)bigfoot(_dot_)com> and I worked up the 
following:

    LOGNAME = $1
    EXTENSION = $2

    :0 w
    * EXTENSION ?? .
    | /usr/cyrus/bin/deliver -a "$LOGNAME" -e -q -m "$EXTENSION" -- "$LOGNAME"

    # Only if there was no extension do we try this
    :0 wE
    | /usr/cyrus/bin/deliver -a "$LOGNAME" -e -q -- "$LOGNAME"

    # Whichever one we tried, failed
    EXITCODE = $?
    HOST


I no longer remember what the -a option does which deliver.

-a, according to the man pages specifies the authorization id of the
sender.

So what are these recipes supposed to do?  are they basic deliveries
to the mailbox?

If so, where should I put my recipe to add the Lines: header?  I know
it's a stupid little thing, but wanting mutt to tell me how big a
message is _before_ I opened it is what drove me over this cliff.

Thank you so much for clarifying this for me!

Lou
-- 
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
leblanc(_at_)acadia(_dot_)ne(_dot_)mediaone(_dot_)net
http://acadia.ne.mediaone.net                Ô¿Ô¬
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail