Sending emails with PHP
When sending emails with PHP, (from looking at the logs) the from address is translated to 'webIDfirstname.lastname@example.org.
But when the email is delivered, the from address looks correct (mailbox@domain).
So here is the example from my log:
amavis: (02564-02) Passed CLEAN, <email@example.com> -> <sales@recipientdomain>, Message-ID: <20090331122742.9E66FF7C24F@websrv1.serverdomain >
So the server domain is not the same as the website sending the email.
I can't even see a reference of the actual domain.
some mail servers will not accept emails like this.
said: 550-Verification failed for <firstname.lastname@example.org> 550-The mail server could not deliver mail to email@example.com
But if it did a verification on the actual sender domain, it would be fine.
When using Outlook, it does not do this. The address is correct, even when looking at the log.
I had the same thing with ISPconfig2, just cant figure out what it is.
Any help would be much appreciated.
when looking at the Message source (on an email client once the message has been delivered), its only the 'return-path' that has the translated address, the actual 'from' is the correct email address.
And the message ID is 20090331033304.B98012180AC@websrv1.serverdomain
yeah, it seems that the 'return-path' is taken from who delivers the email to postfix which is the user that apache ran the script as.
Seems like there is much discussion about this but no real way to override it.
Sure there is.
Make sure you set a from email address in the header!
And when the recipient mail server validates the email, it validates the return-path, not the from address.
I understand this is how a normal Unix mail system would work. A user sends a mail, it uses the username @ domain, there is no seperate email field.
I have been working on this issue on and off for almost 2 years... I doubt its going to be as simple as that.
You may wanna try the so called "fifth parameter" or "5th parameter" of the mail functionů
Na man, its not the script.
It happens with Joomla, Indexu, Gallery2 etc.
Im not gona go and edit the sendmail files on each application.
The problem is with ISPConfig, not the PHP scripts...
The problem is in your script or setup and not ispconfig as ispconfig does not interfere in the mail sending process at all. The mail is handled by postfix and not ispconfig.
Yeah maybe not ISPConfig itself, but it NOT the script!!
these are prebuilt scripts like Joomla, not something I made.
My hosted domain is test.com, my server is on lab.com
The PHP script on the hosted domain sends an email using the PHP sendmail command, the user sending the email is firstname.lastname@example.org so it is understandable that this will be the return path.
The from address is correct, email@example.com, but when a mail server validates the sender, it validates the return path.
So 95% of emails being sent from this server work fine, but the ones that validate the return path will not accept.
This may be an unavoidable issue with hosting multiple domains, but maybe there is something that can be done? but if you don't know, don't tell me my script is wrong because it's not! you will just confuse people reading this.
|All times are GMT +2. The time now is 20:27.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.