Hi Viktor,

On Wed, 19 Nov 2025, Viktor Dukhovni via Postfix-users wrote:

On Wed, Nov 19, 2025 at 09:42:38AM +0100, Jozsef Kadlecsik via Postfix-users 
wrote:

We use mysql-driven lookups for almost everything and sometimes there are
warnings in the logs saying:

Nov 19 00:50:12 smtp2 postfix/trivial-rewrite[52211]: warning: 
proxy:mysql:/etc/postfix/mysql/user_transport.cf lookup error for "address"
Nov 19 00:50:12 smtp2 postfix/trivial-rewrite[52211]: warning: transport_maps 
lookup failure

The database is on the machine itself, connected over unix socket. It seems
it is a temporary issue because next minute "it works". However it is a
visible error for smtp clients which then must retry.

What should be checked? How could mysql lookups be debugged?

Make sure that the database server doesn't preƫmptively shut down idle
connections, and its connection count limit is high enough to
accommodate the expected concurrency from all other processes:

   - 2 from each smtpd(8) and its associated backend cleanup(8)
   - 1 for qmgr
   - 1 for trivial-rewrite
   - 2 for pickup(8) and backend cleanup(8)
   - 1 for each local(8) process resolving addresses rewritten
     by aliases(5).

Typically, twice the maximum count of smtpd(8) processes plus a few
more, but if local delivery is for some unexpected reason running at a
high concurrency, that can add more.

Thanks, that's an easily overlooked factor and can bite... I have just checked it and we had already set proper values for the database server to handle the possible number of connections from postfix.

Best regards,
Jozsef
--
E-mail : [email protected], [email protected], 
[email protected]
Address: Wigner Research Centre for Physics
         H-1525 Budapest 114, POB. 49, Hungary
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to