php script don't send email with qmail
This's php script
<?php mail('root@localhost', 'the subject', 'the message', null,'-fwebmaster@localhost.com'); ?> This's qmail log qmail-queue-handlers[28308]: Handlers Filter before-queue for qmail started ... webpanel3 qmail-queue-handlers[28308]: cannot create temporary file - (13) Permission denied webpanel3 qmail-queue-handlers[28308]: cannot read message from stdin How i resolve? Thank you |
i assume the script is run via a http server and not from command line. The server user ( apache -> nobody or www ) doesnt have the rights to create the needed temporary file. So set the directory where it should be created to
chmod 0777 directory i dont know where qmail uses to create that unfortunately. You have to find out yourself... cheers, j |
It is likely that qmail is requiring /n/r in the php mail() headers
google phpsecurewiki mail() |
Hi
This is qmail user: alias:x:2021:2020:Qmail User:/var/qmail/alias:/sbin/nologin qmaild:x:2020:2020:Qmail User:/var/qmail/:/sbin/nologin qmaill:x:2022:2020:Qmail User:/var/qmail/:/sbin/nologin qmailp:x:2023:2020:Qmail User:/var/qmail/:/sbin/nologin qmailq:x:2520:2520:Qmail User:/var/qmail/:/sbin/nologin qmailr:x:2521:2520:Qmail User:/var/qmail/:/sbin/nologin qmails:x:2522:2520:Qmail User:/var/qmail/:/sbin/nologin and qmail directory /var/qmail drwxr-sr-x 2 alias qmail 4096 Jul 6 16:08 alias drwxr-xr-x 2 root qmail 4096 Jul 12 19:34 bin drwxr-xr-x 2 root qmail 4096 Jul 12 19:34 boot drwxr-xr-x 2 root qmail 4096 Oct 11 16:12 control drwxr-xr-x 7 qmaild qmail 4096 Jul 11 21:19 handlers drwxr-xr-x 16 root qmail 4096 Oct 10 17:30 mailnames drwxr-xr-x 2 root qmail 4096 Jul 12 19:34 plugins drwxr-x--- 11 qmailq qmail 4096 Jul 6 16:08 queue drwxr-xr-x 2 root qmail 4096 Oct 10 17:30 users How i resolve this problem? Thank you |
It is possible that you use SMTP instead of the binary program for sending emails?
|
chmod -R 0777 /var/qmail
(not very safe but will probably do the trick?) |
Quote:
qmail is structure such that, instead of a single task to handle emails, it is split into many small task. One handle injecting, one handle local email, one handle remote email and so on. So, User permission is very important, since each task will run in its own user level. Creating an incorrect ownership file may lead to even more problem. |
Hi, ALL
I run chmod -R 0777 /var/qmail already.( before ghostdancer post reply ) Now I think my qmail is broken. I reinstall already. Thank you very much |
How to force users to change our password at the first connection
HI ALL,
i use a server qmail+Vpopmail+qmailadmin+squiremail and when i create a user account the default password is "password". can someone help me to find a script to force user to change password at the first connection and one once per month. thanks |
All times are GMT -5. The time now is 08:56 AM. |