Tere.
Dovecot 1.0beta4 and newer support "allow_nets" field userdb. So with SQL you'd do eg.:
select uid, gid, home, allow_nets from users where username = '%u'
where allow_nets contains something like: 192.168.0.0/24,10.0.0.0/8
Or the same is possible with passwd-file, etc.
Ok, now I found example in wiki, however can I use this "allow_nets" field with existing pam for example to add some stuff in /etc/passwd user line?
And when I made a separate passwd file and configured dovecot to use it:
dovecot: Apr 11 13:42:48 Info: auth(default): passwd-file /etc/dovecot.outusers: Read 2 users
/etc/dovecot.outusers includes
test1:{plain}test1:500:502::/home/test::mail=maildir:~/Maildir allow_nets=0.0.0.0 test1:{plain}test2:501:502::/home/test2::mail=maildir:~/Maildir allow_nets=192.168.0.0/24
So I made a test, connecting from 172.17.25.3 to both accounts worked well, if my conf -s syntax are ok, then what is wrong?
-- Sysadmin