Postfix timed out while receiving the initial server greeting

Discussion in 'Installation/Configuration' started by logicasrl, Sep 22, 2010.

  1. logicasrl

    logicasrl New Member

    Hi everybody,

    I obtain the warning in the title when I use IPConfig 3 as outgoing mail server, but only for certain destination domains.

    After some testing, I've noticed that this happens only with destination mail servers that does not respond immediately to a connection to their TCP:25 port. In these cases my Postfix think that the destination server is not responding, write the warning "timed out ..." to the mail.err log and maintain the undelivered messages in the queue (postqueue -p), indefinitely...

    I would have found a solution, consisting in configuring a custom "transport" in Postfix and adding the parameters "smtp_connect_timeout" and "smtp_helo_timeout" to this new transport (in /etc/postfix/master.cf) but I'm wondering which is it the best way to realize this in ISPConfig3.
    Within ISPConfig3 there is no "/etc/postfix/transport" file (replaced by the "mail_transport" table in the "dbispconfig" database, I suppose) and then I'm wondering if it is correct to manually modify "main.cf" (adding the file to "transport_maps"), "transport" and "master.cf" files.

    Any suggestion?

    Thank you very much,
    Luca
     
  2. logicasrl

    logicasrl New Member

    Solved!!!

    I've tried to configure a custom transport in Postfix, but with no success.

    The problem was solved, instead, simply executing the following command:

    echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

    and restarting Postfix.

    A bit strange, in my opinion, but the important aspect is that now there are no more problems in delivery mail to "slow response" mail servers... :)

    Luca
     
  3. lancia

    lancia New Member

    Hi Luca, sorry to grave-dig your thread here, but I've been experiencing the same issue and your suggested fix did, in fact, solve the problem. However, considering the implications of disabling tcp_window_scaling (effectively setting your maximum TCP window size to 64k), this does not seem like the best practical long-term solution - especially if the server is performing other duties such as web-serving.

    Since posting this, have you discovered any other way around the issue? Or, can anyone else chime in on perhaps a better way to handle such troublesome remote mail servers?
     
  4. bajodel

    bajodel Member

    RFC 2821 (SMTP) says that a client should wait 5 minutes for the "Initial 220 Message". Many SMTP servers accept a TCP connection but delay delivery of the 220 message for different reasons (slamming/GreetPause , more mail to be processed, ..others..)

    Insert in your postfix main.cf a higher timeout value (default is 30 sec).. i think 120 sec should be enough:
    bye..
     
  5. logicasrl

    logicasrl New Member

    Hi Lancia,
    no, I didn't find other solutions... In my case setting the tcp_window_scaling parameter did not have collateral effects, apparently...
    In any case if you find alternative solutions, let me know (thank you).
    Ah, I do not remember for sure if I tried the smtp_connect_timeout, but I think of having given it a try, with no great results...
    Good luck,
    Luca

     
  6. alleks

    alleks Member

    Hey folks, I have the same problem and another.

    I try to echo 0 > /proc/sys/net/ipv4/tcp_window_scaling but I'm not allowed. The files permissions are 444, i try to change to 644 but it won't allow me to change it. I am running Debian 6 on a VPS Virtuozzo

    Any other solutions?

    PS:
    The timeout option doesn't work either.
     
  7. falko

    falko Super Moderator ISPConfig Developer

    You can try this instead: put
    Code:
    net.ipv4.tcp_window_scaling = 0
    in /etc/sysctl.conf and run
    Code:
    sysctl -p
    Afterwards
    Code:
    cat /proc/sys/net/ipv4/tcp_window_scaling
    should show "0".
     
  8. alleks

    alleks Member

    I fixed it by setting in my /etc/amavis/conf.d/50-user $max_servers = 1; and not 0 as I had defined it first.
     

Share This Page