authentication: passwd vs. mysql

1 post / 0 new
#1 Mon, 05/26/2008 - 09:05

authentication: passwd vs. mysql

My existing customer authentication for postfix and proftpd is done via a mysql database. Is this something that Virtualmin supports?

One feature I provide on a domain-by-domain basis is the ability to do pattern recognition on e-mail addresses. For example, addresses of the form <user>-<anyString> will result in mail being sent to <user> This is accomplished by the postfix entry:[code:1]virtual_alias_maps = mysql:/etc/postfix/[/code:1]and the contents of that file are:[code:1]user = users password = mypassword dbname = authentication query = select destination from virtual where username = '%s' or username = concat(substring_index('%u','-',1),'@@','%d') hosts =[/code:1]and in the virtual table one finds mappings of the form <user>@@<domain> to <user>@<otherdomain>.

I'm looking to preserve the ability to do pattern substitution for e-mail delivery and I'm not sure it would be as easy with usernames in /etc/passwd as compared to if they are in a database.

Also, a database solution allows me to more easily replicate users to other servers. I'm not sure the LDAP solution that Virtualmin has available will help me here. Ideally, it is possible to just use mysql for user authentication for SSH, FTP, and Postfix. Any ideas?