LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2007, 10:57 PM   #1
pk_kala
Member
 
Registered: Feb 2006
Posts: 34

Rep: Reputation: 15
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
 
Old 10-09-2007, 07:42 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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
 
Old 10-09-2007, 09:13 PM   #3
digitalboy74
Member
 
Registered: Aug 2004
Location: Matrix
Distribution: slack currrent
Posts: 61

Rep: Reputation: 16
It is likely that qmail is requiring /n/r in the php mail() headers

google phpsecurewiki mail()
 
Old 10-11-2007, 04:23 AM   #4
pk_kala
Member
 
Registered: Feb 2006
Posts: 34

Original Poster
Rep: Reputation: 15
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
 
Old 10-11-2007, 06:58 AM   #5
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
It is possible that you use SMTP instead of the binary program for sending emails?
 
Old 10-11-2007, 07:49 AM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
chmod -R 0777 /var/qmail
(not very safe but will probably do the trick?)
 
Old 10-11-2007, 08:32 AM   #7
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
Quote:
Originally Posted by j-ray View Post
chmod -R 0777 /var/qmail
(not very safe but will probably do the trick?)
No, no, no!

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.
 
Old 10-15-2007, 02:17 AM   #8
pk_kala
Member
 
Registered: Feb 2006
Posts: 34

Original Poster
Rep: Reputation: 15
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
 
Old 05-02-2009, 08:33 AM   #9
adkeva
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qmail-send complains about ALL email addresses stabu Linux - Server 4 02-03-2007 03:43 PM
qmail doesnt send email to the outside world leosgb Linux - Networking 7 04-28-2006 07:32 PM
qmail & php email error tebucky Linux - General 2 10-04-2005 10:13 AM
Qmail: send email from shell mikeshn Linux - General 1 09-30-2004 01:19 AM
qmail wont send email to addresses not in my domain robmainella Linux - Software 2 02-02-2004 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration