Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am helping out with some Linux admin work. The server hosts several sites. The admin interface used is WHM.

When an email from one of the hosted sites bounces, the site is not notified - it just goes to nobody@server.

How can I configure this to go back to each sites contact?

The mail server is Courier.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

courier is not actually the issue here, it sounds like your apache and php is setup in DSO (mod_php) mode which means apache and php run as the nobody user this means that by default if not set emails sent via php/the webserver will appear to come from nobody@server as thats the user that created the original email, there are really only 2 solutions here

make sure each site that sends emails is correctly configured to also send the reply-to header and set the from header during mail send, this way bounce messages will go to the correct place

use a different php mode like suphp or fcgid which will run the processes as each user and will then bounce back into there cpanel account - this will still need them to forward it from there cpanel default account to there own account but at least its going to the user.

share|improve this answer
    
Thanks for the feedback. Are you able to elaborate - this is volunteering for a charity and their associated sites and I'm a .NET programmer, not a sysadmin... By reply to do you mean when each site actually sends the mail? –  Sam Aug 5 '11 at 11:48
    
depending on what there site is built on there should be the ability to set the from email address, if not then its slightly more complex but in most cases adding something like php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@mydomain.com" to the .htaccess file for that domain should work –  anthonysomerset Aug 5 '11 at 12:17
    
Thanks - appreciate it. –  Sam Aug 5 '11 at 12:29
    
Bounce messages use the envelope not the headers, remember. It is the envelope sender that you need to alter here, not the Reply-To: or From: headers. –  JdeBP Aug 5 '11 at 15:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.