mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:51:59 +01:00
pilerimport supports Zimbra IMAP impersonation (Credits: SEMATPL)
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
f1cda8f6a1
commit
26627b1a20
@ -5,6 +5,20 @@
|
|||||||
If using sphinx, add the following to config-site.php:
|
If using sphinx, add the following to config-site.php:
|
||||||
$config['SPHINX_HOSTNAME_READONLY'] = '127.0.0.1:9306';
|
$config['SPHINX_HOSTNAME_READONLY'] = '127.0.0.1:9306';
|
||||||
|
|
||||||
|
- pilerimport supports Zimbra IMAP impersonation
|
||||||
|
|
||||||
|
Generate the following base64 encoded string:
|
||||||
|
(Be sure to use the actual usernames and password):
|
||||||
|
|
||||||
|
pw="$( printf '%s\0%s\0%s' 'username' 'zimbra_admin_username' 'zimbra_admin_password' | base64 )"
|
||||||
|
|
||||||
|
Then specify -u ZIMBRA -p "$pw" for pilerimport, eg.
|
||||||
|
|
||||||
|
pilerimport -i imap.server -u ZIMBRA -p "$pw" ...
|
||||||
|
|
||||||
|
Note that "ZIMBRA" is a special username, it indicates for pilerimport
|
||||||
|
to actually use the imap impersonation for Zimbra.
|
||||||
|
|
||||||
|
|
||||||
1.4.4:
|
1.4.4:
|
||||||
------
|
------
|
||||||
|
@ -105,7 +105,12 @@ int connect_to_imap_server(struct data *data){
|
|||||||
|
|
||||||
/* imap cmd: LOGIN */
|
/* imap cmd: LOGIN */
|
||||||
|
|
||||||
|
if(strcmp(data->import->username, "ZIMBRA") == 0){
|
||||||
|
snprintf(buf, sizeof(buf)-1, "A%d AUTHENTICATE PLAIN %s\r\n", data->import->seq, data->import->password);
|
||||||
|
}
|
||||||
|
else {
|
||||||
snprintf(buf, sizeof(buf)-1, "A%d LOGIN %s \"%s\"\r\n", data->import->seq, data->import->username, data->import->password);
|
snprintf(buf, sizeof(buf)-1, "A%d LOGIN %s \"%s\"\r\n", data->import->seq, data->import->username, data->import->password);
|
||||||
|
}
|
||||||
|
|
||||||
write1(data->net, buf, strlen(buf));
|
write1(data->net, buf, strlen(buf));
|
||||||
if(read_response(buf, sizeof(buf), data) == 0){
|
if(read_response(buf, sizeof(buf), data) == 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user