Mail with attachments gets stuck in queue

Discussion in 'Installation/Configuration' started by Chris00, Aug 11, 2015.

  1. Chris00

    Chris00 New Member

    Hi,
    I have setup ISPConfig 3 on Debian Wheezy.
    Everything works perfectly except mail attachments.
    I can send mail without attachments from my domain to my gmail account using my email client through the ISPConfig without any problems. But as soon as I add an attachment, even if its only 50kb or less, the email gets stuck in the queue. I can receive email with attachments without an issue. I have tried increasing the smtp timeout and made a lot of other changes, but nothing helped. So I finally changed too many settings that I couldn't revert, I had to reload the entire server. Now the server is set up again. But the attachment problem is still happening. Please help me sort this problem out.
    Thanks
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Check your mail.log
     
  3. Chris00

    Chris00 New Member

    Aug 11 21:47:10 mydomain postfix/qmgr[10829]: B36A81A132B: skipped, still being delivered
    Aug 11 21:48:37 mydomain postfix/qmgr[10829]: B36A81A132B: skipped, still being delivered
    Aug 11 21:55:02 mydomain postfix/smtpd[12177]: lost connection after CONNECT from localhost[::1]
    Aug 11 21:55:02 mydomain postfix/smtpd[12177]: disconnect from localhost[::1]
    Aug 11 21:57:33 mydomain postfix/smtp[10798]: B36A81A132B: host alt1.gmailsmtpinlgoogle[173.194.72.27] said: 451 4.4.2 Timeout - closing connection. v1si5088697pdb.148 - gsmtp (in reply to end of DATA command)
    Aug 11 21:57:33 mydomain postfix/smtp[10798]: connect to alt2.gmailsmtpinlgoogle[2404:6800:4008:c02::1a]:25: Network is unreachable
    Aug 11 21:57:33 mydomain postfix/smtp[10798]: B36A81A132B: to=<mygmailaccount>, relay=none, delay=29035, delays=26994/0.06/2041/0, dsn=4.4.1, status=deferred (connect to alt2.gmailsmtpinlgoogle[2404:6800:4008:c02::1a]:25: Network is unreachable)
    Aug 11 23:00:03 mydomain postfix/qmgr[10829]: 9C8621A0ADC: removed
    Aug 11 23:04:12 mydomain postfix/smtp[12279]: B36A81A132B: to=<mygmailaccount>, relay=alt1.gmailsmtpinlgoogle[74.125.205.26]:25, delay=33034, delays=29099/0.03/1960/1975, dsn=4.4.2, status=deferred (host alt1.gmailsmtpinlgoogle[74.125.205.26] said: 451 4.4.2 Timeout - closing connection. de7si2296006lbd.58 - gsmtp (in reply to end of DATA command))

    Please let me know if you need more. Like I said before, mails without attachments go through without a problem
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you habe no ipv6-address, you can disable ipv6 in posftix. You also run in timeouts when sending to google. Did this occours for gmail or for other servers, too?
     
  5. Chris00

    Chris00 New Member

    Any mail to another server with attachments gets stuck.
    I have sent the same mail to another domain on the ISPConfig server and the mail went through
    I have changed postfix to ipv4
    Code:
    root:/# postqueue -p
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    B36A81A132B  1016997 Tue Aug 11 13:53:38  MyAccount
    (conversation with alt3.gmail-smtp-in.l.google.com[173.194.205.26] timed out while sending message body)
                                             MyGmailAccount
    
    D11721A0FC1  1017566 Wed Aug 12 09:01:53  MyAccount
    (host PrivateServer[196.25.211.70] said: 451 Local Error (in reply to end of DATA command))
                                             Privatemailaccount
    
     
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Seems like a firewall-problem. Is port25 open for outgoing? Maybe you have ICMP problems when connecting gmail. Can you telnet to gmail on port 25?
     
  7. Chris00

    Chris00 New Member

    It seems that I can sometimes telnet to google on port 25 and sometimes not. I forgot to mention that I have it hosted on a VPS server
    If it was an firewall issue, why would it only block mail with attachments?
    I only have IP tables, and its open to everything except a few IP's I blocked
    Code:
    root:/# telnet alt3.gmail-smtp-in.l.google.com 25
    Trying 173.194.205.27...
    Connected to alt3.gmail-smtp-in.l.google.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP x142si9355038qkx.44 - gsmtp
    
    root:/# telnet alt2.gmail-smtp-in.l.google.com 25
    Trying 74.125.200.27...
    Connected to alt2.gmail-smtp-in.l.google.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP q8si9016680pdn.95 - gsmtp
    
    root:/# telnet alt1.gmail-smtp-in.l.google.com 25
    Trying 74.125.23.27...
    Trying 2a00:1450:4010:c01::1a...
    telnet: Unable to connect to remote host: Network is unreachable
    
    root:/# telnet 74.125.23.27 25
    Trying 74.125.23.27...
    Connected to 74.125.23.27.
    Escape character is '^]'.
    220 mx.google.com ESMTP ng10si8971922pbc.253 - gsmtp
    
    
    root:/# telnet alt1.gmail-smtp-in.l.google.com 25
    Trying 64.233.188.26...
    Connected to alt1.gmail-smtp-in.l.google.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP l3si9022555pdp.109 - gsmtp
    
    root:/# telnet alt1.gmail-smtp-in.l.google.com 25
    Trying 64.233.188.26...
    Trying 2a00:1450:4010:c01::1b...
    telnet: Unable to connect to remote host: Network is unreachable
    
    
    root:/# telnet mail.telkomsa.net 25
    Trying 196.25.211.70...
    Connected to mail.telkomsa.net.
    Escape character is '^]'.
    220 as10.telkomsa.net ESMTP
    I have also ran a ping and I did't have 1 packet dropped
    Code:
    --- alt1.gmail-smtp-in.l.google.com ping statistics ---
    410 packets transmitted, 409 received, 0% packet loss, time 409099ms
    rtt min/avg/max/mdev = 436.618/436.732/438.274/0.589 ms
     
  8. florian030

    florian030 ISPConfig Developer ISPConfig Developer

  9. Chris00

    Chris00 New Member

    Still the same problem
    Code:
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    B36A81A132B  1016997 Tue Aug 11 13:53:38  my account
    (conversation with alt1.gmail-smtp-in.l.google.com[64.233.188.27] timed out while sending message body)
                                             my account@gmail.com
    
    28A191A2D74   331683 Wed Aug 12 18:10:26  my account
    (host alt3.gmail-smtp-in.l.google.com[74.125.23.26] said: 451 4.4.2 Timeout - closing connection. bw2si10354656pbb.162 - gsmtp (in reply to end of DATA command))
                                             my account@gmail.com
    
    D11721A0FC1  1017566 Wed Aug 12 09:01:53  my account
            (connect to mail.telkomsa.net[196.25.211.70]:25: Connection timed out)
                                             my account@telkomsa.net
    
     
  10. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You have a problem with your firewall or the outgoing routing. Are you sure that your provider allows outgoing connections on port25?
     
  11. Chris00

    Chris00 New Member

    After long trial and error from my VPS provider, they found a firewall rule that blocks larger attachments. Everything is running smooth now. Thanks Florian for all your help
     

Share This Page