[PATCH 3 of 3] Mail: add ID to imap capability list

Filipe da Silva fdasilvayy at gmail.com
Sun Jan 19 11:10:57 UTC 2014


# HG changeset patch
# User Filipe da Silva <fdasilvayy at gmail.com>
# Date 1390129340 -3600
#      Sun Jan 19 12:02:20 2014 +0100
# Node ID 6754a7a65b68dd40b1a37542d359211f4c63a004
# Parent  cb11ea53da365c2debed88d8d72864cdc3ae07d2
Mail: add ID to imap capability list.

Allow to declared the IMAP ID command support.

diff -r cb11ea53da36 -r 6754a7a65b68 src/mail/ngx_mail_imap_module.c
--- a/src/mail/ngx_mail_imap_module.c	Sun Jan 19 12:02:20 2014 +0100
+++ b/src/mail/ngx_mail_imap_module.c	Sun Jan 19 12:02:20 2014 +0100
@@ -176,6 +176,8 @@ ngx_mail_imap_merge_srv_conf(ngx_conf_t 
         size += 1 + c[i].len;
     }
 
+    size += sizeof(" ID") - 1;
+
     for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0;
          m <= NGX_MAIL_AUTH_CRAM_MD5_ENABLED;
          m <<= 1, i++)
@@ -200,6 +202,8 @@ ngx_mail_imap_merge_srv_conf(ngx_conf_t 
         p = ngx_cpymem(p, c[i].data, c[i].len);
     }
 
+    p = ngx_cpymem(p, " ID", sizeof(" ID") - 1);
+
     auth = p;
 
     for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 002-ImapID_AsDefaultCapability.diff
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140119/9092efd6/attachment-0001.bin>


More information about the nginx-devel mailing list