procmail
[Top] [All Lists]

Re: problem with blank subject

2002-06-07 15:57:43
:0HBi
* .*(.....)
* ^Subject:\/.*
| /etc/rejectf "$1" "$2" "$MATCH"

If the subject is BLANK, then apparently the 2nd rule fails 
(all it does is just get the subject into the $MATCH variable)

If the subject line is blank then $MATCH will be empty.  Does your
rejectf program cope with and empty third argument?

If not, then depending on what you want to achieve you might be OK to
change your action to

  | /etc/rejectf "$1" "$2" "${MATCH:-NoSubject}"

If $MATCH has a value then that is used.  If it is unset or null then
the string 'NoSubject' is used.

Or have I misguessed as to how it is failing?

Hope that helps,
Martin
-- 
Martin McCarthy                 /</    http://procmail.non-prophet.org
    `Procmail Companion'        \>\
     Addison Wesley             /</                  PGP key available
_______________________________________________
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>