Calling all Python experts
David Bandel
david.bandel
Wed Dec 20 06:34:25 PST 2006
Folks,
OK, well, someone took a perfectly good idea originally coded in Perl
and decided he liked Python better :-(.
Well, I need to try to figure out how Python handles grabbing
arguments to programs. Specifically, sendmail is calling procmail,
which runs a filter in Python (if only this were Perl I could fix it,
but I don't feel like learning enough Python to translate the entire
program to Perl).
The install suggests something like:
"/var/mail/%s" % os.environ.get("USER")
Geez, what atrocious syntax. Might as well be Klingon.
unfortunately, the above returns a filter error: no such file /var/mail/None.
duh. That None is supposed to be the user's name that sendmail passed
to procmail.
Anyone have any ideas how to code this correctly? Note that, since
most users have /bin/false as their shell, I had to declare:
SHELL=/bin/sh
in the user's .procmailrc
TIA,
David A. Bandel
--
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
More information about the Linux-users
mailing list