| tags:admin linux mail plesk qmail sysadmin categories:Tech

Plesk: unable to look up public/pickup: No such file or directory

After upgrading from Plesk 9.5.4 to Plesk 10.0.1, mail submitted via PHP web forms on all sites stopped going through. No error was displayed to the user after submitting the form, but in testing I found this error in the Qmail maillog:

[root@server ~]# tail -f /usr/local/psa/var/log/maillog
May 25 14:11:40 p2389772 postfix/postdrop[19684]: warning: unable to look up public/pickup: No such file or directory
May 25 14:13:02 p2389772 postfix/postdrop[19728]: warning: unable to look up public/pickup: No such file or directory
[root@server ~]#

This indicated that PHP might be trying to send in a Postfix-specific method, despite the fact that the server’s MTA is Qmail. Here’s a quick check of the server’s php.ini:

[root@server ~]# grep mail /etc/php.ini | grep -v '^;'
[mail function]
sendmail_path = /usr/sbin/sendmail -t -i
[root@server ~]#

/usr/sbin/sendmail was linked to /etc/alternatives/mta as it should be:

[root@server ~]# ls -la /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Mar  7 10:41 /usr/sbin/sendmail -> /etc/alternatives/mta
[root@server ~]#

But /etc/alternatives/mta was linked to a postfix binary:

[root@server ~]# ls -la /etc/alternatives/mta
lrwxrwxrwx 1 root root 26 May 23 16:46 /etc/alternatives/mta -> /usr/sbin/sendmail.postfix
[root@server ~]#

I removed the /etc/alternatives/mta symlink and recreated it pointing to the qmail executable:

[root@server ~]# rm /etc/alternatives/mta
rm: remove symbolic link `/etc/alternatives/mta'? y
[root@server ~]# ln -s /var/qmail/bin/sendmail /etc/alternatives/mta
[root@server ~]#

And mail submitted via PHP forms began flowing as expected.