Categories
Tools

Postfix pipe to script error while parsing using php

Last updated on August 4th, 2022 at 08:21 am

Click to rate this tutorial!
[Total: 0 Average: 0]

Today while configuring PHP to read emails using postfix I faced some issues and this was evident in the maillog log.
We can find maillog under /var/log/ on Linux/Unix systems.

Dec 23 19:07:18 SERVER_NAME local[11910]: fatal: execvp /etc/smrsh/email_parser.php: No such file or directory
 
Dec 23 19:07:18 SERVER_NAME local[11912]: fatal: execvp /etc/smrsh/email_parser.php: No such file or directory
 
Dev 23 19:07:18 SERVER_NAME postfix/local[11909]: 638059C1: to=</email_parser><email_parser @SERVER_NAME.com>, relay=local, delay=468, delays=468/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: local: fatal: execvp /etc/smrsh/email_parser.php: No such file or directory )

Why these errors are thrown in the logs?

This happens when you install PHP on a different location other than /usr/bin/php. To fix this link the php binary location to the bin path.

For example, if you have installed php in /usr/local/apache/php.

Then you should create a symbolic link on /usr/bin/php to point it to /usr/local/apache/php/

$ sudo ln -s /usr/local/apache/php /usr/bin/php


This should resolve the issue.

Click to rate this tutorial!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published.