Okay, this seems too difficult for me.
If I use in devcot extra.conf this:
passdb {
driver = static
args = password=test allow_nets={Any_ip_adress}
}
I have no error “Unknown setting: allow_nets”. But i can login in from any network.
Dovecot logs:
2024-05-27 11:09:01,507 WARN received SIGTERM indicating exit request
2024-05-27 11:09:01,508 INFO waiting for processes, dovecot, syslog-ng to die
May 27 11:09:01 97681bea8fe1 syslog-ng[111]: syslog-ng shutting down; version=‘4.5.0’
2024-05-27 11:09:01,617 INFO stopped: syslog-ng (exit status 0)
2024-05-27 11:09:03,622 INFO stopped: dovecot (exit status 0)
2024-05-27 11:09:03,622 WARN received SIGQUIT indicating exit request
2024-05-27 11:09:03,623 WARN stopped: processes (terminated by SIGTERM)
Uptime: 245095 Threads: 17 Questions: 602896 Slow queries: 5 Opens: 260 Open tables: 248 Queries per second avg: 2.459
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 264 100 264 0 0 1281 0 –:–:– –:–:– –:–:– 1287
gzip: invalid magic
2024-05-27 11:09:09,083 INFO Set uid to user 0 succeeded
2024-05-27 11:09:09,089 INFO supervisord started with pid 1
2024-05-27 11:09:10,092 INFO spawned: ‘processes’ with pid 109
2024-05-27 11:09:10,096 INFO spawned: ‘dovecot’ with pid 110
2024-05-27 11:09:10,099 INFO spawned: ‘syslog-ng’ with pid 111
May 27 11:09:10 97681bea8fe1 syslog-ng[111]: syslog-ng starting up; version=‘4.5.0’
May 27 11:09:10 97681bea8fe1 dovecot: master: Dovecot v2.3.21 (47349e2482) starting up for imap, sieve, lmtp, pop3
2024-05-27 11:09:11,176 INFO success: processes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-05-27 11:09:11,177 INFO success: dovecot entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-05-27 11:09:11,177 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
May 27 11:09:22 97681bea8fe1 dovecot: lmtp(128): Connect from 172.22.1.13
May 27 11:09:22 97681bea8fe1 dovecot: lmtp(128): Disconnect from 172.22.1.13: Logged out (state=MAIL FROM)
May 27 11:09:22 97681bea8fe1 dovecot: imap-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=172.22.1.13, lip=172.22.1.250, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
May 27 11:09:22 97681bea8fe1 dovecot: imap-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=172.22.1.13, lip=172.22.1.250
May 27 11:09:22 97681bea8fe1 dovecot: managesieve-login: Disconnected: Connection closed (no auth attempts in 0 secs): user=<>, rip=172.22.1.13, lip=172.22.1.250
May 27 11:09:25 97681bea8fe1 dovecot: pop3-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250
May 27 11:09:25 97681bea8fe1 dovecot: imap-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250
May 27 11:09:25 97681bea8fe1 dovecot: pop3-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250
May 27 11:09:25 97681bea8fe1 dovecot: imap-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250
May 27 11:09:26 97681bea8fe1 dovecot: pop3-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
May 27 11:09:26 97681bea8fe1 dovecot: imap-login: Disconnected: Aborted login by logging out (no auth attempts in 0 secs): user=<>, rip=10.56.202.97, lip=172.22.1.250, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
May 27 11:09:43 97681bea8fe1 dovecot: imap-login: Disconnected: Connection closed (auth failed, 3 attempts in 14 secs): user=<mri>, method=PLAIN, rip=10.56.202.97, lip=172.22.1.250, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
May 27 11:09:48 97681bea8fe1 dovecot: imap-login: Login: user=user@domain.com, method=PLAIN, rip=10.56.202.97, lip=172.22.1.250, mpid=185, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
May 27 11:09:48 97681bea8fe1 dovecot: imap(user@domain.com)<185><yQkJXWkZAN0KOMph>: Disconnected: Logged out in=9 out=530 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
May 27 11:09:49 97681bea8fe1 dovecot: imap-login: Login: user=user@domain.com, method=PLAIN, rip=10.56.202.97, lip=172.22.1.250, mpid=188, TLS, TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)