6.0.0-beta1
7/26/25

[#8577] vacation rule : maildrop/mailbot locks
Summary vacation rule : maildrop/mailbot locks
Queue Ingo
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester rsalmon (at) mbpgroup (dot) com
Created 09/15/2009 (5793 days ago)
Due
Updated 01/13/2010 (5673 days ago)
Assigned 09/15/2009 (5793 days ago)
Resolved 09/15/2009 (5793 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
01/13/2010 12:11:21 AM CVS Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

Use a lock name that's different from mailbot's seen database name 
(Bug #8577).

http://git.horde.org/diff.php/ingo/lib/Script/Maildrop.php?rt=horde-git&r1=9b22223f642b6ab65a71694ff34f709f06dfce9d&r2=5a978e4ae04ac8ffa7b04046f91416d7aa347d01
09/15/2009 09:09:28 PM CVS Commit Comment #6 Reply to this comment
09/15/2009 09:01:12 PM Jan Schneider Comment #5
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Thanks for the confirmation.
09/15/2009 09:00:39 PM CVS Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

Use a lock name that's different from mailbot's seen database name 
(Bug #8577).

http://git.horde.org/diff.php/ingo/lib/Script/Maildrop.php?rt=horde-hatchery&r1=9b22223f642b6ab65a71694ff34f709f06dfce9d&r2=5a978e4ae04ac8ffa7b04046f91416d7aa347d01
09/15/2009 03:26:27 PM rsalmon (at) mbpgroup (dot) com Comment #3 Reply to this comment
To not destroy the seen-database if Ingo is being updated while
auto-responses are active, wouldn't it make more sense to rename the
vacation lock file instead? I don't follow the maildrop code
completely, but isn't the vacation.lock created by flock only when
processing the current message? That wouldn't break anything if
upgrading Ingo on an active system.
yes, changing maildrop's file lock will prevent live/production system 
from loosing user's db history.



So I guess the path would be (or some other file name!) :



-  $this->_action[] = '  flock "vacation.lock" {';

+ $this->_action[] = '  flock "vacationdrop.lock" {';


09/15/2009 03:11:04 PM Jan Schneider Comment #2
Priority ⇒ 2. Medium
State ⇒ Feedback
Reply to this comment
To not destroy the seen-database if Ingo is being updated while 
auto-responses are active, wouldn't it make more sense to rename the 
vacation lock file instead? I don't follow the maildrop code 
completely, but isn't the vacation.lock created by flock only when 
processing the current message? That wouldn't break anything if 
upgrading Ingo on an active system.
09/15/2009 11:36:03 AM rsalmon (at) mbpgroup (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ vacation rule : maildrop/mailbot locks
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
Reply to this comment
mailbot uses a lock before opening sender's email database. the 
database file is defined with arg '-d '.

In file ingo/lib/Script/maildrop.php:523, database filename is defined 
as 'vacation'. Therefore mailbot uses file 'vacation.lock' as the file 
lock , which is the same file lock defined for maildrop (line 516).

so, if a user set start and end vacation dates, maildrop and mailbot 
will try to lock the same file which will never work.



here is a patch:



-            $this->_action[] = "  cc \"| mailbot -D " . 
$params['action-value']['days'] . " -c '" . NLS::getCharset() . "' -t 
\$HOME/vacation.msg -d \$HOME/vacation -A 'From: $from' -s '" . 
MIME::encode($params['action-value']['subject'], NLS::getCharset())  . 
"' /usr/sbin/sendmail -t \"";

+            $this->_action[] = "  cc \"| mailbot -D " . 
$params['action-value']['days'] . " -c '" . NLS::getCharset() . "' -t 
\$HOME/vacation.msg -d \$HOME/vacationbot -A 'From: $from' -s '" . 
MIME::encode($params['action-value']['subject'], NLS::getCharset())  . 
"' /usr/sbin/sendmail -t \"";






Saved Queries