[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#5326: mailagent's file locking doesn't work; file permission wrong



> 2) Mailagent fails to lock my system mailbox.  This causes delays.
>    With logging level set to 20, the log is included below, along with
>    other relevant information.

[.. SNAP ..]
> # Only use flock() and no .lock file
> $flock_only = 'true';
[.. SNAP ..]
>   drwxrwsr-t   2 mail     mail         1024 Nov  7 20:42 mail/
[.. SNAP ..]

> ~> ps lxw
>     F    UID   PID  PPID PRI NI  SIZE   RSS WCHAN      STAT TTY   TIME COMMAND
> 100000   501 10974 10973   2  0  3448  2932 sigsuspen  S     ?    0:01 perl -S mailagent /home/swift/.mailagent-stuff/spool/queue/qm10972 

The problem is the gid (or egid) of the mailagent. Normally mailagent also
uses a .lock file. This means that it tries to create a file
/var/spool/mail/swift.lock. Unfortunately this is only allowed if you are
in group mail. This is why programs such as elm are setgid mail. There are
two ways to solve this problem:

1 - only use a kernel lock (flock()), as your change in the configuration file
    did
2 - make mailagent setgid mail and use both locking methods (safer).

Hope this helps, esp. since I've never used mailagent :),
  Wichert.

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: