Mail Server Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsSystem AdministrationMail Server Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old October 23rd, 2003, 11:24 AM
KungFuYou KungFuYou is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 KungFuYou User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sendmail error from php mail() function

I have set up a php mail script for a website which is not returning any error messages - code below:

$myname = "Alex";
$myemail = "alex@myemail.com";
$contactname = $username;
$contactemail = $_POST[email];
$subject = "my subject";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"".$myname."\" <".$myemail.">\n";
$message = "my message";

mail("\"".$contactname."\" <".$contactemail.">", $subject, $message, $headers);

This seems to be working fine. Only my mail log is returning the following error:

Oct 23 15:08:09 xxxx sendmail[6837]: h9NE89p06834: SYSERR(httpd): openmailer: insufficient privileges to change uid: Operation not permitted

Have not got a clue on this one - any ideas appreciated....

Last edited by KungFuYou : October 23rd, 2003 at 11:28 AM.

Reply With Quote
  #2  
Old October 24th, 2003, 09:37 PM
KungFuYou KungFuYou is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 KungFuYou User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
After hours of trawling (and a few beers) I found the solution:

For future reference -

This is a problem caused by subprocesses being run as the recipient ID who wont have the same permissions as root. The fix:

Modify sendmail.cf

Changes to /etc/sendmail.cf

Add the o flag and remove the S flag in the Mlocal, F= section (last lines of the file).

Before

Mlocal, P=/usr/sbin/scanmails, F=lsDFMAw5:/|@qS Pfhn9, S=10/30,
R=20/40,
T=DNS/RFC822/X-Unix,
A=scanmails -Y -a $h -d $u

After

Mlocal, P=/usr/sbin/scanmails, F=olsDFMAw5:/|@qPfhn9, S=10/30,
R=20/40
T=DNS/RFC822/X-Unix,
A=scanmails -Y -a $h -d $u


Thanks to http://www.ahinc.com/linux101/email.htm for that little beauty

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationMail Server Help > Sendmail error from php mail() function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway