I am setting up tmail as a delivery agent for sendmail. I would like to
have new mail delivered to a MIX inbox. I ran into a bit of a sang with
the set gid flag on the directory.
Mar 26 10:44:36 twooften tmail[11632]: Verifying safe delivery to
/u/us/fl/testub/INBOX by UID 11195
Mar 26 10:44:36 twooften tmail[11632]: delivery to /u/us/fl/testub/INBOX
unsafe: can't deliver to setgid file
Mar 26 10:44:36 twooften tmail[11632]: error in delivery
Mar 26 10:44:36 twooften sendmail[11631]: l2QGgSof011573: to=<[EMAIL
PROTECTED]>, ctladdr=<[EMAIL PROTECTED]> (0/0), delay=00:02:08,
xdelay=00:00:00, mailer=local, pri=210577, dsn=4.0.0, stat=Deferred: local
mailer (/usr/local/sbin/tmail) exited with EX_TEMPFAIL
The set gid flag is propagated from the parent directory when the INBOX
directory is created. The inbox create works, but the delivery fails in
the delivery_unsafe function. This quick hack on tmail.c seems to fix
it. Is this the best way to allow an INBOX directory to have the set
gid flag set?
[EMAIL PROTECTED] ~]$ diff -c tmp/imap-2006f/src/tmail/tmail.c
imap-2006f/src/tmail/tmail.c
*** tmp/imap-2006f/src/tmail/tmail.c 2007-01-26 15:47:03.000000000 -0700
--- imap-2006f/src/tmail/tmail.c 2007-03-26 13:31:55.000000000 -0600
***************
*** 514,520 ****
(long) sbuf->st_uid,(long) uid);
/* unsafe if not a regular file */
else if (((type = sbuf->st_mode & (S_IFMT | S_ISUID | S_ISGID)) !=
S_IFREG)&&
! (type != S_IFDIR)) {
strcat (tmp,"can't deliver to ");
/* unsafe if setuid */
if (type & S_ISUID) strcat (tmp,"setuid file");
--- 514,520 ----
(long) sbuf->st_uid,(long) uid);
/* unsafe if not a regular file */
else if (((type = sbuf->st_mode & (S_IFMT | S_ISUID | S_ISGID)) !=
S_IFREG)&&
! ((type != S_IFDIR) && (type != S_IFDIR & S_ISGID))) {
strcat (tmp,"can't deliver to ");
/* unsafe if setuid */
if (type & S_ISUID) strcat (tmp,"setuid file");
[EMAIL PROTECTED] ~]$
Thank you,
Matt
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw