Re: umask for saved emails

Marc MERLIN <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
On Fri, Dec 10, 2004 at 04:44:59PM +1100, Richard Salts wrote:
> I was wondering how you would change the umask that sa-exim saves the
> files in /var/spool/sa-exim/SApermreject and the like.
> 
> I was planning on having these folders set up so they could be viewed
> by courier imap by a select group of people. I've set them up setgid to
> enable that, however the mail are delivered 600, is there any way I
> could change it to 660?

Sure, it's trivial to edit in the source code :)

RCS file: /cvsroot/sa-exim/sa-exim/sa-exim.c,v
retrieving revision 1.66
diff -u -r1.66 sa-exim.c
--- sa-exim.c   23 Aug 2004 15:39:49 -0000      1.66
+++ sa-exim.c   10 Dec 2004 07:03:19 -0000
@@ -247,7 +247,7 @@
     /* Let's not worry about you receiving two spams at the same second
      * with the same message ID. If you do, the second one will overwrite
      * the first one */
-    writefd=creat(string_sprintf("%s/new/%s", dir, filename), S_IRUSR|S_IWUSR);
+    writefd=creat(string_sprintf("%s/new/%s", dir, filename), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
     CHECKERR(writefd, string_sprintf("creat %s/new/%s", dir, filename),__LINE__);
 
     /* make the file look like a valid mbox -- idea from dman */

I've changed the default for the next version, people can change the directory
permissions if they care..

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.