[xmail] Re: xmail sendmail, php and shared webhosting
On Saturday 15 October 2005 22:18, Davide Libenzi wrote: On Sat, 15 Oct 2005, Dick van der Kaaden wrote: What you think about a version of sendmail that has an option to use the Fr= om:=20 header address as smtp mail from. Do you envision any problems with this? The thing is that the current behavior does not work well in the shared=20 hosting environment that we operate for our customers. Most of the these=20 sites use php and the php mail function. This function does not allow you t= o=20 set the smtp mail from and it simply calls xmail's sendmail.=20 Sendmail's default behavior is to use [EMAIL PROTECTED] as mail from. This is n= ot=20 very usefull! It will not allow our customers to receive bounces. Setting t= he=20 domain in a virtualhost definition does not help either, since you cannot s= et=20 the username. Asking our customers to create an [EMAIL PROTECTED] email=20 address to receive bounces is not very user friendly. Forcing them to use a= n=20 smtp mailer is also not user friendly.=20 I looked at sendmail and worked out how a way to implement this.=20 =2D All rcpt to's are stored in a new temporary file.=20 =2D No output is sent to szmailfile before having read all email headers.=20 =2D While reading thru the headers I set the szmailfrom to the address on t= he=20 =46rom line.=20 =2D If there is no From line or the From line contains an invalid address=20 (according to AddressFromAtPtr) then nothing gets set and sendmail will use= =20 szmailfrom as previously setup in SysGetUserAddress.=20 =2D After reading the headers, dump the mail from and rcpt to lines. If you are interested in the code them let me know. Dick, isn't it possible to do something on the PHP side? Sure, you can use all sorts of libraries to send mail via smtp with php. The thing is, I cannot prevent my customers from using the php mail function. Basically, the change you made, setting the smtp mail from, has an unwanted side effect in case the mail bounces. This just generates useless extra mail traffic, since I am not at all interested in these bounces. The bounce is only usefull for my customer (e.g. the From: header). All in all it is not a big issue, but having more control over the smtp mail from address would be usefull for webserver environments. I do not know if many people are using xmail in a setup like ours. Dick - Davide - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: earthlink modified
Hello Jeff, Jeff Buehler wrote: Davide, sorry - I just reread you previous email and I now realize that you clarified already that XMail does not try an A record if MX records exist, but I am a bit confused. Are you saying that it will try the A record if the MX records exist but fail, or that it won't try the A record at all if any MX records exist even if sends to them fail? Earthlink seems to be failing because after all MX records fail, if the A record is then attempted the send is terminated completely, rather than XMail continuing to try the MX records as it should later. Or am I not clearly understanding the mechanism here... A records should be queried and used if (and only if) MX records are not present (to my knowledge). Without reviewing the code (my C skills are ... lacking) the following possibility comes to my mind: MX is queried, but somehow not retrieved (DNS server error, badly configured firewall = 53/TCP not allowed, network problem), _then_ XMail tries to retrieve an A record and succedes with this. @Davide: is it possible that XMail falls back to an A record if there's an error other than no domain while retrieving MX records? That could cause such a problem, if I'm not mistaken. Also, does XMail re-resolve MX/A for repeated delivery attempts? That would be nice, because that may solve problems with configuration changes or corrected errors on the target domain's side. @Jeff: Best option IMO would be to store an SLOG-file of such a case and post it here... Regards, Manuel Martin - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: xmail sendmail, php and shared webhosting
On 15.10.2005 13:50, Dick van der Kaaden wrote: Davide, What you think about a version of sendmail that has an option to use the From: header address as smtp mail from. Do you envision any problems with this? The thing is that the current behavior does not work well in the shared hosting environment that we operate for our customers. Most of the these sites use php and the php mail function. This function does not allow you to set the smtp mail from and it simply calls xmail's sendmail. It does, if you don't use PHP's safe_mode - see here: http://php.speedbone.de/manual/en/function.mail.php Description bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] ) 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. So you can use the fifth parameter and [EMAIL PROTECTED] and it's becoming the Return Path / MAIL_FROM. - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: xmail sendmail, php and shared webhosting
On Sunday 16 October 2005 17:44, Sönke Ruempler wrote: On 15.10.2005 13:50, Dick van der Kaaden wrote: Davide, What you think about a version of sendmail that has an option to use the From: header address as smtp mail from. Do you envision any problems with this? The thing is that the current behavior does not work well in the shared hosting environment that we operate for our customers. Most of the these sites use php and the php mail function. This function does not allow you to set the smtp mail from and it simply calls xmail's sendmail. It does, if you don't use PHP's safe_mode - see here: http://php.speedbone.de/manual/en/function.mail.php I must admit that I had not RTFM and did not realize it was possible under normal operation. Unfortunately, we do use safe mode for our virtual hosts. Most of our customers run standard php scripts that occasionally have security issues. Reading the php manual I realized that my change does have a security impact. Allowing an arbitrary mail from address from an untrusted source is not a good thing. I think it will be better to limit the domain part of the smtp mail from to the virtualhost servername. The user part must be configurable. I will have to think about this a little longer Dick - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]