[#6643] .vacation files are written into mail folder directory
Summary .vacation files are written into mail folder directory
Queue Ingo
Queue Version 1.2-RC2
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers
Requester jas (at) cse (dot) yorku (dot) ca
Created 04/23/2008 (18 days ago)
Due
Updated 05/05/2008 (6 days ago)
Assigned 05/01/2008 (10 days ago)
Resolved 05/01/2008 (10 days ago)
Attachments procmail.php.patch Download
Milestone
Patch 1

History
05/05/2008 jas (at) cse (dot) yorku (dot) ca Comment #5 Reply to this comment
Thanks for picking up that error and integrating the change.

05/01/2008 Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
Looks good to me - committed, thanks! I used VACATION_DIR for the variable name since it's all vacation files. I think there was one more place it was needed too:

ls -lcn --time-style=+%s \'.vacation.' . $address . '\' |

.. so I added it on that line also. Let me know if that's not right.
05/01/2008 Jan Schneider Patch ⇒ 1
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
04/24/2008 jas (at) cse (dot) yorku (dot) ca Comment #3
New Attachment: procmail.php.patch Download
Reply to this comment
Hi.
I've never done a patch for Horde before, but I've given it a shot.

Users define the variable "TMPFILES" in backends.php:

eg. $backends['procmail']['scriptparams']['variables']['TMPFILES'] = '/local/home/USER';

and then I've patched ingo/lib/Script/procmail.php with the attached patch.  This simply replaces a couple of lines that write .vacation files with:
${TMPFILES:-.}/
... so you get "./.vacation.xxx" if TMPFILES is not defined, or $TMPFILES/.vacation.xxx otherwise.

I don't know if "TMPFILES" is a suitable name.

I've tried, and it seems to work for me.
04/23/2008 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Seems reasonable - are you able to do a patch for this?
04/23/2008 jas (at) cse (dot) yorku (dot) ca Comment #1
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ .vacation files are written into mail folder directory
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
I'm using Ingo with the procmail filter.  When vacation mode is used, the .vacation file that is used to keep track of who e-mailed is stored in $MAILDIR (configured in .procmailrc) because procmail does a chdir to this directory during startup.  I consider this is a "bug" since IMP then displays the .vacation file in the folder list.  To get around this, I would like to see an optional variable that could be set in the INGO config that could be used to redirect the .vacation file  to a different directory.  If the variable is set, rather than seeing:

FILEDATE=`test -f '.vacation.USER@cse.yorku.ca' && ls -lcn --time-style=+%s '.vacation.USER@cse.yorku.ca' | awk '{ print $6 + (604800) }'`

... you would see something like:

FILEDATE=`test -f '$TMPFILES/.vacation.USER@cse.yorku.ca' && ls -lcn --time-style=+%s '$TMPFILES/.vacation.USER@cse.yorku.ca' | awk '{ print $6 + (604800) }'`