I often receive Drupal.org e-mails from the group I have suscribed to, or from other members through the e-mail contact form in my junk folder in hotmail. I never bothered too much with that as I check this folder also.
Then I started to experience more serious problems. My ISP host is not accepting any of the e-mails I sent from my Drupal install on Dreamhost. Mail is not delivered. I get an e-mail back in Dreamhost that says something along the lines that the e-mail failed to be delivered because the other host considered it abusive.
I inquired about this with my ISP provider. They suggest I use a fifth argument when using the php function mail().
I am gonna try that. I will seriously need to hack Drupal's code for this, and maybe someone can help me...? I just need to know which function to change... then I'll look up all instances where that function is called.
Researching into this matter, I found this, in a David Power's book I bought (a most remarkable php book by the way) : Php Solutions :
Most people are unlikely to need the fifth argument, although some hosting companies now make it a requirement. It ensures that the email is sent by a trusted user, and it normally consists of -f followed (without a
space) by your own email address, all enclosed in quotes. Check your hosting company’s
instructions to see whether this is required and the exact format it should take.
In understand Drupal's code enough to understand that this fifth argument isn't being used.
Once I test this, and if this helps me solve the problem with my ISP provider, I could describe the changes to be made, create a patch, then someone understanding CVS could change the header of this patch and he/she could submit it.
Thanks for your help on this.
Comments
narrowing it down
Here is the code which I think deals with sending e-mails from drupal in modules/user.module :
Questions :
Info on mail() found on http://ca3.php.net/manual/en/function.mail.php.
Caroline
Using the fifth argument...
Example of use :
Caroline
--
The following thread : http://drupal.org/node/59085 talks about fixing delivery issues with a -f parameter in what I assume is the php.ini file, but I am not sure.
I think I am definately on to something here.
Please help. I am far from being an expert with mailing.
Does adding the "-f $from"
Does adding the "-f $from" make it work?
As one option, rather than hacking the core code, it looks like you can just set the variable "smtp_library" to point to a customized include file, and then implement user_mail_wrapper().
Maybe for 5.x (or 6.x) this last parameter should be set?
---
Work: BioRAFT
Not yet know
I haven't tried it yet because I can't find where the user_mail_wrapper() function is defined.
Do you know ?
Sounds like a great idea! What is smtp_library ?
Caroline
smtp module
I've got similar concerns as I'm about to start mailing out using simplenews module.
AOL seem to cause the most problems, with a lot of new user confirmation emails never being delivered.
Might the smtp module help as it enables mail to be sent through an authenticated smtp server?
http://drupal.org/project/smtp
Mark
The problem I am
The problem I am experiencing with my own ISP provider (with my university) is that Drupal e-mails get bounced back. So you may indeed very well experience the same problem as I do. In dreamhost (my hosting cie), I do receive an e-mail telling me that my e-mails have not been accepted by my ISP provider. (But they are accepted by hotmail & other mail services).
I understand that contributed modules usually resort to Drupal functions to send e-mails. Actually I remember seeing much contributed stuff which was directly using mail(), which isn't such a good idea.
The SMTP module might help.
I am very interested though in getting the core improved on this matter.
Let's keep on helping one another with this.
Caroline
I don't think that this module will help us
The question is : what is an authenticated SMTP server ?
Mine (I think) is authenticated allright insofar as that I can send and receive e-mails with it, except when it comes to Drupal and a few receiving ends, like my own ISP provider. And you the same : you experience problems with Drupal when AOL is the receiving end.
Return-Path not being set correctly
I have quite a large number of AOL users that have never logged into the site - meaning that the user confirmation email has probably never been received.
Sorry that should be an SMTP server requiring authentication.
My thought is that some mails may get blocked because they are being generated by the mailing scripts - maybe something in the headers?
Like the Return-Path not being set correctly?
AOL (for instance) has guidelines for accepting mail: http://postmaster.aol.com/guidelines/standards.html
In the guidelines it states "AOL may reject connections from senders who are unable to accept at least 90% of the bounce-return messages (mailer-daemon failure/error messages) destined for their systems."
If the Return-Path isn't set correctly this will prevent bounce-return, so I thought that by sending mail through SMTP might give more acceptable headers. I too am no mail server expert so I'm just guessing.
The Return-Path module solves this problem, however I'm using simplenews/mimemail modules and this doesn't seem to set the path correctly. The standard Drupal emails are set correctly though.
Having just looked over returnpath module it might be your answer...
--
There you go! It's that -f option, that fifth argument. Headers are the fourth argument.
I will look into the contrib module. Then I will file a request or submit a bug about this with Drupal 5 or 6. I suspect that we will run into more and more problems in the future as mail services are trying to overcome spam.
Caroline
I will try it
Good find by the way!
http://drupal.org/project/returnpath
Description :
--
The returnpath module does not fix my problem unfortunately.
abuse
Here is what I am getting on my end (the e-mail is bounced) :
<****@****.ca>: host mail3.****[x.x.x.x] said: x x.x.x
<****@*****.ca>... REJECT 550 rejet:abus/abuse - xxxx -
x.x.x.x (in reply to RCPT TO command)
Valid email?
After a quick google for"REJECT 550 in reply to RCPT TO command"
Is the 'from' email address you are using valid? Is it capable of receiving mail or is it a dummy donotreply@example.com type address?
Also can you do a reverse DNS lookup for the domain?
Try dnsstuff.com
--
When I get the same e-mail in hotmail.com for example, I can reply to it there. The from e-mail address is valid.
Ok, something else to learn :) Will look into this.
Thanks for having looked for a description of the error!
I so much wished that the e-mails wouldn't bounce... at least get into the junk filter. That ISP has filters for spam. It's my university ISP and it's important that people at my university can use my web site.
Found the solution to what sounds like a similar problem.
Here is what the host wrote to me when he discovered the problem:
I hope this helps others, I'm so relieved.
Shai
content2zero.com
Update for 5.0
Update for returnpath:
http://drupal.org/node/111831
This thread saved my life! I just moved to 1&1 and spent at least 10 hours troubleshooting this to try to get mail sent from my website roadrulesrevenge.com!
Thanks everyone! Return path worked!