procmail
[Top] [All Lists]

Re: qmail-local supplies some environmental vbles

2001-10-19 10:30:24
Greg wrote,

But ...

As Philip has said, qmail may have a non-trivial environment, but it isn't
the recipient's login shell environment.  So when the person who asked (I no
longer remember who that was) was baffled that

  basename

invoked the program during an interactive shell session but .qmail or
.qmail-suffix needed

 | preline /full/path/to/basename

the reason is that qmail's environment didn't match his login environment;
nobody claimed that qmail's environment was bare-bones.

Ergo Philip said,

| Yes, but a) that's not your login environment as defined in your
| .profile or .cshrc ...

Exactly.  Philip continued,

| and b) with the exception of the TZ variable,
| procmail by default ignores the environment that it is started with.

That's a separate issue; we were dealing only with the environment of the
shell that qmail invokes for a pipe destination, not with what procmail does
after qmail forks it.

Greg also wrote,

I want every email that comes to
the many student lists I have to be logged in one central log
file. I have in .qmail-[listname],

  | preline $HOME/bin/procmail -m .procmaillogrc

and Philip answered,

| Well, since your current setup won't work very well if a message is
| sent to two penpals lists---both of the .procmaillogrc invocations will
| extract the same listname from the header---so using a second line in
| the appropriate dot-qmail file is better than what you're doing now.

That need not be a problem.  Preline adds a Delivered-To: header line that
names the envelope recipient of the message, so Greg's .procmaillogrc could
extract the list's name from Delivered-To: and act accordingly.  I used to
use that method on a system where qmail was the MTA, and it was rock-solid
reliable.



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