procmail
[Top] [All Lists]

Re: Mail Dirs

2002-02-08 00:47:49
Trevor Daucsavage <tdaucsavage(_at_)bennettoffice(_dot_)com> writes:
------_=_NextPart_001_01C1AF5E.DE81D60C
Content-Type: text/plain;
      charset="utf-8"
Content-Transfer-Encoding: base64

SSBhcG9sb2dpemUgZm9yIG5vdCBpbmNsdWRpbmcgdGhpcyBpbmZvcm1hdGlvbiBpbiB0aGUgaW5p
...

Please complain to the author of your Mail User Agent: the message you
sent didn't contain any non-ASCII characters, and yet it was
a) pointlessly marked as UTF-8, and
b) base64 encoded instead of 7bit or quoted-printable, thereby rendering
   it a third again larger and unreadable to those lacking MIME-aware
   mail clients.

The former is a violation of a SHOULD clause in rfc2046 (MIME Media
Types), while the latter is both silly and rude.

Anyway...


Trevor Daucsavage <tdaucsavage(_at_)bennettoffice(_dot_)com> writes:
I apologize for not including this information in the initial email -
I wouldn't be posting to this user list if I was an expert with procmail.

Procmail version 3.15.2
Running from /etc/.procmailrc

Is there really a period in the name of the rcfile?  If so, how does
procmail know to use it?


==== /etc/.procmailrc file ====
# Please check if all the paths in PATH are reachable, remove the ones that
# are not.
PATH=/usr/bin

Unless you have a particular reason for doing so, you should leave
the PATH variable unmodified, or simply add things to it.  The default
*always* includes /usr/bin, so there's never a need to add it.


MAILDIR=/var/spool/mail/      # You'd better make sure it exists

Why do you want procmail to change its working directory to the mailspool?
Why not let it stay in the user's home directory?  The MAILDIR variable
in procmail is unrelated to (and predates) the MAILDIR variable described
in the qmail and maildir documentation.  In procmail is merely changes
procmail current working directory, thereby controlling how relative
filenames are processed by the kernel.


DEFAULT=$MAILDIR/

This tells procmail to deliver mail to /var/spool/mail, treating it as
a maildir.  Note that you left out the login name of the recipient, so
that mail for all users will go to the same place!  Perhaps you meant
to write:

        DEFAULT = /var/spool/mail/$LOGNAME/

such that mail to user 'trevor' would be delivered to something
like
        /var/spool/mail/trevor/new/1234567.12346.host.name.here


*HOWEVER*, the _correct_ way to change procmail's idea of where the
user's mailspool is, or what 'format' to use (file vs maildir vs MH)
is to use the #defines described at the top of the src/authenticate.c
source file.  In your case, if you all you want to do is change the
default type from file to maildir, then you should add the line

#define MAILSPOOLSUFFIX "/"

to the config.h file in the source tree, then recompile and reinstall.
Anything else is an incomplete solution and may cause problems in the
future.  The fundamental problem is that procmail 'screens' the user's
mailspool for existence and correct permissions and ownership before it
opens *any* rcfiles, including /etc/procmailrc, so nothing you put in
an rcfile can change the screening process.

(Yes, it's annoying that you have to recompile procmail to do this.
No, my patches to make this run-time configurable are neither complete
nor tested.)



LOGFILE=/var/log/procmail.log
#LOCKFILE=/usr/bin/.lockmail
VERBOSE=on
# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT
==== end ====

That comment is inaccurate in two ways:
1) if DEFAULT is a maildir, MH, 'directory' folder or '|', then procmail
   won't use a locallockfile, and
2) it doesn't use or conflict with the LOCKFILE variable: procmail can hold
   two separate lockfiles, one using LOCKFILE and one using a locallockfile
   on a recipe or implicity when delivering to $DEFAULT.


Philip Guenther

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>