many hosts, like yahoo or other mail hosts do not return a 250 code.

yahoo:
Could not verify email address at host yahoo.com: 421 Message from (my ip address) temporarily deferred - 4.16.50. Please refer to http://help.yahoo.com/help/us/mail/defer/defer-06.html

other:
Could not verify email address at host somehost: 421 Too much load; please try again later.

therefore many users cant registrate, as their mail isnt listed as valid. in my opinion, if a host returns 421 the mail should be listed as valid

therefore, please change
(line 115)
if (!ereg ("^250", $from)) {
to
if (!ereg ("^250", $from) && !ereg ("^421", $from)) {

and (line 129)
if (!ereg ("^250", $to )) {
to
if (!ereg ("^250", $to ) && !ereg ("^421", $to )) {

thanks!

Comments

Gábor Mayer’s picture

if (ereg ("^5"
escoles’s picture

Couldn't get this fix to work for gmail.com or mac.com.

Unfortunately, in my case, only the non-critical failures are being logged in Watchdog. Critical failures (email address can't be accepted) are not being recorded. So I can't contribute anything to the reasons for failure -- this fix might work perfectly well for others.

dbr’s picture

Assigned: Unassigned » dbr
Status: Active » Needs review

Sorry for the long delay. I guess you were at least able to fix the code locally for yourself.

I don't think change to the FIRST comparison to 250 (in $from) is needed, since at this stage, 421 would lead to assuming we cannot test it, and accept it. Actually your watchlog message shows this is what happened, and the email must have been accepted. Am I missing something there?

However you are right about the test of $to, where we might actually reject the email. I changed the code so that doesn't happen with any 4xx code except 450 (mailbox unavailable).

The code is commited to the drupal 6 branch (port to drupal 5 should be straightforward if you need it), and the 6.x-1.x-dev release with it will appear in the next 12 hours. I actually cannot test it, not having access at the moment to a host allowing outbound port 25 connections (more and more common for home users). So review and testing are welcome.

dbr’s picture

This change is now present in the 6.x-1.1 release.

dbr’s picture

Status: Needs review » Fixed
dgsiegel’s picture

how about 5.x?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.