[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

Postfix: Handling bounced e-mail sent by Apache web server

I'm running Debian Woody with Apache.  Some php scripts I use send out e-mails and bounced e-mails end up in a 'www-data' mailbox in the /var/mail directory with my other POP3 accounts.

But I don't want them to end up there.  I want them to go to the e-mail box identified in the "Reply-to:" line of the e-mail.  How can I do this?
0
nysus1
Asked:
nysus1
  • 2
1 Solution
 
wesly_chenCommented:
Hi,

   Procmail can forward the email to reply-to:
http://www.beedub.com/cgi-bin/wiki.cgi/27
http://www.wecs.com/replytorc.htm

Wesly
0
 
nysus1Author Commented:
Wesley,

Thanks for your answer but I found another way using the -f sendmail option as part of php's mail() function like so:

<?php
mail("nobody@example.com", "the subject", $message,
     "From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}");
?>

That took care of things nicely.

See http://us2.php.net/manual/en/function.mail.php
0
 
wesly_chenCommented:
Hi nysus,

Thanks for your information.

Regards,

Wesly
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now