SMTP Connection Failed error (Intermittent), Postfix mail server

Discussion in 'Server Operation' started by Ahmad Rathore, Jun 13, 2018.

  1. Ahmad Rathore

    Ahmad Rathore New Member

    We use an in house developed PHP based mailing software that connects with Postfix mail server to send out emails through SMTP relay. Every thing had been working fine before but recently we upgraded the mailing software from a single threaded operation to multi threaded one and we started facing SMTP connection failed errors due to timeout. The particular thing about this is that it's an intermittent issue, some times the mail goes through an email address and at other instances it fails. We have tried increasing the process limits in Postfix to see it that helps but to no avail. Can any one please help and suggest some thing.
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    there's not much one could think of without knowing more of it all given the following infos:
    - multi threaded spamming of connections to postfix
    - getting timeouts on ( random, all in one thread at once, ... ) connections.
    Plain timeouts or something logged and then got connection terminated by postfix?

    How do you control the rate of spawning threads / limit max concurrent connections at a time, added some delay before counting -1?
    Some firewall or other port ( dynamic port range) limiting instances cause they think it's an outbreak?

    What would happen, if possible, if your tool doesn't query postfix directly but lets say some kind of api - or for test purpose:
    do the script see timeouts when trying to connect to a webserver at the same rates to see if there might be an issue on the code or code running instance.

    is amavis or alike a bottleneck maybe? receiving too much stuff todo before postfix can finish connection ( depending on the configuration this can happen )?
     

Share This Page