|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Randy Ramsdell (rramsdell
livedatagroup.com)
Date: Tue Mar 25 2008 - 13:03:04 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Herb Asher wrote:
> Hi everyone
postfix!
>
> Need some help with the following:
>
>
> I'm relaying all incoming mail to a python script. My configuration
> is as follows:
>
> /etc/postfix/virtual:
>
mydomain mail_handler_py
>
> /etc/postfix/aliases:
> mail_handler_py: "|/path/to/mail_handler.py"
>
>
> That works perfectly. I get the email in the python script, and can
> process it. However, when I import a certain python library (boto)
> that I have on my system, the script dies. From my mail.log:
>
> Mar 25 18:07:33 herb postfix/local[1335]: ED0AE62C3DF:
> to=<mail_handler_py
herb.local <mailto:mail_handler_py
herb.local>>,
> orig_to=<root
localhost>, relay=local, delay=0.05,
> delays=0.01/0/0/0.03, dsn=5.3.0, status=bounced (Command died with
> status 1: "/path/to/mail_handler.py". Command output: Traceback (most
> recent call last): File "/path/to/mail_handler.py", line 9, in
> <module> import boto ImportError: No module named boto )
>
>
> Now, when I call the mail_handler.py normally, it works perfectly.
> But somehow when being called by postfix, the python script can't find
> the module anymore.
>
> Is this a permission problem? What postfix process is running this
> command? I looked at postfix/local[1335] - but can't find anything
> with PID 1335.
>
>
>
>
> Thanks a lot for your help, Herb
>
>
su - postfix
./run_script
My guess is the env of the postfix user or perms for that library.
When I use alias to send to a file and then process that with a script,
the file is 600 nobody.nobody.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]