zytzagoo / smtp-validate-email

A PHP library for performing email addresses validation via SMTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error on validate a specific email address

byman64 opened this issue · comments

I can send you the email address. Please send me an email and I will reply.

thanks

[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_Timeout' with message 'Timed out in recv' in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php:627, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: Stack trace:, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #0 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(651): SMTP_Validate_Email->recv(3), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #1 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(555): SMTP_Validate_Email->expect(Array, 3), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #2 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(312): SMTP_Validate_Email->rset(), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #3 /var/www/clients/client6/web12/web/tools/mailcheck/validateajax.php(43): SMTP_Validate_Email->validate(Array, 'admin@xxxx...'), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #4 {main}, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: thrown in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php on line 627, referer: http://www.mysite.com/mytools/mycheck/

Turn on debug, see what's happening (which SMTP command is timing out)...
Maybe try increasing timeout for that command, or it could be an issue with some specific SMTP server even... Hard to tell without more info.

I would like give you the email address....how we can exchange it in private?

I switched on the public var debug but I am trying to understand how/where see the debug info...

CLI enviroment only?

public $debug = true;

Here what I see from cli

php validateajax.php

PHP Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_Timeout' with message 'Timed out in recv' in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php:627
Stack trace:
#0 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(651): SMTP_Validate_Email->recv(3)
#1 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(555): SMTP_Validate_Email->expect(Array, 3)
#2 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(312): SMTP_Validate_Email->rset()
#3 /var/www/clients/client6/web12/web/tools/mailcheck/validateajax.php(47): SMTP_Validate_Email->validate(Array, 'admin@xxxx...')
#4 {main}
thrown in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php on line 627

If $debug is true, there should be echos all over the place (not ideal, but hey...). Unless you're buffering output or something to that effect. You also appear to be using it in an ajax context, so that might complicate things further.

So, please, reduce your problem/context to a simple .php file that includes the class and uses it to validate the address you're having problems with. Run that simple test file and see what the output (and debug output) is.

I onlyoverwritten domain, mail and path

root:php test.php

MX records (mymaildomain.it): Array
(
[mail.mymaildomain.it] => 10
[mymaildomain.it] => 0
)

Connecting to mail.mymaildomain.it:25
Connected to mail.mymaildomain.it:25 successfully
<<<recv: 220 SPAMfighter ESMTP service ready

send>>>: EHLO mydomain.com
<<<recv: 250-SPAMfighter SMTP says Hello

<<<recv: 250-SIZE 209715200

<<<recv: 250 OK

send>>>: MAIL FROM:admin@mydomain.com
<<<recv: 250 OK

send>>>: NOOP
<<<recv: 250 OK

send>>>: RCPT TO:catch-all-test-1403862690@mymaildomain.it
<<<recv: 250 OK

send>>>: NOOP
<<<recv: 250 OK

send>>>: RCPT TO:miky@mymaildomain.it
<<<recv: 250 OK

send>>>: NOOP
<<<recv: 250 OK

send>>>: RSET
<<<recv: PHP Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_Timeout' with message 'Timed out in recv' in /mypath/smtp_validateEmail.class.php:627
Stack trace:
#0 /mypath/smtp_validateEmail.class.php(651): SMTP_Validate_Email->recv(3)
#1 /mypath/smtp_validateEmail.class.php(555): SMTP_Validate_Email->expect(Array, 3)
#2 /mypath/smtp_validateEmail.class.php(312): SMTP_Validate_Email->rset()
#3 /mypath/test.php(9): SMTP_Validate_Email->validate()
#4 {main}
thrown in /mypath/smtp_validateEmail.class.php on line 627

Hm, at first it looks like it's not receiving a response to a RSET command within 3 seconds?

However, there should've been some additional debug output there (potentially empty) due to code on line 623? Has there been but you maybe removed it?

Can you try changing line 124 (https://github.com/zytzagoo/smtp-validate-email/blob/master/smtp-validate-email.php#L124 and modify the rset timeout from 3 to, hmm, let's say 180? And then try running the script again to see if it makes any difference.

Your suggest was right. I changed the "rset" value from 3 to 30 and now it works fine.
That email addressed required around 10 seconds.

May be you have to increase the default value.

thanks
ciao

Last info, as you noted, the smtp server is "SPAMfighter" ... so, maybe, the 10 seconds of delay are wanted.

ciao and thanks again