Skip to content
Snippets Groups Projects
Commit 21c38705 authored by Timo Sirainen's avatar Timo Sirainen Committed by Aki Tuomi
Browse files

managesieve-login: Adjust to auth proxy API changes

parent c0951f32
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,10 @@ void managesieve_client_auth_result(struct client *client,
*/
referral = t_str_new(128);
str_printfa(referral, "REFERRAL sieve://%s;AUTH=%s@%s",
reply->destuser, client->auth_mech_name, reply->host);
if ( reply->port != 4190 )
str_printfa(referral, ":%u", reply->port);
reply->proxy.username, client->auth_mech_name,
reply->proxy.host);
if (reply->proxy.port != 4190)
str_printfa(referral, ":%u", reply->proxy.port);
if ( result == CLIENT_AUTH_RESULT_REFERRAL_SUCCESS ) {
client_send_okresp(client, str_c(referral), text);;
......
......@@ -448,7 +448,7 @@ int managesieve_proxy_parse_line(struct client *client, const char *line)
struct managesieve_client *msieve_client =
(struct managesieve_client *)client;
struct ostream *output;
enum login_proxy_ssl_flags ssl_flags;
enum auth_proxy_ssl_flags ssl_flags;
managesieve_response_t response = MANAGESIEVE_RESPONSE_NONE;
string_t *command;
int ret = 0;
......@@ -473,7 +473,7 @@ int managesieve_proxy_parse_line(struct client *client, const char *line)
command = t_str_new(128);
ssl_flags = login_proxy_get_ssl_flags(client->login_proxy);
if ((ssl_flags & PROXY_SSL_FLAG_STARTTLS) != 0) {
if ((ssl_flags & AUTH_PROXY_SSL_FLAG_STARTTLS) != 0) {
if (!msieve_client->proxy_starttls) {
login_proxy_failed(client->login_proxy,
login_proxy_get_event(client->login_proxy),
......@@ -649,6 +649,7 @@ managesieve_proxy_send_failure_reply(struct client *client,
case LOGIN_PROXY_FAILURE_TYPE_INTERNAL:
case LOGIN_PROXY_FAILURE_TYPE_REMOTE:
case LOGIN_PROXY_FAILURE_TYPE_PROTOCOL:
case LOGIN_PROXY_FAILURE_TYPE_AUTH_REDIRECT:
client_send_reply_code(client, MANAGESIEVE_CMD_REPLY_NO,
"TRYLATER", LOGIN_PROXY_FAILURE_MSG);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.