choose server based on user pattern (patch)
Michael Redinger
Michael.Redinger@uibk.ac.at
Sun, 30 Dec 2001 19:18:35 +0100 (CET)
---------------------- multipart/mixed attachment
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
here's a patch that chooses the server to be used based on the username
(but still keeps a backdoor user@host if you have to choose another
server listed in servers.php).
/* begin rationale */
We have two IMAP servers for our users. Based on their user name
I can always say which server they belong to.
Combined with Apache mod_rewrite this is really handy:
the user gets to one of the IMP servers and doesn't need to care which one
to choose. The IMP server then automatically chooses the right IMAP server.
/* end rationale */
This adds the following parameters to config/php.new:
$conf['server']['autoserver'] = true;
$conf['server']['autoserver_notfullyqualified'] = true;
$servers in servers.php needs an additional entry for each server:
'userpattern' => array('ereg1', 'ereg2')
Note that the patterns will be evaluated in the order the servers
are specified, the order the servers are listed is important.
See attached diff files and configuration examples for details.
Any chance this gets included? :)
Michael
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBPC9afw/XqdllwsEdEQImkgCgrCBGWuQUnb9puJv/HfIZbeGn0RUAn0Av
VgIy5/noH2x8WKsHGr99BYkI
=Rnf5
-----END PGP SIGNATURE-----
---------------------- multipart/mixed attachment
LS0tIHJlZGlyZWN0LnBocC5vcmlnCU1vbiBEZWMgMjQgMDY6MTA6NDEgMjAw
MQ0KKysrIHJlZGlyZWN0LnBocAlTdW4gRGVjIDMwIDE5OjA2OjE2IDIwMDEN
CkBAIC0xMSw2ICsxMSw4IEBADQogDQogZGVmaW5lKCdJTVBfQkFTRScsIGRp
cm5hbWUoX19GSUxFX18pKTsNCiByZXF1aXJlX29uY2UgSU1QX0JBU0UgLiAn
L2xpYi9iYXNlLnBocCc7DQorLy8gYzEwMm1yIE5FVw0KK2lmICggJGNvbmZb
J3NlcnZlciddWydhdXRvc2VydmVyJ10gKSByZXF1aXJlX29uY2UgSU1QX0JB
U0UgLiAnL2NvbmZpZy9zZXJ2ZXJzLnBocCc7DQogDQogJGFjdGlvbiA9IEhv
c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bmdlX3BvcnQnXSAmJiAhJGNvbmZbJ3NlcnZlciddWydzZXJ2ZXJf
bGlzdCddKTogPz4NCis8P3BocCBpZiAoJGNvbmZbJ3NlcnZlciddWydjaGFu
Z2VfcG9ydCddICYmICEkY29uZlsnc2VydmVyJ11bJ3NlcnZlcl9saXN0J10g
JiYgISRjb25mWydzZXJ2ZXInXVsnYXV0b3NlcnZlciddKTogPz4NCiBmdW5j
dGlvbiB1cGRhdGVQb3J0KCkNCiB7DQogICAgIGlmIChkb2N1bWVudC5pbXBs
b2dpbi5wcm90b2NvbC5vcHRpb25zW2RvY3VtZW50LmltcGxvZ2luLnByb3Rv
Y29sLnNlbGVjdGVkSW5kZXhdLnZhbHVlID09ICdpbWFwJykgew0K
---------------------- multipart/mixed attachment
LS0tIGxpYi9JTVAucGhwLm9yaWcJU3VuIE5vdiAxOCAxNzoxNzoyNCAyMDAx
DQorKysgbGliL0lNUC5waHAJU3VuIERlYyAzMCAxODoxNjoxNiAyMDAxDQpA
QCAtMTI4LDEzICsxMjgsMTMgQEANCiAgICAgICAgIA0KICAgICAgICAgLyog
V2UgbWlnaHQgbmVlZCB0byBvdmVycmlkZSBzb21lIG9mIHRoZSBkZWZhdWx0
cyB3aXRoDQogICAgICAgICAgICBlbnZpcm9ubWVudGFsIHNldHRpbmdzLiAq
Lw0KLSAgICAgICAgaWYgKCRjb25mWydzZXJ2ZXInXVsnc2VydmVyX2xpc3Qn
XSkgew0KKyAgICAgICAgaWYgKCRjb25mWydzZXJ2ZXInXVsnc2VydmVyX2xp
c3QnXSB8fCAkY29uZlsnc2VydmVyJ11bJ2F1dG9zZXJ2ZXInXSkgew0KICAg
ICAgICAgICAgIGluY2x1ZGVfb25jZSBJTVBfQkFTRSAuICcvY29uZmlnL3Nl
cnZlcnMucGhwJzsNCiAgICAgICAgIH0NCiANCiAgICAgICAgIGlmIChBdXRo
OjpnZXRBdXRoKCkpIHsNCiAgICAgICAgICAgICAkaW1wWyd1bmlxdXNlcidd
ID0g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ycmF5KCRzZXJ2
ZXJzWyRIVFRQX1BPU1RfVkFSU1snc2VydmVyJ11dKSkgew0KICAgICAgICAg
ICAgICRzdnIgPSAmJEhUVFBfUE9TVF9WQVJTWydzZXJ2ZXInXTsNCkBAIC0x
NzQsNyArMTc0LDcgQEANCiAgICAgICAgICAgICB9DQogICAgICAgICAgICAg
Z2xvYmFsICRwcmVmczsNCiAgICAgICAgICAgICANCi0gICAgICAgICAgICBp
ZiAoJGNvbmZbJ3NlcnZlciddWydzZXJ2ZXJfbGlzdCddDQorICAgICAgICAg
ICAgaWYgKCgkY29uZlsnc2VydmVyJ11bJ3NlcnZlcl9saXN0J10gfHwgJGNv
bmZbJ3NlcnZlciddWydhdXRvc2VydmVyJ10pDQogICAgICAgICAgICAgICAg
ICYmIGlzc2V0KCRzZXJ2ZXJzWyRIVFRQX1BPU1RfVkFSU1snc2VydmVyJ11d
KQ0KICAgICAgICAgICAgICAgICAmJiBpc19hcnJheSgkc2VydmVyc1skSFRU
UF9QT1NUX1ZBUlNbJ3NlcnZlciddXSkpIHsNCiAgICAgICAgICAgICAgICAg
JHN2ciA9ICYkSFRUUF9QT1NUX1ZBUlNbJ3NlcnZlciddOw0K
---------------------- multipart/mixed attachment
Ly8gSWYgeW91IHNldCBhdXRvc2VydmVyIHRvIHRydWUgYW5kIGFkZCAndXNl
cnBhdHRlcm4nIHZhbHVlcyB0byB5b3VyDQovLyBzZXJ2ZXJzIGluIHNlcnZl
cnMucGhwLCB0aGUgYXBwcm9wcmlhdGUgc2VydmVyIHdpbGwgYmUgY2hvb3Nl
bg0KLy8gYmFzZWQgb24gdGhlIHVzZXJuYW1lDQokY29uZlsnc2VydmVyJ11b
J2F1dG9zZXJ2ZXInXSA9IHRydWU7DQoNCi8vIHdoZW4gdXNpbmcgYXV0b3Nl
cnZlciwgdXNlcnMgY2FuIHN0aWxsIGNob29zZSBhbm90aGVyIHNlcnZlcg0K
Ly8gd2hlbiBlbnRlcmluZyB1c2VyQHNlcnZlciAoaG93ZXZlciwgdGhlIHNl
cnZlciBtdXN0IGJlIGluY2x1ZGVkDQovLyBpbiBzZXJ2ZXJzLnBocCkuDQov
LyBJZiB5b3UgZW5hYmxlIGF1dG9zZXJ2ZXJfbm90ZnVsbHlxdWFsaWZpZWQs
IHVzZXJzIGNhbiBlbnRlciBib3RoIHRoZQ0KLy8gc2hvcnQgc2VydmVyIG5h
bWUgYW5kIHRoZSBmdWxseSBxdWFsaWZpZWQgaG9zdCBuYW1lLg0KLy8gZWcu
IGlmIHlvdSBoYXZlIGFuIHNlcnZlcnMgZW50cnkgc2VydmVyLm15LmRvbWFp
biwgdGhlIHVzZXJzIGNhbiBlbnRlcg0KLy8gYm90aCB1c2VyQHNlcnZlciBh
bmQgdXNlckBzZXJ2ZXIubXkuZG9tYWluIHRvIGxvZ2luIHRvIHRoYXQgaG9z
dC4NCiRjb25mWydzZXJ2ZXInXVsnYXV0b3NlcnZlcl9ub3RmdWxseXF1YWxp
ZmllZCddID0gdHJ1ZTsNCg0K
---------------------- multipart/mixed attachment--