|
procmail, qmail, maildirs etc
2000-06-28 06:34:24
Hi,
I'm running qmail 1.03 with maildirs in $HOME/Maildir/, and i'm trying to use
procmail with it.
I built procmail-3.14 from source, but I can't find any documents on how to
configure it to use
the qmail+maildir peculiarities. The closest I got was this, in config.h:
/* This usually allowed you to define SYSTEM_MBOX. This has changed.
If you want mail delivery to custom mail-spool-files, edit the
src/authenticate.c file and change the content of: auth_mailboxname()
(either directly, or through changing the definitions in the same file
of MAILSPOOLDIR, MAILSPOOLHASH or MAILSPOOLHOME) */
I looked up src/authenticate.c, and was greeted with:
#ifndef MAILSPOOLDIR
#define MAILSPOOLDIR "/var/spool/mail/" /* watch the trailing / */
#endif
#ifndef MAILSPOOLHASH
#define MAILSPOOLHASH 0 /* 2 would deliver to /var/spool/mail/b/a/bar */
#endif
/*#define MAILSPOOLHOME "/.mail" /* watch the leading / */
/* delivers to $HOME/.mail */
and further down....
const char*auth_mailboxname(pass)auth_identity*const pass;
{ if(!pass->mbox)
#ifdef MAILSPOOLHOME
{ static const char mailfile[]=MAILSPOOLHOME;size_t i;
if(!(pass->mbox=malloc((i=strlen(pass->pw->pw_dir))+STRLEN(mailfile)+1)))
return "";
strcpy(pass->mbox,pass->pw->pw_dir);
strcpy(pass->mbox+i,mailfile);
#else
{ static const char mailspooldir[]=MAILSPOOLDIR;
if(!(pass->mbox=malloc(
STRLEN(mailspooldir)+MAILSPOOLHASH*2+strlen(pass->pw->pw_name)+1)))
return "";
strcpy(pass->mbox,mailspooldir);
;{ char*p,*n;size_t i;int c;
for(p=pass->mbox+STRLEN(mailspooldir),n=pass->pw->pw_name,
i=MAILSPOOLHASH;i--;*p++='/')
{ if(*n)
c= *n++;
*p++=c;
}
strcpy(p,pass->pw->pw_name);
}
#endif /* MAILSPOOLHOME */
}
return pass->mbox;
}
I don't know how to code, so this is all random blah to me. Do I uncomment out
the #define MAILSPOOLHOME,
and change it to "$HOME/Maildir/"? Do i need to comment out one of the other
defines? I'm completely at a
loss. Once it's compiled, I'll let my users call it from .qmail with "| preline
procmail", but before I do
that I want to make sure it's all set up properly. In the past (before I was
using maildirs, but still with
qmail) I've had dubious looking syslogs from procmail, complaining about
/var/mail/spool etc...
Recently, I compiled and installed procmail without making any changed to any
files, and that worked fine
until i tried to filter my old mail with this command:
$ formail -ns procmail .procmailrc < TOSORT
and it returned:
procmail: Couldn't create "/var/spool/mail/ian"
procmail: Couldn't create "/var/spool/mail/ian"
lots of times.until i hit ctrl-c.
for completeness. heres my .procmailrc
VERBOSE=off
SHELL=/bin/sh
DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
MAILDIR=$HOME/Mail
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
#INCLUDERC=$PMDIR/rc.testing
INCLUDERC=$PMDIR/rc.reflex
I'm sure this is straightforward to fix, but rather than guess it (like i've
done before) I'd like to make
sure it's all proper.
Thanks for your time.
ian
--
[darq#]-[ian(_at_)darq(_dot_)net] i am the sex that you
provide
[http://www.darq.net/] i am the hate you try to hide
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
|
|