Unable to send email from contact form: cannot create temporary file - (2) No such file or directory

Created:

2016-12-18 06:41:17 UTC

Modified:

2017-08-08 13:30:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to send email from contact form: cannot create temporary file - (2) No such file or directory

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Unable to send email from contact form. In /var/log/maillog the following can be found:

mail plesk sendmail[100481]: cannot create temporary file - (2) No such file or directory
mail plesk sendmail[100481]: Unable to save stdin content to temporary file

/usr/local/psa/handlers/spool has correct permissions:

# ls -la  /usr/local/psa/handlers/
total 32
drwxr-xr-x 8 root root 4096 Oct 28 10:38 .
drwxr-xr-x 14 root root 4096 Dec 6 17:47 ..
drwxr-xr-x 2 root root 4096 Nov 24 12:19 before-local
drwxr-xr-x 2 root root 4096 Nov 24 12:19 before-queue
drwxr-xr-x 2 root root 4096 Nov 24 12:19 before-remote
drwxr-xr-x 2 root root 4096 Nov 30 18:08 hooks
drwxr-xr-x 2 root root 4096 Nov 24 12:19 info
drwxrwx--- 2 popuser popuser 4096 Dec 7 03:26 spool

Permissions for sendmail are correct:

# stat /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
File: Б─≤/usr/lib64/plesk-9.0/postfix-sendmail-wrapperБ─≥
Size: 64528 Blocks: 128 IO Block: 4096 regular file
Device: 803h/2051d Inode: 4992976 Links: 1
Access: (4555/-r-sr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

Sending mail from website is realized using .cgi script

Cause

Incorrect configuration in .cgi script

Resolution

Check .cgi script which is using for sending mails.

Make sure that value for variable $mail_location if defnied correctly:

$mail_location = "/usr/sbin/sendmail";
Have more questions? Submit a request
Please sign in to leave a comment.