procmail
[Top] [All Lists]

Re: fetchmail procmail issue

2007-08-16 07:16:04
Hi Ruud,

That was helpful. Thanks!

I added the following to the top of my .procmailrc:

:0
* MAILDIR ?? ^^[.]^^
{
    EXITCODE=200

    :0:
    /dev/null
}

And now, if MAILDIR is set to ., it exits with an errorcode of 200,
and sends the message to /dev/null. Since there was a positive
errorcode, fetchmail does not add the id to the idfile and the message
is fetched again on subsequent tries. This is exactly how I wanted it
:-)

However, can you explain to me how to read the line you sent:
* MAILDIR ?? ^^[.]^^

what does the ?? and the ^^[.]^^ mean?

I don't see any documentation on procmail's cd-command. I am assuming
it says something like:
if (MAILDIR == ".") {
  ..
}

tia
rouble



On 8/16/07, Ruud H.G. van Tol <rvtol(_at_)isolution(_dot_)nl> wrote:
rouble schreef:

is there someway I can get procmail to just error
out in this case? And not default MAILDIR to "." (or $HOME), and just
not process the email?

Just test the value of MAILDIR (which is the cd-command of procmail).

   MAILDIR = "/mnt/host/Maildir"
   :0
   * MAILDIR ?? ^^[.]^^
   ...

See procmailrc and procmailex about EXITCODE, SUSPEND, etc.

--
Groet, Ruud
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail



-- 
this spot is up for rent
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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