Stephan von Krawczynski
2014-Apr-21 07:33 UTC
[Dovecot] How to bring dovecot to using a slightly modified passwd file
Hello all, I am trying to use a setup where domains have separate passwd files with a slightly different layout. Is there a way to tell dovecot that a passwd file contains everything it looks for but on different positions inside the passwd file line? Standard passwd: USERNAME:PASSWD:UID:GID:HOME:extras different layout: USERNAME:PASSWD:extras:UID:GID:HOME Or do I have to patch the source, and where if necessary? Thanks for your help. -- Regards, Stephan
Benny Pedersen
2014-Apr-21 11:38 UTC
[Dovecot] How to bring dovecot to using a slightly modified passwd file
Stephan von Krawczynski skrev den 2014-04-21 09:33:> Or do I have to patch the source, and where if necessary?dovecot does not need passwd files, you can eg use any db that dovecot support, lets say sqlite, then you can make layout free of charge make a php wrapper that import flat filedb to sqlite, and another one to export sqlite to fliledb that would be heaven imho :) and at the same time a nice backup
Steffen Kaiser
2014-Apr-23 10:14 UTC
Re: How to bring dovecot to using a slightly modified passwd file
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 21 Apr 2014, Stephan von Krawczynski wrote:> I am trying to use a setup where domains have separate passwd files with a > slightly different layout. Is there a way to tell dovecot that a passwd file > contains everything it looks for but on different positions inside the passwd > file line? > > Standard passwd: > > USERNAME:PASSWD:UID:GID:HOME:extras > > different layout: > > USERNAME:PASSWD:extras:UID:GID:HOME > > Or do I have to patch the source, and where if necessary?Check out src/auth/db-passwd-file.c src/auth/passdb-passwd-file.c BTW: To shift "extras" before uid/gid requires a way to quote ":", too. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBU1eSmXz1H7kL/d9rAQKVcAf9G+fQd2FT3JeHgQz+GSXlOK4WxItQJTK9 qBEJt4FAlsxVM2jRmuC+v4ZrOTYqz5IY/d8rDcc1H5NmM8V61S0gctalWF8A5m0t yKFSi76oAFRtq6XKd1u00gFavvvMZw6FO/rj6PnCx+lsA31ABJvphFjgS/HxWexK hNSBFXq9+bFvJSlDEtmtwwW1mZF91EW/Tm+/lb36GZhfFj2JNshrICqc5PLL6MPy DX0Aq9hkRdzl8+oxwupIODhc1NhTypTtq/bO7JGKMZNUHBnynbdw8SZvfqxjtvqY QawzrZr2Fyjfqipw/+CyNREVwCpvgomf+eA9yO7LD1p8/EgCFKi4Kg==hcCY -----END PGP SIGNATURE-----
Steffen Kaiser
2014-Apr-23 10:14 UTC
[Dovecot] How to bring dovecot to using a slightly modified passwd file
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 21 Apr 2014, Stephan von Krawczynski wrote:> I am trying to use a setup where domains have separate passwd files with a > slightly different layout. Is there a way to tell dovecot that a passwd file > contains everything it looks for but on different positions inside the passwd > file line? > > Standard passwd: > > USERNAME:PASSWD:UID:GID:HOME:extras > > different layout: > > USERNAME:PASSWD:extras:UID:GID:HOME > > Or do I have to patch the source, and where if necessary?Check out src/auth/db-passwd-file.c src/auth/passdb-passwd-file.c BTW: To shift "extras" before uid/gid requires a way to quote ":", too. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBU1eSmXz1H7kL/d9rAQKVcAf9G+fQd2FT3JeHgQz+GSXlOK4WxItQJTK9 qBEJt4FAlsxVM2jRmuC+v4ZrOTYqz5IY/d8rDcc1H5NmM8V61S0gctalWF8A5m0t yKFSi76oAFRtq6XKd1u00gFavvvMZw6FO/rj6PnCx+lsA31ABJvphFjgS/HxWexK hNSBFXq9+bFvJSlDEtmtwwW1mZF91EW/Tm+/lb36GZhfFj2JNshrICqc5PLL6MPy DX0Aq9hkRdzl8+oxwupIODhc1NhTypTtq/bO7JGKMZNUHBnynbdw8SZvfqxjtvqY QawzrZr2Fyjfqipw/+CyNREVwCpvgomf+eA9yO7LD1p8/EgCFKi4Kg==hcCY -----END PGP SIGNATURE-----