Merge branch '1.3'
This commit is contained in:
commit
37feeddbfb
|
@ -2927,7 +2927,7 @@ imap_find_new_msgs_p2( imap_store_t *ctx, imap_cmd_t *gcmd, int response )
|
||||||
cmd->uid = cmdp->uid;
|
cmd->uid = cmdp->uid;
|
||||||
cmd->gen.param.lastuid = 1;
|
cmd->gen.param.lastuid = 1;
|
||||||
imap_exec( ctx, &cmd->gen, imap_find_new_msgs_p3,
|
imap_exec( ctx, &cmd->gen, imap_find_new_msgs_p3,
|
||||||
"UID FETCH *:* (UID)" );
|
"UID FETCH * (UID)" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3137,9 +3137,15 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep )
|
||||||
server->pass = nfstrdup( cfg->val );
|
server->pass = nfstrdup( cfg->val );
|
||||||
else if (!strcasecmp( "PassCmd", cfg->cmd ))
|
else if (!strcasecmp( "PassCmd", cfg->cmd ))
|
||||||
server->pass_cmd = nfstrdup( cfg->val );
|
server->pass_cmd = nfstrdup( cfg->val );
|
||||||
else if (!strcasecmp( "Port", cfg->cmd ))
|
else if (!strcasecmp( "Port", cfg->cmd )) {
|
||||||
server->sconf.port = parse_int( cfg );
|
int port = parse_int( cfg );
|
||||||
else if (!strcasecmp( "Timeout", cfg->cmd ))
|
if ((unsigned)port > 0xffff) {
|
||||||
|
error( "%s:%d: Invalid port number\n", cfg->file, cfg->line );
|
||||||
|
cfg->err = 1;
|
||||||
|
} else {
|
||||||
|
server->sconf.port = (ushort)port;
|
||||||
|
}
|
||||||
|
} else if (!strcasecmp( "Timeout", cfg->cmd ))
|
||||||
server->sconf.timeout = parse_int( cfg );
|
server->sconf.timeout = parse_int( cfg );
|
||||||
else if (!strcasecmp( "PipelineDepth", cfg->cmd )) {
|
else if (!strcasecmp( "PipelineDepth", cfg->cmd )) {
|
||||||
if ((server->max_in_progress = parse_int( cfg )) < 1) {
|
if ((server->max_in_progress = parse_int( cfg )) < 1) {
|
||||||
|
|
|
@ -1573,7 +1573,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash,
|
||||||
uint uid;
|
uint uid;
|
||||||
char buf[_POSIX_PATH_MAX], nbuf[_POSIX_PATH_MAX], fbuf[NUM_FLAGS + 3], base[128];
|
char buf[_POSIX_PATH_MAX], nbuf[_POSIX_PATH_MAX], fbuf[NUM_FLAGS + 3], base[128];
|
||||||
|
|
||||||
bl = nfsnprintf( base, sizeof(base), "%ld.%d_%d.%s", (long)time( 0 ), Pid, ++MaildirCount, Hostname );
|
bl = nfsnprintf( base, sizeof(base), "%lld.%d_%d.%s", (long long)time( 0 ), Pid, ++MaildirCount, Hostname );
|
||||||
if (!to_trash) {
|
if (!to_trash) {
|
||||||
#ifdef USE_DB
|
#ifdef USE_DB
|
||||||
if (ctx->usedb) {
|
if (ctx->usedb) {
|
||||||
|
@ -1754,8 +1754,8 @@ maildir_trash_msg( store_t *gctx, message_t *gmsg,
|
||||||
for (;;) {
|
for (;;) {
|
||||||
nfsnprintf( buf, sizeof(buf), "%s/%s/%s", ctx->path, subdirs[gmsg->status & M_RECENT], msg->base );
|
nfsnprintf( buf, sizeof(buf), "%s/%s/%s", ctx->path, subdirs[gmsg->status & M_RECENT], msg->base );
|
||||||
s = strstr( msg->base, ((maildir_store_conf_t *)gctx->conf)->info_prefix );
|
s = strstr( msg->base, ((maildir_store_conf_t *)gctx->conf)->info_prefix );
|
||||||
nfsnprintf( nbuf, sizeof(nbuf), "%s/%s/%ld.%d_%d.%s%s", ctx->trash,
|
nfsnprintf( nbuf, sizeof(nbuf), "%s/%s/%lld.%d_%d.%s%s", ctx->trash,
|
||||||
subdirs[gmsg->status & M_RECENT], (long)time( 0 ), Pid, ++MaildirCount, Hostname, s ? s : "" );
|
subdirs[gmsg->status & M_RECENT], (long long)time( 0 ), Pid, ++MaildirCount, Hostname, s ? s : "" );
|
||||||
if (!rename( buf, nbuf ))
|
if (!rename( buf, nbuf ))
|
||||||
break;
|
break;
|
||||||
if (!stat( buf, &st )) {
|
if (!stat( buf, &st )) {
|
||||||
|
|
|
@ -242,8 +242,8 @@ proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@void *aux ), v
|
||||||
static char fbuf[as(Flags) + 1];
|
static char fbuf[as(Flags) + 1];
|
||||||
proxy_make_flags( cmd->data->flags, fbuf );
|
proxy_make_flags( cmd->data->flags, fbuf );
|
||||||
//# END
|
//# END
|
||||||
//# DEFINE fetch_msg_print_fmt_cb_args , flags=%s, date=%ld, size=%d
|
//# DEFINE fetch_msg_print_fmt_cb_args , flags=%s, date=%lld, size=%d
|
||||||
//# DEFINE fetch_msg_print_pass_cb_args , fbuf, cmd->data->date, cmd->data->len
|
//# DEFINE fetch_msg_print_pass_cb_args , fbuf, (long long)cmd->data->date, cmd->data->len
|
||||||
//# DEFINE fetch_msg_print_cb_args
|
//# DEFINE fetch_msg_print_cb_args
|
||||||
if (sts == DRV_OK && (DFlags & DEBUG_DRV_ALL)) {
|
if (sts == DRV_OK && (DFlags & DEBUG_DRV_ALL)) {
|
||||||
printf( "%s=========\n", cmd->gen.ctx->label );
|
printf( "%s=========\n", cmd->gen.ctx->label );
|
||||||
|
@ -257,8 +257,8 @@ proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@void *aux ), v
|
||||||
static char fbuf[as(Flags) + 1];
|
static char fbuf[as(Flags) + 1];
|
||||||
proxy_make_flags( data->flags, fbuf );
|
proxy_make_flags( data->flags, fbuf );
|
||||||
//# END
|
//# END
|
||||||
//# DEFINE store_msg_print_fmt_args , flags=%s, date=%ld, size=%d, to_trash=%s
|
//# DEFINE store_msg_print_fmt_args , flags=%s, date=%lld, size=%d, to_trash=%s
|
||||||
//# DEFINE store_msg_print_pass_args , fbuf, data->date, data->len, to_trash ? "yes" : "no"
|
//# DEFINE store_msg_print_pass_args , fbuf, (long long)data->date, data->len, to_trash ? "yes" : "no"
|
||||||
//# DEFINE store_msg_print_args
|
//# DEFINE store_msg_print_args
|
||||||
if (DFlags & DEBUG_DRV_ALL) {
|
if (DFlags & DEBUG_DRV_ALL) {
|
||||||
printf( "%s>>>>>>>>>\n", ctx->label );
|
printf( "%s>>>>>>>>>\n", ctx->label );
|
||||||
|
|
|
@ -40,7 +40,8 @@
|
||||||
# include <openssl/ssl.h>
|
# include <openssl/ssl.h>
|
||||||
# include <openssl/err.h>
|
# include <openssl/err.h>
|
||||||
# include <openssl/x509v3.h>
|
# include <openssl/x509v3.h>
|
||||||
# if OPENSSL_VERSION_NUMBER < 0x10100000L
|
# if OPENSSL_VERSION_NUMBER < 0x10100000L \
|
||||||
|
|| (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070100fL)
|
||||||
# define X509_OBJECT_get0_X509(o) ((o)->data.x509)
|
# define X509_OBJECT_get0_X509(o) ((o)->data.x509)
|
||||||
# define X509_STORE_get0_objects(o) ((o)->objs)
|
# define X509_STORE_get0_objects(o) ((o)->objs)
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -43,7 +43,7 @@ enum {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *tunnel;
|
char *tunnel;
|
||||||
char *host;
|
char *host;
|
||||||
int port;
|
ushort port;
|
||||||
int timeout;
|
int timeout;
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
char *cert_file;
|
char *cert_file;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user