procmail
[Top] [All Lists]

formail problem...

2003-05-24 15:04:12

This seems like a simple problem, but it's got me stumped.

I'm trying to add RFC2369-compliant headers to some of the lists that
pass through my server, for better handling by various MUAs.  (The
procmail list is of course no problem, but spam-l, isp-*, etc need a
little help.)  At present, I've got recipes building variables like:

    :0 E
    * ^Sender:(_dot_)+spam-l(_at_)\/peach.ease.lsoft.com
    {       
        POST = "spam-l(_at_)$MATCH"
        HELP = "spam-l-request(_at_)$MATCH"
        ARCHIVE = "http://$MATCH/scripts/wa.exe?LIST=SPAM-L";
        SUBSCRIBE = "listserv(_at_)$MATCH?body=subscribe spam-l"
        UNSUBSCRIBE = "listserv(_at_)$MATCH?body=signoff spam-l"
    }

Then later on, I've got:

    FMARGS=''

    :0
    * POST ?? .+
    { FMARGS = "${FMARGS} -A\"List-Post: ${POST}\"" }

    :0
    * HELP ?? .+
    { FMARGS = "${FMARGS} -A\"List-Help: ${HELP}\"" }

    :0
    * ARCHIVE ?? .+
    { FMARGS = "${FMARGS} -A\"List-Archive: ${ARCHIVE}\"" }

    :0
    * SUBSCRIBE ?? .+
    { FMARGS = "${FMARGS} -A\"List-Subscribe: ${SUBSCRIBE}\"" }

and finally:

    # for testing...
    :0
    * FMARGS ?? [-]
    { LOG="FMARGS = ${FMARGS}${NL}" }

    :0
    * FMARGS ?? [-]
    { VERBOSE=on }

    :0 fhw
    * FMARGS ?? [-]
    | formail "${FMARGS}"

    VERBOSE=off

And lo and behold, formail is complaining.  The log says:

FMARGS =  -A"List-Post: spam-l(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM" 
-A"List-Help: spam-l-request(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM" 
-A"List-Archive: http:
//PEACH.EASE.LSOFT.COM/scripts/wa.exe?LIST=SPAM-L" -A"List-Subscribe: 
mailto:listserv(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM?body=subscribe 
spam-l" 
-A"List-Unsubscribe: 
mailto:listserv(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM?body=signoff spam-l"
procmail: [50159] Sat May 24 17:18:51 2003
procmail: Match on "[-]"
procmail: Executing "formail, -A"List-Post: 
spam-l(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM" -A"List-Help: 
spam-l-request(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM" -A"X
-List-Archive: http://PEACH.EASE.LSOFT.COM/scripts/wa.exe?LIST=SPAM-L"; 
-A"List-Subscribe: 
mailto:listserv(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM?bod
y=subscribe spam-l" -A"List-Unsubscribe: 
mailto:listserv(_at_)PEACH(_dot_)EASE(_dot_)LSOFT(_dot_)COM?body=signoff 
spam-l""
Usage: formail [-vbczfrktqY] [-D nnn idcache] [-p prefix] [-l folder]
        [-xXaAiIuU field] [-R ofield nfield]
   Or: formail [+nnn] [-nnn] [-bczfrktedqBY] [-D nnn idcache] [-p prefix]
        [-n [nnn]] [-m nnn] [-l folder] [-xXaAiIuU field] [-R ofield nfield]
        -s [prg [arg ...]]
procmail: Program failure (64) of "formail"
procmail: Rescue of unfiltered data succeeded
procmail: Assigning "VERBOSE=off"

What am I doing wrong?

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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