spamassassin-users December 2011 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: Spamassassin Moves Mailbox

Re: Spamassassin Moves Mailbox

From: jdow <jdow_at_nospam>
Date: Wed Dec 21 2011 - 18:10:45 GMT
To: users@spamassassin.apache.org

On 2011/12/21 04:34, Kevin A. McGrail wrote:
> On 12/21/2011 12:39 AM, jdow wrote:
>> On 2011/12/20 18:51, Kevin A. McGrail wrote:
>>>
>>>>
>>>> My .procmailrc in my home directory has MAILDIR=/home/spool/mail :-)
>>> What about /etc/procmailrc?
>>>
>>> I would post the contents of both.
>>
>> It makes a difference how procmail is called. It is a filter. It takes an
>> input and feeds it to the output. It would then be sendmail (or postfix or
>> whatever) that actually stuffs the mail into the mail folder where sendmail
>> thinks it should live.
> Actually, procmail is Sendmail's Local Delivery Agent. It *is* the part of
> Sendmail that delivers the mail to specific folders.
>
> It also has very powerful filtering commands that can be used along the way to
> the local delivery.

Oops - my mistrake. I forgot that the testing I did always used the -m flag
which turns it into a mail filter. So does sendmail here (RedHat default),
  Mprocmail, P=/usr/bin/procmail, F=mSDFMhun, S=11, R=21,
            A=procmail -Y -m $h $f $u

If -m is not there procmail will create the /var/spool/mail/$LOGNAME file that
is annoying the fellow.

MAILDIR, however, is where procmail thinks it is when it's running. So this
stanza places foobar in MAILDIR. But falling out of the end of procmail
leading to a normal delivery may not put it into that directory.

:0:
foobar

 From man procmailex - this is the usual usage for MAILDIR such as when you
have procmail presort mail into folders:

MAILDIR=Mail

:0:/usr/local/lib/emacs/lock/!home!john!Mail!mailbox
* ^Subject:.*whatever
mailbox

ORGMAIL might be the variable he probably wants to use. (It defaults to
/var/spool/mail/$LOGNAME) To use it he may need to make /var/spool/mail/
<username> read only for everybody. Then the overflow goes to ORGMAIL.

Of course, he could turn /var/spool/mail into a link to /home/spool/mail
or wherever else he wants it. But that's "cheating".

{^_^}