CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Error with CiviMail --> ASSP --> Postfix
Pages: [1]

Author Topic: Error with CiviMail --> ASSP --> Postfix  (Read 1219 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Error with CiviMail --> ASSP --> Postfix
June 19, 2009, 09:13:02 am
I have had problems sending via CiviMail when my MTA (Postfix) is proxied by ASSP (Anti-Spam Smtp Proxy).

Put very simply, I get the following error in my Postfix log, which is resolved by the following workaround.

Error message in log: Jun 20 00:15:23 news postfix/smtpd[28094]: lost connection after DATA (0 bytes) from localhost[127.0.0.1]
Workaround: on line 196 of packages/Net/SMTP.php in function _send() set the $blocksize argument of the Net_Socket::write() call to 1500 (the MTU size on my server)

It seems that what is happening is that CiviMail tries to send the SMTP DATA of the email in one hit (this is what happens when $blocksize is null). ASSP can't cope, and drops the ball. No DATA gets through to Postfix, so it times out and complains about the lost connection. The workaround chunks the data so ASSP doesn't choke.

I'm OK with this workaround for now, but I'm going to list what I've discovered so far in case someone more knowledgeable than I can suggest a better fix, or in case future forum searchers find this helpful.

  • lost connection after DATA - the Postfix documentation suggests this error occurs as a result of servers using MTU discovery. However I get this error on sending from my localhost, and I get it with ASSP present but not with bare Postfix. I did try fixing the MTU but to no avail.
  • OpenSSL error: 1409F07F: SSL routines: SSL3_WRITE_PENDING: bad write retry - this message appeared in the civimail.cronjob.php logs. A patch is available but is not applied in any of the OpenSSL releases (see http://rt.openssl.org/Ticket/Display.html?id=598 for details). As this patch was developed for the case of a large email (and this issue of mine is size-related) perhaps that's an avenue to explore. However, I'm not wanting to touch security-related code.
  • SMTP RSET - when I turned on debugging in packages/Net/SMTP.php I noted that CiviMail sent an SMTP RSET command and then an SMTP QUIT. This doesn't happen when the workaround is applied (an SMTP QUIT is sent after each email, so CiviMail authenticates for each message). Perhaps the logic for sending an RSET might yield some clues to a better solution.
  • ASSP bug? - I'll post on the ASSP lists to see if this is a problem with ASSP as I suspect.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Error with CiviMail --> ASSP --> Postfix

This forum was archived on 2017-11-26.