Koozali.org: home of the SME Server

Qmail maximum incomming conections

Offline Troels

  • ***
  • 48
  • +0/-0
Qmail maximum incomming conections
« on: December 11, 2008, 06:25:19 PM »
Hello Everyone.

I have an SME Server running with approximately 150 users. Now, every one of them has been sent an email, from an external company conducting a survey for us. The company thats running the survey, tells me that their mail server is receiving error messages from Qpsmtpd i think?.

451 Sorry, too many connections from 80.xxx.xxx.xxx

The question is how do I raise the incomming connection limit, so my users doesn't need to wait too long for their mail to get delivered. I have searched the form but i only find information on this when the mail is sent form the inside. Please let me know if further info is needed to debug this issue.
Regards Troels

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Qmail maximum incomming conections
« Reply #1 on: December 11, 2008, 08:38:54 PM »
Hello Everyone.

I have an SME Server running with approximately 150 users. Now, every one of them has been sent an email, from an external company conducting a survey for us. The company thats running the survey, tells me that their mail server is receiving error messages from Qpsmtpd i think?.

451 Sorry, too many connections from 80.xxx.xxx.xxx

The question is how do I raise the incomming connection limit, so my users doesn't need to wait too long for their mail to get delivered. I have searched the form but i only find information on this when the mail is sent form the inside. Please let me know if further info is needed to debug this issue.
That is a normal and temporary error. It is not normal for mailservers to be able to handle a unlimited amount of connections. You can set it with the following database settings:

Code: [Select]
db configuration setprop smtpd Instances 40
db configuration setprop smtpd InstancesPerIP 5

The ssmtpd (SSL) daemon only has this one I believe:
Code: [Select]
db configuration setprop ssmtpd Instances 10
The numbers listed here are the defaults for SME Server, which means the mailserver can handle 40 connections to the smtpd daemon all together limited to 5 per IP.

I think the offending mailserver of the party who is sending you the survey should do something about there system as sending out 150 e-mail to the same IP is not a very neet way of sending mail.

As a sysadmin I would not do much about this as the mail should follow to come in shortly.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Qmail maximum incomming conections
« Reply #2 on: December 11, 2008, 11:08:51 PM »
The question is how do I raise the incomming connection limit, so my users doesn't need to wait too long for their mail to get delivered.

If you raise the limit, you will likely make them wait even longer. 150 copies of a very large email will take a long time to fully arrive whether they come one at a time or 150 at a time. If you attempt to receive too many at the same time you will swamp your server and it will become very slow, and potentially unreliable.

Change nothing, and just be patient.

Or buy a faster network connection.

Offline Troels

  • ***
  • 48
  • +0/-0
Re: Qmail maximum incomming conections
« Reply #3 on: December 12, 2008, 12:51:13 PM »
Hello Cactus and Charlie.

Thank you for your quick replies, its great :P. Let me see if understood this behaviour correctly: this caused by a rule in the smtpd daemon, saying an "external mail server" cannot deliver more that 5 mails at a time. When the sending mail server retries to deliver it receives error: "451 Sorry, too many connections" from the SME, then it stops and tries again in 5 minutes. So delivering the 150 mails would take 150 minutes if it is 5 minutes?. I'm curious about this delay phenomenon do you guys know the wait and retry times?

Charlie the SME server and the sending server are both on very fast internet connections, so i don't think to delay is caused by lack of bandwidth.
« Last Edit: December 12, 2008, 12:53:40 PM by Troels »
Regards Troels

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Qmail maximum incomming conections
« Reply #4 on: December 12, 2008, 02:22:30 PM »
I'm curious about this delay phenomenon do you guys know the wait and retry times?

There is no standard. It depends on the software and configuration of the sending mail server. There are recommendations on timing - you can look them up in RFC 2821.

Offline akhilmathema

  • ***
  • 42
  • +0/-0
Re: Qmail maximum incomming conections
« Reply #5 on: December 15, 2008, 04:28:00 AM »
# config show smtpd
Change the Instances and Instances Per IP as you require, then
# signal-event email-update

Offline Troels

  • ***
  • 48
  • +0/-0
Re: Qmail maximum incomming conections
« Reply #6 on: December 15, 2008, 10:58:31 AM »
# config show smtpd
Change the Instances and Instances Per IP as you require, then
# signal-event email-update

I changed the standard 5 pr. IP to 10 last week. Now we will just have to wait and see how much faster the email are delivered. Thank you everyone for your answers.
Regards Troels