Skip to content

Commit

Permalink
lmtp_sieve.c:_imip() call zoneinfo_open(NULL) during initialization
Browse files Browse the repository at this point in the history
Otherwise when processimip calls caldav_store_resource() →
strip_vtimezones() → zoneinfo_lookup() the timezones are never found.
  • Loading branch information
dilyanpalauzov committed Sep 23, 2023
1 parent 9743559 commit fe9b587
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imap/lmtp_sieve.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include "xmalloc.h"
#include "xstrlcpy.h"
#include "xstrlcat.h"
#include "imap/zoneinfo_db.h"

/* generated headers are not necessarily in current directory */
#include "imap/imap_err.h"
Expand Down Expand Up @@ -2291,7 +2292,8 @@ sieve_interp_t *setup_sieve(struct sieve_interp_ctx *ctx)
sieve_register_jmapquery(interp, &jmapquery);
#endif
#ifdef HAVE_ICAL
/* need timezones for sieve snooze */
/* need timezones for sieve snooze and stripping in processimip */
zoneinfo_open(NULL);
ical_support_init();
sieve_register_snooze(interp, &sieve_snooze);
#ifdef WITH_DAV
Expand Down
4 changes: 4 additions & 0 deletions imap/lmtpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#include "xmalloc.h"
#include "xstrlcpy.h"
#include "xstrlcat.h"
#include "imap/zoneinfo_db.h"

/* generated headers are not necessarily in current directory */
#include "imap/imap_err.h"
Expand Down Expand Up @@ -1040,6 +1041,9 @@ void shut_down(int code)

libcyrus_run_delayed();

#if defined USE_SIEVE && defined HAVE_ICAL
zoneinfo_close(NULL);
#endif
/* close backend connections */
for (i = 0; i < ptrarray_size(&backend_cached); i++) {
struct backend *be = ptrarray_nth(&backend_cached, i);
Expand Down

0 comments on commit fe9b587

Please sign in to comment.