In the relatively near future, SourceForge is going to be changing their site hosting policies. Once of the changes is that sites will no longer be able to send email:
"Outbound email from project web and shell servers:
Outbound email from project web servers will be blocked. Outbound email from the project shell servers will be permitted. Projects which use project web applications that require outbound email will need to modify these applications to queue the mail or mail operations to their project database. Projects may then perform the sending of mail via a cron job on the shell server. All mail must originate from the user whose account is being used for the cron job. Projects may create a utility account, to be maintained by project administrators, if needed for this purpose. Outbound mail from the shell server is being segmented from other site mail to reduce the chances of impact to site mailings due to project-caused spam listings. These changes are being made to reduce abuse from the project web servers, including the generation of spam by third parties."
How can I patch my Drupal installations so they will continue to work in this new environment?
Thanks!
Comments
SourceForge Email Changes
Oof...looks like this has already happened, albeit temporarily:
https://sf.net/tracker/?group_id=1&atid=200001&func=detail&aid=1160182
This might
This might help:
http://drupal.org/node/18690#comment-31602
(once available)
As an alternative you can use an external smtp server. Have a look at the user_mail function.
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.6 will support PHP 5.
--
Drupal services
My Drupal services
via user_mail
I've hacked the user_mail function such that it puts the mail messages into a new table i created.
Then I've setup a cron jobs from my home server, that runs a script on the sourceforge shell to pull the new records out of this table and mail them.
If you want, i can submit some code.
Ewout
via user_mail
I'd love to see how you managed this, as would others I'm sure. I know there are quite a few Drupal sites on SourceForge; I wonder how many have realized that their email isn't working?
Via user_mail
Can you post the code for this? I am working with http://f4l.sf.net and we need to fix this.
Thanks
Joe
Code to make this work on sf.net
*** Disclaimer ***
I wrote a perl script to do this on sf.net. But there is a problem. My email account got blocked after a few emails on shell.sf.net. Looks like you are restricted to only a few emails per day per user on shell.sf.net. What a joke.
SMTP error from remote mailer after RCPT TO:: host sc8-pr-sshgate-b.sourceforge.net [10.5.1.1]: 550-You have sent too much email today. Please try again\n550 tomorrow.
But it does work when you are within their set quata.
Anyway:
Step 1) Create email table in SF drupal database
Create a DB table in your drupal database using mysql command:
Hint: Cut and paste the SQL statement into the window after executing the "cat and pipe and mysq"l command. Control-D to finish.
Step 2) Modify user.module file
Add DB query statement to user.module to insert copy of the outbound email in our table.
Step 3) Cut/Paste this perl script
Cut and paste the Perl script that checks the "email" database table, extracts messages and cleans up all records from the "email" table. In my case, I keep downloaded themes and modules in ext/ directory so that when I upgrade I know what I've added, so I also keep the sendmail.pl script in the same directory.
Another words, $DRUPAL_HOME/ext/sendmail.pl
Hint: after executing the cat command with stdout redirection to file, cut and paste the perl script into the same window and hit Control-D to close stdin and tell cat command we're finished writting.
Step 4)
Add a new line to your crontab file on shell.sf.net using the "crontab -e" command:
All * indicate to execute this command every 1 minute interval. You can change it to 10 minute if you'd like. Check man pages, "man 5 crontab" for proper syntax of this file if you are confused by all the "*" there.
No answer from sendmail
Czesc Mark, tanks for the great code!! ;)
I've tested but I had hide problem...
after change in sendmail.pl "sendmail(%mail);" in "sendmail(%mail) or die $Mail::Sendmail::error;" I've found the problem: Bad or missing From address
Probably some server of sf have different sendmail's config!
So I just add the "From" field and this is working code:
One solution might be to use
One solution might be to use an external smtp server. I'm not sure if SF will allow an external connection but I don't know why not. If you don't have an external smtp server you might give hotpop.com a try. Their smtp server access is free at the time of this post.
Earnie Boyd
http://For-My-Kids.Com
http://Give-Me-An-Offer.com
http://AffiliationMaster.com