.Dd May 11, 2020 .Dt BUBGER 1 .Os . .Sh NAME .Nm bubger .Nd IMAP archive generator . .Sh SYNOPSIS .Nm .Op Fl qv .Op Fl C Ar path .Op Fl S Ar search .Op Fl a Ar algo .Op Fl h Ar head .Op Fl m Ar addr .Op Fl p Ar port .Op Fl s Ar url .Op Fl t Ar title .Op Fl u Ar base .Op Fl w Ar file .Ar host .Ar user .Op Ar mailbox . .Sh DESCRIPTION The .Nm utility renders an HTML, Atom and mboxrd archive of an IMAP mailbox arranged into threads. It requires the IMAP SORT and THREAD extensions. Partial output is cached and reused by subsequent runs. . .Pp The arguments are as follows: . .Bl -tag -width Ds .It Fl C Ar path Change directory to .Ar path before reading and writing files. . .It Fl S Ar search Limit threads to messages matching .Ar search . The default search is .Sy ALL . . .It Fl a Ar algo Set the threading algorithm to one of .Sy ORDEREDSUBJECT or .Sy REFERENCES . The default algorithm is .Sy REFERENCES . . .It Fl h Ar head Append the contents of the file .Ar head to the .Sy element of HTML pages. . .It Fl m Ar addr Set the mailto and reply Cc address for the archive. The default address is .Ar user . . .It Fl p Ar port Connect to IMAP on .Ar port . The default port is .Sy imaps .Pq 993 . TLS without STARTTLS is assumed. . .It Fl q Exit non-zero if the mailbox has not changed. . .It Fl s Ar url Add a .Dq subscribe link of .Ar url to the index page navigation. . .It Fl t Ar title Set the title for the index HTML page and Atom feed. The default title is the mailbox name. . .It Fl u Ar base Set the base URL for links in Atom feeds. . .It Fl v Log IMAP protocol to standard error. . .It Fl w Ar file Read the IMAP password from .Ar file . By default the password is set by the .Ev BUBGER_IMAP_PASSWORD environment variable. . .It Ar host Connect to IMAP on .Ar host . . .It Ar user Log in to IMAP as .Ar user . . .It Ar mailbox Render threads from .Ar mailbox . The default mailbox is .Qq Archive . .El . .Sh ENVIRONMENT .Bl -tag -width Ds .It Ev BUBGER_IMAP_PASSWORD The IMAP password. .El . .Sh FILES .Bl -tag -width Ds .It Pa index.atom Rendered Atom feed of all messages. .It Pa index.html Rendered HTML index of all threads. .It Pa thread/*.atom , Pa thread/*.html , Pa thread/*.mbox Rendered Atom, HTML and mboxrd files for each thread. .It Pa attachment/*/*/*.* Attached files. .It Pa message/*.mbox Rendered mboxrd files for each message. .It Pa UID/*.atom , Pa UID/*.html , Pa UID/*.mbox Cached Atom, HTML and mboxrd fragments for each message. .It Pa UIDNEXT Stores the next UID of the mailbox. Remove this file to force re-render the index page and feed. .It Pa UIDVALIDITY Stores the mailbox UID validity. .El . .Sh EXAMPLES .Bd -literal bubger -q imap.example.org list@example.org \e && rsync -a index.* message thread attachment example.org:public_html/ .Ed . .Sh STANDARDS .Bl -item .It .Rs .%A E. Levinson .%T Content-ID and Message-ID Uniform Resource Locators .%I IETF .%R RFC 2392 .%D August 1998 .%U https://tools.ietf.org/html/rfc2392 .Re .It .Rs .%A K. Moore .%T Message Header Extensions for Non-ASCII Text .%I IETF .%R RFC 2047 .%D November 1996 .%U https://tools.ietf.org/html/rfc2047 .Re .It .Rs .%A M. Crispin .%T INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 .%I IETF .%R RFC 3501 .%D March 2003 .%U https://tools.ietf.org/html/rfc3501 .Re .It .Rs .%A M. Crispin .%A K. Murchison .%T Internet Message Access Protocol - SORT and THREAD Extensions .%I IETF .%R RFC 5256 .%D June 2008 .%U https://tools.ietf.org/html/rfc5256 .Re .It .Rs .%A M. Nottingham .%A R. Sayre .%T The Atom Syndication Format .%I IETF .%R RFC 4287 .%D December 2005 .%U https://tools.ietf.org/html/rfc4287 .Re .It .Rs .%A N. Freed .%A N. Borenstein .%T Format of Internet Message Bodies .%I IETF .%R RFC 2045 .%D November 1996 .%U https://tools.ietf.org/html/rfc2045 .Re .It .Rs .%A P. Hoffman .%A L. Masinter .%A J. Zawinski .%T The mailto URL scheme .%I IETF .%R RFC 2368 .%D July 1998 .%U https://tools.ietf.org/html/rfc2368 .Re .It .Rs .%A R. Troost .%A S. Dorner .%A K. Moore .%T The Content-Disposition Header Field .%I IETF .%R RFC 2183 .%D August 1997 .%U https://tools.ietf.org/html/rfc2183 .Re .It .Rs .%A T. Berners-Lee .%A L. Masinter .%A M. McCahill .%T Uniform Resource Locators (URL) .%I IETF .%R RFC 1738 .%D December 1994 .%U https://tools.ietf.org/html/rfc1738 .Re .El . .Sh AUTHORS .An June Bug Aq Mt june@causal.agency . .Sh BUGS Send mail to .Aq Mt list+bubger@causal.agency .