Displaying 20 results from an estimated 40 matches for "str_append".
2017 Oct 26
2
Bug: lmtp proxy does not quote local parts with spaces
On 26/10/2017 18:38, Alexander Dalloz wrote:
> Am 26.10.2017 um 12:20 schrieb David Zambonini:
>>
>> There seems to be a bug with RFC822 processing in ltmp proxying that
>> doesn't
>> quote local parts that, for example, contain spaces.
>
> Newer related RFCs are RFC 5321 and 5322.
Typo, meant to say RFC2822, which they still supercede, not that the
2017 Nov 01
2
Bug: lmtp proxy does not quote local parts with spaces
...il/message-address.c], although likely I've missed some place this
change should be made.
3. The third problem is then re-encoding the username in the envelope recipient
when proxying, which was not done at all. I've added a function
lmtp_client_rfc822_escape_address(), which is similar to
str_append_maybe_escape() to escape the address at protocol time in
lmtp_client_send_rcpts() [src/lib-smtp/lmtp-client.c], although I suspect it
should be done earlier, this is just a working proof.
The other reason I don't believe this patch is production quality is that I have
not examined any interact...
2006 Sep 18
1
Incorrect GSSAPI Service Name for POP3
...uth/mech-gssapi.c
--- dovecot-1.0.beta8/src/auth/mech-gssapi.c 2006-09-18 17:35:02.000000000 -0500
+++ dovecot-1.0.beta8.new/src/auth/mech-gssapi.c 2006-09-18 17:37:46.000000000 -0500
@@ -101,7 +101,11 @@
gss_name_t gss_principal;
principal_name = t_str_new(128);
- str_append(principal_name, t_str_lcase(request->service));
+ if(strcmp(request->service, "POP3") == 0) {
+ str_append(principal_name, "pop");
+ } else {
+ str_append(principal_name, t_str_lcase(request->service));
+ }
str_appen...
2007 Apr 19
2
dovecot-auth %c variable is not working
In "doc/variables.txt"
> For dovecot-auth there are also these variables:
>
> %c - "secured" string with SSL, TLS and localhost connections.
> Otherwise empty.
%c does not appear to be working. I am trying to use it in a MySQL query userdb and passdb query and it is always empty string.
Timo, any chance you could post a patch that fixes this?
Thanks,
2014 Aug 05
1
[Patch] mail_log plugin supports remote, local ip addresses
...G_FIELD_LOCAL_IP = 0x200
};
#define MAIL_LOG_DEFAULT_FIELDS \
(MAIL_LOG_FIELD_UID | MAIL_LOG_FIELD_BOX | \
@@ -58,6 +62,8 @@
"flags",
"from",
"subject",
+ "rip",
+ "lip",
NULL
};
@@ -265,6 +271,14 @@
mail_get_keywords(mail));
str_append(text, "), ");
}
+ if ((muser->fields & MAIL_LOG_FIELD_REMOTE_IP) != 0) {
+ str_printfa(text, "rip=%s", net_ip2addr(mail->box->storage->user->remote_ip));
+ str_append(text, ", ");
+ }
+ if ((muser->fields & MAIL_LOG_FIELD_LOCAL_IP) != 0) {...
2005 Mar 17
1
Namespaces and subscriptions
I've got a problem with subscriptions in 1.0-stable when migrating from
UW-IMAP.
I've modified the SUBSCRIPTION_FILE_NAME entries as suggested in the
Wiki http://wiki.dovecot.org/Migration and included the "~/mail/" etc.
hidden namespaces.
The .mailboxlist files contain entries like "~/mail/somefolder" and the
clients have "~/mail/" set as a prefix.
In
2009 Jan 05
1
writing a dovecot plugin / segfault
...{
struct mail_storage *storage;
struct mailbox *folder;
const char *folder_name;
string_t *response;
/* read argument: <folder> */
if (!client_read_string_args(cmd, 1, &folder_name))
return FALSE;
/* work done from here... */
/* for the moment, do a dummy response */
str_append(response, "* MYRIGHTS ");
str_append(response, folder_name);
str_append(response, " lrswipcda");
client_send_line(cmd->client, str_c(response));
client_send_tagline(cmd, "OK Completed.");
return TRUE;
}
But when testing via "telnet loca...
2019 May 19
0
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...plicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update) {
+ str_append(prefix, " ON CONFLICT DO UPDA...
2006 Nov 18
2
Auth checking also the service
Hello everyone. I'm switching to dovecot from courier-imap and after some
problems with Apple Mail client, now everything seems to be fine.
The only problem that I have not solved yet is to check also the service
(pop3, pop3s, imap, imaps) in the authentication phase.
In courier-authlib I do this:
MYSQL_SELECT_CLAUSE SELECT username, \
password, \
2019 May 19
3
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 20:31, mabi via dovecot wrote:
>
> ??????? Original Message ???????
> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
> <dovecot at dovecot.org> wrote:
>>
>> Attached is a tentative patch. I've verified no regression for mysql.
>> There should be no regression for sqlite as the code path is identical.
>>
>> Are you able to
2010 Apr 09
4
Patch: support URLAUTH, BURL, CATENATE
...if (request->skip_password_check) {
/* currently this can happen only with master logins */
- i_assert(request->master_user != NULL);
+ i_assert(request->master_user != NULL ||
+ request->submit_user != NULL); /* APPLE - urlauth */
return 1;
}
@@ -1458,8 +1496,13 @@
str_append_c(str, ',');
str_append(str, ip);
}
- if (auth_request->requested_login_user != NULL)
+ if (auth_request->requested_login_user != NULL) {
+ /* APPLE - urlauth */
+ if (auth_request->submit_user != NULL)
+ str_append(str, ",submit");
+ else /* reduce code deltas...
2006 Apr 28
1
imaptest, with options!
I hacked some command line options into imaptest.
I dont think I broke it..
Place into dovecot-source root as usual and compile with:
gcc imaptest.c -o imaptest -Wall -W -I. -Isrc/lib -DHAVE_CONFIG_H
src/lib/liblib.a
As per Timo's instructions.
# imaptest -h imaptest [USER at IP:PORTNO] [pass=PASSWORD] [mbox=MBOX]
[clients=CC] [msgs=NMSG] [use_authenticate] [PORTNO]
USER = template for
2007 Mar 27
2
gssapi auth issue...
...foobar.sfbay.sun.com
Which I presume is their standard-- and probably not negotiable.
However, the hostname of the machine is: "foobar", not foobar.sfbay.sun.com
(as reported by gethostname(3c)).
So when dovecot does this:
mech-gssapi.c:
principal_name = t_str_new(128);
str_append(principal_name, service_name);
str_append_c(principal_name, '@');
---> str_append(principal_name, my_hostname);
We wind up asking kerberos to look for a ticket for imap at foobar,
instead of imap at foobar.sfbay.sun.com.
Obviously we can patch the source, but I was wonderin...
2004 Jul 22
0
[PATCH] POP3 CAPA command RFC violation
...-authenticate.c 2004-07-14 14:48:01.000000000 +0400
+++ dovecot-1.0-test29/src/pop3-login/client-authenticate.c 2004-07-22 13:46:07.000000000 +0400
@@ -37,7 +37,6 @@ int cmd_capa(struct pop3_client *client,
if (mech[i].advertise &&
(client->secured || !mech[i].plaintext)) {
str_append_c(str, ' ');
- str_append(str, "AUTH=");
str_append(str, mech[i].name);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://dovecot....
2017 Nov 03
1
Bug: lmtp proxy does not quote local parts with spaces
...ere localpart contains a quoted @:
dovecot-2.2.33.2-reverse-domaincut.patch
2. Fully decode local part on receipt in LMTP, and re-encode when proxying. This
fixes the issue where quoted local quotes are stripped on proxy, preventing
successful proxying, and some director hashing problems (exposes
str_append_maybe_escape in message-address.h, some logging is still
inconsistent, though, but would require a major rework):
dovecot-2.2.33.2-quoted-local-proxy.patch
--
David Zambonini
-------------- next part --------------
--- dovecot-2.2.33.2/src/lib-mail/message-address.c 2017-10-05 18:10:44.000000000...
2017 Sep 08
5
EOF from net_disconnect(fd)
...s, "OK ", 3) == 0) {
??????????????? ? ret = 0;
??????????????? }
? }
}
}
alarm(0);
char stx[1];
stx[0]=(char) 4;
//stx[1]='\0';
if ( net_transmit(fd, stx, sizeof(stx) ) < 0 ) {
? i_error("Error writing EOF");
}
//string_t *testEOF= t_str_new(2);
//str_append(testEOF, (char*) 4);
//if ( net_transmit(fd, str_data(testEOF), str_len(testEOF) ) < 0 ) {
//????? i_error("Error writing EOF");
//??? }
//i_close_fd(&fd);
net_disconnect(fd);
fd=-1;
Thank you,
Steffan Cline
602-793-0014
2010 Aug 01
2
error 89 when loading plugin
...;s not too difficult for me.
I have written a small plugin change_passwd_plugin.c
I would like this custom IMAP command to be available to all users.
The code contains the following.
void change_passwd_plugin_init(void)
{
command_register("XCHANGEPASSWORD", cmd_xchangepasswd, 0);
str_append(capability_string, " XCHANGEPASSWORD");
}
void change_passwd_plugin_deinit(void)
{
command_unregister("XCHANGEPASSWORD");
}
% nm
0000000000000920 T change_passwd_plugin_deinit
00000000000008ec T change_passwd_plugin_init
0000000000201248 D change_passwd_plugin_ver...
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 16:25, John Fawcett via dovecot wrote:
> INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
I don't have PostgresSql, would you be able to verify if this syntax would work:
INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
2017 Sep 08
1
EOF from net_disconnect(fd)
...=(char) 4;
>>
>> //stx[1]='\0';
>>
>> if ( net_transmit(fd, stx, sizeof(stx) ) < 0 ) {
>>
>> i_error("Error writing EOF");
>>
>> }
>>
>>
>>
>> //string_t *testEOF= t_str_new(2);
>>
>> //str_append(testEOF, (char*) 4);
>>
>> //if ( net_transmit(fd, str_data(testEOF), str_len(testEOF) ) < 0 ) {
>>
>> // i_error("Error writing EOF");
>>
>> // }
>>
>>
>>
>> //i_close_fd(&fd);
>>
>> net_disconn...
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...plicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update) {
+ str_printfa(prefix, " ON CONFLICT (%s) D...