procmail
[Top] [All Lists]

Re: MAILDIR as test -d

2004-03-15 14:30:51
On Mon, Mar 15, 2004 at 12:16:17PM -0800, Professional Software
Engineering wrote:

Food for thought (an examination of the source should lead to an
answer):

What happens if you set it to a directory which at the time you SET
it, exists, but during the course of the rcfile processing, is deleted
- either by something invoked from procmail, or independantly.

Empirical testing also should lead to an answer.  :-)

The answer is, if $DEFAULT is not compromised by the folder
that was deleted, it will failsafe-ballback to there successfully.


  DEFAULT = /dev/null
  DUMMY = `mkdir -p foo`
  MAILDIR = foo
  DUMMY = `rm -rf ../foo`

  :0:
  bar

  SWITCHRC

 procmail: Assigning "DEFAULT=/dev/null"
 procmail: Executing "mkdir,-p,foo"
 procmail: Assigning "DUMMY="
 procmail: Assigning "MAILDIR=foo"
 procmail: Executing "rm,-rf,../foo"
 procmail: Assigning "DUMMY="
 procmail: Locking "bar.lock"
 procmail: [24469] Mon Mar 15 22:15:20 2004
 procmail: Error while writing to "_V-F.ozhVAB.panix5.panix.com"
 procmail: Lock failure on "bar.lock"
 procmail: Assigning "LASTFOLDER=bar"
 procmail: Opening "bar"
 procmail: Error while writing to "bar"
 procmail: Assigning "SWITCHRC"
 procmail: Assigning "LASTFOLDER=/dev/null"
 procmail: Opening "/dev/null"
 From sales(_at_)promotionfactory(_dot_)net  Fri Mar 12 20:36:55 2004
  Subject:   .
   Folder: /dev/null  


However, if I set $DEFAULT to bar at the top instead of /dev/null, I
end up losing the (test) mail.

-- 
dman

_______________________________________________
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>