procmail
[Top] [All Lists]

Re: procmail generates an empty mbox file...

2003-04-04 13:03:05
Guillaume Desclaux wrote,

> I'm very surprised not having any answer or comment to my previous
> post...

I started a response yesterday (it was only yesterday, Guillaume, wasn't it?) but had a headache and figured someone else would be able to state it better. I still have that headache, and now after one day you're threatening us that if we don't answer you now you'll never ask again, so you're not exactly easing the pain, and I'm not going to any trouble to make this come out sweet and soft. In fact, I'm in a particularly nasty mood (no, not because your name is French).

> I've configured procmail to use the maildir format instead of the
> mbox file format.

I bet you haven't configured procmail at all.  You put

 ORGMAIL=$HOME/some/path/that/ends/in/a/slash/
 DEFAULT=$ORGMAIL

into /etc/procmailrc, didn't you? "rc" stands for "run-time code." That's not configuring.

> All is working perfectly... except that procmail is still creating an
> empty mbox file in /var/mail for each user.

Before procmail reads /etc/procmailrc or any other rcfile, it does a sanity check on $ORGMAIL under its compiled-in value. If you compiled procmail such that ORGMAIL is /var/mail/$LOGNAME, it will use that value, and nothing in /etc/procmailrc can affect that.

Procmail can be configured only at compilation time.  Philip has talked
about supporting a file named /etc/procmail.cf in a future version,
where run-time configuration could actually take place, largely because of previous posts from others about this very problem with $ORGMAIL, but it hasn't been implemented yet. Note that "cf" stands for "configuration."

I'll omit comment on the phrase "empty mbox file."

> How can I configure procmail NOT to have these empty files generated?
> I've found in the archive of the mailing list that it could be solved
> by modifying the authenticate.h file (the MAILSPOOLDIR and
> MAILSPOOLHOME variable) and by re-compiling the program... but it's
> not very convenient...

So you did your research and found the answer already; the problem is that you think it's too much effort. Procmail is one of the easiest and most straightforward programs to compile. It does almost all the work of figuring out the correct configuration for the platform and preparing its own makefiles; it even tailors its man pages accordingly. Just edit that file in the source tree, go back up one directory, and type "make install."

> Is there any other proper way to do that ...

Currently, no. Until procmail.cf is implemented (if ever), no, you have to edit the desired value for ORGMAIL into the source before compiling. But here's the irony: if a version of procmail is ever released that supports /etc/procmail.cf, you'll have to recompile in order to use it. If you consider recompilation inconvenient, you'll have to live with those empty files.

> (using procmailrc config file)?

/etc/procmailrc is not a config file. It is a file of instructions to carry out on individual messages. That was where you were misled.


_______________________________________________
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>