The upgrade went fine, and the solution worked well also. Thanks for
your assistance. However, I'd still like to make a feature request for
the $(server_port) and/or $(server_addr) functionality. This is for the
following situation:
I have added supplier functionality to the mysql backend of our mail
database. It is valid for more than one supplier to have different mail
config for the same domain. This should be differentiated on depending
on the incoming port. I've updated my exim configuration to work this
way, but can't do it in courier.
The reason I can for example choose port 14301 for supplier 1 imap,
14302 for supplier 2's imap etc, is because the machines are behind a
load balancer that will redirect port 143 on different ip's to a cluster
of imap servers on a backend private lan.
You can get something akin to $(server_port) by using AUTHSERVICE* strings in your imapd config file (though I don't have a clue if this was offered in 3.x). You'd have something like this in "imapd":
AUTHSERVICE14301=arbitrarystring1 (or perhaps just =14301)
AUTHSERVICE14302=arbitrarystring2
AUTHSERVICE14303=arbitrarystring3
etc
If something comes in on the port referenced by AUTHSERVICE*, it will set $(service) to that string. You can then use $(service) in a query in authmysqlrc. We set DEFAULT_DOMAIN to a meaningless value and have a separate lookup MySQL table that maps the AUTHSERVICE* strings to default domains. In our MYSQL_SELECT_CLAUSE, the query selects:
where mailbox = $(local_part)@$(domain)
OR
$(domain) = "meaningless string" (i.e. wasn't set explicitly) and servicetable.service = "$(service)" and mailbox = concat( "$(local_part)", "@", servicetable.domain )
Again, you might need to upgrade to 4.x to get that AUTHSERVICE* stuff (but maybe not). The same thing works fine in 'pop3d' too.
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Courier-imap mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
