#405 Input sent without waiting for greeting

5.0
closed
nobody
None
1
2013-09-12
2011-09-16
chuckeee
No

We noticed that PHPMailer may not be waiting long enough to be greeted by an SMTP server before continuing to send data.

Putting
sleep(10);
in the class.smtp.php file, immediately before
if(empty($this->smtp_conn))
solved this issue.
Perhaps PHPMailer should be waiting to be greeted by the SMTP server?

The errors we saw were these:
SMTP protocol synchronization error (input sent without waiting for greeting)

Discussion

  • Marcus Bointon

    Marcus Bointon - 2013-03-14

    This is in the Connect function. It's quite common for servers to impose a long (but usually varying randomly) greetdelay as an anti-spam measure, or just because they are slow. The connection already specifies a timeout for the connection (defaults to 30 sec) but the delay after connection but before greeting could be up to a couple of minutes. Adding a fixed sleep like this will penalise all connections, including those that may not need it, and it may not be enough to cope with servers actively using greetdelay. It certainly should wait to be greeted before continuing, but it should wait for the greeting, not for a random amount of time.

     
  • Marcus Bointon

    Marcus Bointon - 2013-03-14
    • milestone: --> 5.0
    • priority: 5 --> 1
     
  • Marcus Bointon

    Marcus Bointon - 2013-03-25
    • status: open --> accepted
     
  • Marcus Bointon

    Marcus Bointon - 2013-09-12
    • status: accepted --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks