Replacing header information


#1

We are using an automated emailing system to send messages our newsletters / announcements on the forums. Our MX settings are configured on Google Apps. Hence the SMTP points to Gmail server.
Now, if we do not configure this and instead opt for the PHP Mail Function, or Sendmail, the emails received get the “mailed-by willie.dreamhost.com” displayed. Is there any possibility to replace this name? What do I need to do to change the header information?


#2

First, determine or setup a special email address you want mail delivery failures/bounce messages to be sent back to. For example perhaps postmaster@example.com - make sure it is an address on your account.

Then pass "-fpostmaster@example.com" as the $additional_parameters argument to the mail() function. This will then have Postfix use that address for the envelope sender.

Also make sure you understand the sending restrictions: http://wiki.dreamhost.com/SMTP_quota

Customer since 2000 :cool: openvein.org


#3

I am using Joomla and not really sure where do I need to edit that. Please help.


#4

Try sepcifying the Sendmail Path as “/usr/sbin/sendmail -fpostmaster@example.com” then.

Customer since 2000 :cool: openvein.org


#5

This really resolved for Joomla.

Now, I have some emails to be sent through the PHP List and that displays as follows:-

mailed-by yourdomain.dreamhost.com

What do I need to do in the PHP List? Any help?


#6

Any help here possible?
Those who would have configured PHP List?


#7

[quote]Any help here possible?
Those who would have configured PHP List?Mirror this site:[/quote]
Update the config.php file

61 # Message envelope. This is the email that system messages come from 62 # it is useful to make this one where you can process the bounces on 63 # you will probably get a X-Authentication-Warning in your message 64 # when using this with sendmail 65 # NOTE: this is *very* different from the From: line in a message 66 # to use this feature, uncomment the following line, and change the email address 67 # to some existing account on your system 68 # requires PHP version > "4.0.5" and "4.3.1+" without safe_mode 69 # $message_envelope = 'listbounces@yourdomain';Because later on in the sendMail() function:

292 if ($this->message_envelope) { 293 $header = rtrim($header); 294 if ($header) 295 $header .= "\n"; 296 $header .= "Errors-To: ".$this->message_envelope; 297 if (!$parameters || !ereg("-f".$this->message_envelope)) { 298 $parameters = '-f'.$this->message_envelope; 299 } 300 }So if $message_envelope is set to ‘postmaster@example.com’ then $parameters is set to ‘-fpostmaster@example.com’ and gets passed to mail() … sound familiar?

Customer since 2000 :cool: openvein.org


#8

Updated the following in config.php
69 # $message_envelope = ‘emailid@domainname.com’;

But did not get really where the sendMail() function is in which file.

And does that mean I need to update the:

297 if (!$parameters || !ereg("-f".$this->message_envelope)) {
298 $parameters = ‘-f’.$this->message_envelope;


#9

Please let me know if any further clarification is required on this.


#10

[quote] Updated the following in config.php
69 # $message_envelope = ‘emailid@domainname.com’;
[/quote]
Did you uncomment that line? You have to remove the leading # to uncomment a line.

I showed the other code to demonstrate that $message_envelope is passed to the sendmail program as the -f parameter, because the comments in the config file don’t point that out. Which means you don’t have to modify anything else to set the envelope sender.

Customer since 2000 :cool: openvein.org