diff options
author | Eric Wong <e@80x24.org> | 2021-09-14 19:35:28 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-14 20:12:33 +0000 |
commit | 076f1322ba8fd0386760fc68a9df9efd34afe4a6 (patch) | |
tree | 8ba0029659d9aa6edcaa94fef361285b879bd109 /xt/net_writer-imap.t | |
parent | dacde5e35071579fb25c3f5276355ec76c840151 (diff) | |
download | public-inbox-076f1322ba8fd0386760fc68a9df9efd34afe4a6.tar.gz |
Untested at the moment(*), but we were inadvertantly truncating mailbox names with '/' due to our work-in-progress handling of "/;UID=$NUM" parameter. (*) strangely, my dovecot instance doesn't allow '/' by default, so the change to xt/net_writer-imap.t is untested. Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Link: https://public-inbox.org/meta/20210914175025.eq7s2shkc323itaf@meerkat.local/
Diffstat (limited to 'xt/net_writer-imap.t')
-rw-r--r-- | xt/net_writer-imap.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xt/net_writer-imap.t b/xt/net_writer-imap.t index 0a4cea68..f1228090 100644 --- a/xt/net_writer-imap.t +++ b/xt/net_writer-imap.t @@ -19,7 +19,8 @@ require_mods('Mail::IMAPClient'); require_ok 'PublicInbox::NetWriter'; my $host = (split(/\./, hostname))[0]; my ($base) = ($0 =~ m!\b([^/]+)\.[^\.]+\z!); -my $folder = "INBOX.$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)). +my $SEP = $ENV{IMAP_SEPARATOR} || '.'; +my $folder = "INBOX$SEP$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)). "-$$-".sprintf('%x', int(rand(0xffffffff))); my $nwr = PublicInbox::NetWriter->new; chop($imap_url) if substr($imap_url, -1) eq '/'; |