Re: [Dovecot] Request for variable unique to each server?
On Sat, Nov 10, 2007 at 05:30:08PM +0200, Timo Sirainen wrote: On Sat, 2007-11-10 at 09:12 -0500, Adam McDougall wrote: > Is there a variable that holds the server hostname or something else unique per server, > or could one be added, or could someone point me at the code? Thanks. Well, the code would in two places: src/auth/auth-request.c auth_request_get_var_expand_table() src/master/mail-process.c get_var_expand_table() You could add a new variable that uses my_hostname variable from hostpid.h. I'm not sure if I should add this to standard variables. These one letter variables are beginning to run out. Maybe v2.0 should have longer $variable names.. Thanks! Got that working as a local patch, which I am satisfied with if you don't add an official one. I just quickly picked a letter that looked unused (%q) so thats what it is when you see it in configs I post ;)
Re: [Dovecot] Request for variable unique to each server?
On Sat, 2007-11-10 at 09:12 -0500, Adam McDougall wrote: > Is there a variable that holds the server hostname or something else unique > per server, > or could one be added, or could someone point me at the code? Thanks. Well, the code would in two places: src/auth/auth-request.c auth_request_get_var_expand_table() src/master/mail-process.c get_var_expand_table() You could add a new variable that uses my_hostname variable from hostpid.h. I'm not sure if I should add this to standard variables. These one letter variables are beginning to run out. Maybe v2.0 should have longer $variable names.. signature.asc Description: This is a digitally signed message part
[Dovecot] Request for variable unique to each server?
I've been looking for a variable I can use in my dovecot.conf within the INDEX= setting so I can have one index dir per imap server on NFS. I've been looking at http://wiki.dovecot.org/Variables but no variable seems to contain something like server hostname, and I've been hunting for the variable expansion code in dovecot but haven't been able to find it. %l (local IP) won't help me because when using our load balancer, %l is the same IP on all of my servers. %r is close to useful but having a local webmail server on each server means I'd end up with 127.0.0.1 being shared (also I would end up with one directory per unique user/clientIP combo). Is there a variable that holds the server hostname or something else unique per server, or could one be added, or could someone point me at the code? Thanks.