Re: [Dovecot] critical feature from version 1 not migrated to version 2 = authentication configuration database per IP
Timo Sirainen wrote:
- another way (possible that will be more easiest, and good enough for advanced configurations) = single variable that may be set in block of exact ip listener configuration , as for provided before example may set variable "auth_db_suffix" = string("dc=domain1,dc=tld") for definition "local mail.domain1.tld" and that variable are inserted in auth block via variable inserting mechanism ...
Again not possible, because config parsing is done much earlier.
think for realization can take idea from that patch :
---------------------------------
--- src/auth/auth-request.c.orig 2010-12-30 11:42:54.000000000 +0200
--- src/auth/auth-request.c.orig 2010-12-30 11:42:54.000000000 +0200
@@ -1547,6 +1547,7 @@ auth_request_get_var_expand_table(const
{ '\0', NULL, "login_user" },
{ '\0', NULL, "login_username" },
{ '\0', NULL, "login_domain" },
+ { 'x', NULL, NULL },
{ '\0', NULL, NULL }
};
struct var_expand_table *tab;
@@ -1600,6 +1601,15 @@ auth_request_get_var_expand_table(const
auth_request);
}
}
+ const char *lip2user[][2] =
{{"127.0.0.3","dc=domain1,dc=tld1"},{"127.0.0.1","localhost"},{"127.0.0.2","dc=domain2,dc=tld2"}};
+ int arrsize=sizeof( lip2user ) / sizeof( lip2user[0]);
+ tab[18].value = ""; // default expanded to - emty string
+ int i;
+ for(i=0;i
participants (1)
-
DaLiV@apollo.lv