Article View: comp.mail.misc
Article #5887Re: MAIL, linux, large directories, procmail, POP3 and so ..
From: Philip Guenther
Date: Wed, 29 Mar 2000 00:00
Date: Wed, 29 Mar 2000 00:00
64 lines
3656 bytes
3656 bytes
"Ezio Paglia" <remove_ezio@comune.grosseto.it> writes:
...
> We are trying to configure the mailing system on our Linux Red Hat 6.1. The
> default installation could work fine, yet, having to manage more than 3000
> accounts for Internet , we could not accept the default spool directory
> (i.e. /var/spool/mail).
>
> We thought of following the approach of having a separate directory for
> every initial character of the account name.
>
> For example an user dummy could have MAIL file =
> $BASE_DIRECTORY/d/dummy/mail.
>
> In order to make this possible we modified the MAIL variable in
> /etc/login.defs file and created trivial automatic script for the creation
> of a generic user.
>
> In spite of this we saw that the local delivery agent continued to write to
> /var/spool/mail/$LOGNAME.
>
> After reading something about procmail we decided to have a .procmailrc for
> each user and a procmailrc on /etc, the former to allow the user some
> individual operations, the latter to discard some messages.
>
> Everything seemed to work, even though I noticed that the system worked with
> the /var/spool/mail/* files (size 0). The use of mail on Linux was correct.
Procmail performs several checks on the permissions of a mailspool
before it starts processing the /etc/procmailrc and $HOME/.procmailrc
files. For these checks it uses the compiled in location. Thus the
zero length files in /var/spool/mail.
The correct way to set the mailspool location in procmail is to
recompile it with the correct value. It can't get the information from
/etc/login.defs because procmail isn't started under login but rather by
the MTA (presumably sendmail in this case).
I would suggest you download procmail version 3.15pre, available at
ftp://ftp.procmail.org/pub/procmail/testing/procmail-3.15pre.tar.gz
Untar it and edit the config.h file in the source tree. You'll want to
put:
#define MAILSPOOLHASH 1
#define MAILSPOOLDIR "/path/to/base/directory/"
#define MAILSPOOLSUFFIX "/mail"
and
#define GROUP_PER_USER
in it. The first three #defines tell procmail that the mailspool file
for a user "dummy" can be found at "/path/to/base/directory/d/dummy/mail"
The GROUP_PER_USER define tells procmail to accept group-writable
$HOME/.procmailrc files when the group is the user's default group
(RedHat systems have a group for each user and files are group-writable
by default).
> Moreover, having chosen the pop3 protocol I saw that nevertheless Eudora
> continued to find on /var/spool/mail again. Why ?
The pop3 daemon doesn't read the /etc/login.defs file either. You'll
need to compile a new pop3 daemon that knows where to look.
Philip Guenther
Technical Details
Message-ID:
<e69g0t9s6zt.fsf@aragorn.it.gac.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<10q0abc$qo$1@fe2.cs.interbusiness.it>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10781b,1d3cb568355b54e1 X-Google-Attributes: gid10781b,public X-Google-Thread: f4424,1d3cb568355b54e1 X-Google-Attributes: gidf4424,public X-Google-Thread: f9b51,1d3cb568355b54e1 X-Google-Attributes: gidf9b51,public From: Philip Guenther <guenther@aragorn.it.gac.edu> Subject: Re: MAIL, linux, large directories, procmail, POP3 and so .. Date: 2000/03/29 Message-ID: <e69g0t9s6zt.fsf@aragorn.it.gac.edu> X-Deja-AN: 604093153 Content-Transfer-Encoding: 7bit References: <10q0abc$qo$1@fe2.cs.interbusiness.it> Content-Type: text/plain; charset=US-ASCII X-Complaints-To: news@callisto.gac.edu X-Trace: callisto.gac.edu 954371737 6875 138.236.68.41 (29 Mar 2000 23:15:37 GMT) Organization: Gustavus Adolphus College Mime-Version: 1.0 NNTP-Posting-Date: 29 Mar 2000 23:15:37 GMT Newsgroups: comp.mail.misc,comp.os.linux.setup,it.comp.os.linux.sys