LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 12-16-2005, 06:56 PM   #1
housemusic42
Member
 
Registered: Dec 2003
Location: St. Louis
Distribution: redhat 9
Posts: 31

Rep: Reputation: 15
Apache 1.3 webserver email


greetings,


I'm using a LAMP arch and invoking php and curl to send out email messages automatically.

Now, apache@webserver.xyz.com is the return-path. Is there a way to change that address? I've checked httpd conf and didnt' see anything and read something on apache.org about having to recomplie from source <eek!>, but i figure there's got to be a way to change the return-path information. Anyone have any ideas? I've posted example for the confused.


Code:
Return-Path: <apache@webserver.xyz.com>     <---- this is what i want to change
Received: PENGUIN-HIGHROLLER fromhostname:webserver.xyz.com fromhostip:192.168.123.123 fromhostport:28589 by server.xyz.com with protocol:ESMTP id:jBGJKOUf031724 for user:<user@internet.net> time:Fri, 16 Dec 2005 13:20:24 -0600 numerictime:200512161920
Received: (from apache@localhost)
by webserver.xyz.com (8.11.6/8.11.6) id jBGJK6s30072;
Fri, 16 Dec 2005 13:20:06 -0600
Date: Fri, 16 Dec 2005 13:20:06 -0600
Message-Id: <200512161920.jBGJK6s30072@webserver.xyz.com>
To: user@internet.net
Subject: Enrollment Confirmation
From: Email@email.net
thanks for your help.

 
Old 12-17-2005, 12:33 PM   #2
housemusic42
Member
 
Registered: Dec 2003
Location: St. Louis
Distribution: redhat 9
Posts: 31

Original Poster
Rep: Reputation: 15
i've answered this, and thought i'd post a follow up for anyone interested.

using the PHP mail command, you use some additional header options making calls out to sendmail:

Quote:
additional_parameters (optional)

The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.
then write your sciprt:

Quote:
<?php
mail('nobody@example.com', 'the subject', 'the message', null,
'-fwebmaster@example.com');
?>
and like magic it's there. yay! \o/
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webserver Seperate from Email server Elguapo Linux - Networking 1 04-06-2005 12:12 PM
Apache webserver name karupt Linux - Networking 2 08-01-2004 11:55 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache webserver nooodles Linux - Networking 8 06-30-2004 01:04 AM
Apache webserver trusouthrnplaya Linux - Networking 1 03-30-2003 11:34 AM


All times are GMT -5. The time now is 04:56 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration