client incorrect greeting error, how to resolve?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

client incorrect greeting error, how to resolve?

Voytek
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




Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

Viktor Dukhovni
> On Dec 3, 2018, at 8:42 PM, Voytek <[hidden email]> wrote:
>
> 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 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".

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

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

> Is that the verbatim message, or just similar?  Postfix responds with


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"


> a similar message when a client exceeds either the concurrency or the
> connection rate limits you have configured:
>

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 ?

> 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".

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



Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

Voytek
In reply to this post by Viktor Dukhovni
On Tue, December 4, 2018 1:05 pm, Viktor Dukhovni wrote:
>> On Dec 3, 2018, at 8:42 PM, Voytek <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

Viktor Dukhovni
In reply to this post by Voytek
On Tue, Dec 04, 2018 at 01:58:59PM +1100, Voytek wrote:

> 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

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

On Tue, Dec 04, 2018 at 01:54:38PM +1100, Voytek wrote:

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

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

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

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

> On Tue, Dec 04, 2018 at 01:58:59PM +1100, Voytek wrote:
>
>
>> 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
>>
>
> What do you think these mean?  Explain it carefully to an imaginary
> listener who knows nothing, covering every detail.
>
> On Tue, Dec 04, 2018 at 01:54:38PM +1100, Voytek wrote:
>
>
>> # grep connect    main.cf
>> smtpd_client_connection_rate_limit = 12
>> smtpd_client_connection_count_limit = 5
>
> What do you think these mean?  Explain these too, in the context
> of your configuration, thinking about where and when they take effect.

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

Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

@lbutlr
On Wed Dec 05 2018 05:24:33 Voytek <[hidden email]> said:
>
> so if I have 25 clients on a NATed LAN, that's my connection count limit,
> isn't it ?

No.

--
2+2=5 for sufficiently large values of 2.

Reply | Threaded
Open this post in threaded view
|

Re: client incorrect greeting error, how to resolve?

Matus UHLAR - fantomas
In reply to this post by Voytek
On 05.12.18 23:24, Voytek wrote:
>>> # grep connect    main.cf
>>> smtpd_client_connection_rate_limit = 12
>>> smtpd_client_connection_count_limit = 5

>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 ?

may be and may not be. it's possible that client sends multiple mail in
parallel.

>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?

smtpd_client_*_count/rate_limit restrictions, according to:

http://www.postfix.org/postconf.5.html#smtpd_client_event_limit_exceptions


--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
2B|!2B, that's a question!