# Postfix -  "idle for too long, closing connection"

## mxc

Hi all,

We have a postfix server and some of our staff vpn into the office and then attempt to send emails via Thunderbird the same as when they in the office. For emails without attachments and incoming emails this all works well. (We use Cyrus for our imap server) However if we send emails with largish attachments some time out is reached.

We have adjusted the time out setting in Thunderbird preferences->advanced->general and it takes longer to time out. However we are receiving messages that the server has time-out the connection. This is what we see in the log file

"idle for too long, closing connection"

I have tried adjusting the default setting in main.cf as follows:

smtp_data_xfer_timeout = 18000s

smtp_data_done_timeout = 6000s

smtp_data_init_timeout = 1200s

smtp_mail_timeout = 3000s

But no luck. The server seems to disconnect after about 3-4 minutes. What other setting should I adjust?

thanks

----------

## magic919

You seem to be having problems with Postfix as a server and yet you are changing settings for the Postfix SMTP client.

----------

## mxc

Hi Magic919,

I have change the following settings on the postfix servers config file main.cf

smtp_data_xfer_timeout = 18000s

smtp_data_done_timeout = 6000s

smtp_data_init_timeout = 1200s

smtp_mail_timeout = 3000s

It didn't help  :Sad: 

----------

## magic919

Hi,

I'm struggling to see what you have done differently...

You need to be looking at smptd_ features here, if that's more helpful.

----------

## mxc

thanks --- will have a look. And get back to you.

----------

## mxc

ok I have tried the following:

smtpd_policy_service_max_idle = 3000s

smtp_xforward_timeout = 3000s

smtpd_timeout = 3000s

But I still get the timeout after about 360 seconds  :Sad: 

----------

## magic919

Ok.  I'll be bold and say it's not Postfix then.

Are you 100% certain Postfix logged that error?

----------

## mxc

From the research I have done I don't think the error relates to smtp. I think it is an imap error/warniing from cyrus for some other operation. I have been watching the logs and nothing seems to get written to them for the timeouts when sending mail with attachments. The strange thing is that normal mail goes through fine and the same unsent mail goes through fine if one send it from the office.  :Sad: 

I just don't know where to look for the solution. I have set the only time out I could find on Thunderbird to 3000s and it dies way longer before 50 minutes is reached.

----------

## magic919

Agreed on that.  I only do Dovecot, so I can't help with your IMAP server.

But I would peform more checks on Postfix.  Effect a Postfix reload if you can and watch the logs like a hawk.  Eliminate any errors you see there.

Then move on to what's different about when they send over the VPN.  Step zero of this would be run some file transfers over the VPN to test bandwidth.  Then look at Postfix.  Are they regarded as mynetworks?  Do they Auth??  Do they really need to use the VPN to send email - i.e. can they use Auth and public connection?

Can you test with another email client?  Just for the purposes of changing stuff to see what works.

----------

## mxc

I thought about this last night and need to check the firewall. We are using endian firewall and I know in the past there has been some strange interactions with it. I will get back to you. 

Thanks for the help so far    :Very Happy: 

----------

