DevHeads.net

client incorrect greeting error, how to resolve?

I have a user reporting from time to time getting:
"An error occurred while sending mail. Mail server sent incorrect greeting
4.7.0 geko.sbt.net.au error too many connections from 147.50.1.226"

is this a Thunderbird issue ?

when I search like below, I get nothing, what am I doing wrong?

and, how to fix this, is there anything at this end ? user end ?

# grep 147.50.1.226 /var/log/maillog | wc
407 7142 79129
# grep 147.50.1.226 /var/log/maillog | grep error
# grep 147.50.1.226 /var/log/maillog | grep Error
# grep 147.50.1.226 /var/log/maillog | grep greeting

Comments

Re: client incorrect greeting error, how to resolve?

By Viktor Dukhovni at 12/03/2018 - 22:05

Is that the verbatim message, or just similar? Postfix responds with
a similar message when a client exceeds either the concurrency or the
connection rate limits you have configured:

if (var_smtpd_cconn_limit > 0
&& state->conn_count > var_smtpd_cconn_limit) {
state->error_mask |= MAIL_ERROR_POLICY;
msg_warn("Connection concurrency limit exceeded: %d from %s for service %s",
state->conn_count, state->namaddr, state->service);
smtpd_chat_reply(state, "421 4.7.0 %s Error: too many connections from %s",
var_myhostname, state->addr);
break;
}
if (var_smtpd_crate_limit > 0
&& state->conn_rate > var_smtpd_crate_limit) {
msg_warn("Connection rate limit exceeded: %d from %s for service %s",
state->conn_rate, state->namaddr, state->service);
smtpd_chat_reply(state, "421 4.7.0 %s Error: too many connections from %s",
var_myhostname, state->addr);
break;
}

In both cases Postfix logs a more detailed message to the system
log, so that's where you should have looked for messages relating
to "147.50.1.226".

Re: client incorrect greeting error, how to resolve?

By Voytek Eymont at 12/03/2018 - 22:58

On Tue, December 4, 2018 1:05 pm, Viktor Dukhovni wrote:

also:

# pflogsumm /var/log/maillog | grep 147.50.1.226
2 Connection rate limit exceeded: 15 from unknown[147.50.1.226]
f...
2 Connection rate limit exceeded: 17 from unknown[147.50.1.226]
f...

# pflogsumm /var/log/maillog | grep 147.50.1.226 | wc
12 108 960

# grep 147.50.1.226 /var/log/maillog | grep limit | wc
18 288 2454

Dec 4 12:07:08 geko postfix/smtpd[6908]: warning: Connection rate limit
exceeded: 13 from unknown[147.50.1.226] for service submission
...
Dec 4 13:24:59 geko postfix/smtpd[23939]: warning: Connection rate limit
exceeded: 18 from unknown[147.50.1.226] for service submission

Re: client incorrect greeting error, how to resolve?

By Voytek Eymont at 12/03/2018 - 22:54

Viktor,

thanks , vebatim is:

"An error occurred while sending mail: The mail server sent an incorrect
greeting: 4.7.0 geko.sbt.net.au Error: too many connections from
147.50.1.226."

querying this further, I was told:

"several users get this error, it seems to go away after we restart firewall"

both concurrencies at default, commented out in main.cf
# grep concur main.cf
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20

# grep connect main.cf
smtpd_client_connection_rate_limit = 12
smtpd_client_connection_count_limit = 5

there is a few users, ~30 or more at that IP address, should I up any ?

get nothing here:
# grep 147.50.1.226 /var/log/messages

Re: client incorrect greeting error, how to resolve?

By Viktor Dukhovni at 12/04/2018 - 00:07

What do you think these mean? Explain it carefully to an imaginary
listener who knows nothing, covering every detail.

What do you think these mean? Explain these too, in the context
of your configuration, thinking about where and when they take
effect.

Re: client incorrect greeting error, how to resolve?

By Voytek Eymont at 12/05/2018 - 08:24

On Tue, December 4, 2018 3:07 pm, Viktor Dukhovni wrote:
Viktor,

sorry.. and thank you.

another dumb question:
so if I have 25 clients on a NATed LAN, that's my connection count limit,
isn't it ?

and I think I've found my problem: when they changed IP on the site, I
forgot to add IP to:
smtpd_client_event_limit_exceptions = 147.50.1.226

if I have it here I don;t need to worry about the other limits, isn't it?

thanks again

V

Re: client incorrect greeting error, how to resolve?

By Matus UHLAR - f... at 12/06/2018 - 05:04

On 05.12.18 23:24, Voytek wrote:
may be and may not be. it's possible that client sends multiple mail in
parallel.

smtpd_client_*_count/rate_limit restrictions, according to:

<a href="http://www.postfix.org/postconf.5.html#smtpd_client_event_limit_exceptions" title="http://www.postfix.org/postconf.5.html#smtpd_client_event_limit_exceptions">http://www.postfix.org/postconf.5.html#smtpd_client_event_limit_exceptions</a>

Re: client incorrect greeting error, how to resolve?

By LuKreme at 12/05/2018 - 11:45

On Wed Dec 05 2018 05:24:33 Voytek < ... at sbt dot net.au> said:
No.