Subject: Re: Using procmail as local mailer

From: [email-masked] (Stephen R. van den Berg)
Date: Fri, 8 Jul 1994 18:58:56 +0200

Rodger Anderson <[email-masked]> wrote:
>While experimenting with procmail, it changed the mode on the global
>mailbox from -rw-rw---- to -rw------t.  Later in the evening, I

It did?  So you mean it turned on the sticky bit on the mailbox?
To my knowledge procmail doesn't do this.

>procmail: Autoforwarding mailbox found
>550 <[email-masked]>... User unknown

>Now, this is documented behavior.  Unfortunately, it created a mail

Is it?  Procmail does this if the suid or sgid bits are found to be set,
but not if the sticky bit is set (as seems to be the case here).

>1. Why did procmail change the permissions on the mail spool file
>   while I was experimenting with it?  I was trying to figure out the
>   -a option (more on that in another message), and had run procmail
>   with only the -a option.

Three things:
	- If the permissions on the /usr/spool/mail permit o+wx, and the
	  mailbox of the user does not have u+x set, procmail will
	  enforce go-rw upon the mailbox.
	- If the permissions on the /usr/spool/mail don't permit o+wx, and the
	  mailbox of the user does not have u+x set, procmail will
	  enforce g+rw upon the mailbox.
	- If procmail delivers to a mailbox and the umask permits o+x, procmail
	  will set the o+x bit on the mailbox after having delivered to it.
	  This can be used as a new-mail flag.

Other than that, procmail doesn't touch the permissions on the mailbox.
Or did you play around with any of the *MASK* values in config.h?

>2. Why are the suid/guid bits on the mail spool file considered to
>   turn on autoforwarding?  Is there a way to disable this?

Because SysV mailers use this convention to mark a mailbox as containing
a forwarding address, i.e. mail should not be appended to the mailbox, it
should be sent to the address mentioned in the mailbox.

No, there currently is no way to disable this (apart from disabling the test
in the c-source).  Why would you want to disable this?  I.e. why would you
want to set the suid or sgid bits on a mailbox?

>3. Is there a way to keep the mail from bouncing?  I've since added
>   the -t option, but it appears that the mail will still bounce in
>   the above situation.

Yes, that is intentional (needed for the SysV functionality).  Again, why
would you want to set the suid or sgid bits?

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

To boldly program, where *no* man has programmed before!