"David W. Tamkin" <dattier(_at_)ripco(_dot_)com> writes:
Please help a person who knows no C.
I want to compile procmail to use as a customer on a system where the default
mailbox is $HOME/.mailspool/$LOGNAME. How does one set the variables in
src/authenticate.c to do that?
Is it something like (after uncommenting it)
#define MAILSPOOLHOME "/.mailspool/"LOGNAME
or thereabouts? Or maybe
#define MAILSPOOLDIR HOME"/.mailspool/"
like that?
You'll need to change the actual C code for the auth_mailboxname() function.
Find the lines in src/authenticate.c that read:
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
and change them to
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+
strlen(pass->pw->pw_name))))
return "";
strcpy(pass->mbox,pass->pw->pw_dir);
strcpy(pass->mbox+i,mailfile);
strcpy(pass->mbox+i+STRLEN(mailfile),pass->pw->pw_name);
#else
Then, change that #define at the top to
#define MAILSPOOLHOME "/.mailspool/"
and compile and install.
The problem, of course, is that there are too many different ways to
setup mailspools, such that we can't anticipate them all with
#defines. Thus the procmail.conf discussion on the procmail-dev
mailing list. Once USWest gets my DSL line installed I might actually
be able to tackle implementing it....
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail