275 Commits

Author SHA1 Message Date
Manos Pitsidianakis 15ca25af73
Bump version to 0.7.2 1 week ago
Manos Pitsidianakis 37d0846195
melib/email/address: quote display_name if it contains "," 1 week ago
Manos Pitsidianakis ffc498a5d0
melib/smtp: fix Cc and Bcc ignored when sending mail 1 week ago
Manos Pitsidianakis d25eb00a11
command: improve(?) command completion and add test 2 weeks ago
Manos Pitsidianakis 240374950a
melib/email/address: quote display_name if it contains "." 3 weeks ago
Manos Pitsidianakis 505adca54d
Add forward mail option 3 weeks ago
Manos Pitsidianakis e090c31f96
state: Move grid to Screen struct under terminal mod 1 month ago
Manos Pitsidianakis 20feb50475
view/thread: open the latest email in the thread by default 1 month ago
Manos Pitsidianakis f975e1004c
Add url_launcher config setting 1 month ago
Manos Pitsidianakis b88c3c573d
Add add_addresses_to_contacts command 1 month ago
Manos Pitsidianakis 32901f57d2
Add show_date_in_my_timezone pager config flag 1 month ago
Manos Pitsidianakis d1712557cb
docs: add pager filter documentation 1 month ago
Manos Pitsidianakis a977351f0a
mail/view: respect per-folder/account pager filter override 1 month ago
Manos Pitsidianakis e7b9d2963c
pager: add filter command, esc to clear filter 1 month ago
Manos Pitsidianakis 25579d8807
terminal/cells: remove ansi module 1 month ago
Manos Pitsidianakis 22fb2ed46c
Implement pager filter through EmbedGrid 1 month ago
Manos Pitsidianakis 733de5a5fb
Fix some clippy suggestions 1 month ago
Manos Pitsidianakis 592339bdca
embed: split EmbedGrid to EmbedTerminal and EmbedGrid 1 month ago
Manos Pitsidianakis ae8c2addab
Show compile time features in with command argument 2 months ago
Manos Pitsidianakis bc08bf1d13
Bump version to 0.7.1 2 months ago
Manos Pitsidianakis 7533df86e0
Fix compilation for netbsd-9.2 2 months ago
Manos Pitsidianakis 526a246430
melib/nntp: update total/new counters on new articles 2 months ago
Alex.F 69916f267b
add 'GB18030' charset 7 months ago
Manos Pitsidianakis 13c5798c7b
conf/shortcuts.rs: add info_message_{next,previous} 2 months ago
Manos Pitsidianakis 07e166e1fb
melib/error: Add kinds: NotImplemented, NotSupported, OSError 2 months ago
Manos Pitsidianakis 72a2ba20dc
conf/accounts.rs: print info when displaying watch error 2 months ago
Manos Pitsidianakis c8da6d2049
melib/nntp: implement refresh 2 months ago
Manos Pitsidianakis 90042379a6
melib/{imap,nntp}: throw error on extra unusued conf flags 2 months ago
Manos Pitsidianakis f40ae9e11b
Change all Down/Up shortcuts to j/k 2 months ago
Manos Pitsidianakis 09f3edba76
config: show explanation if `composing` field missing 2 months ago
Manos Pitsidianakis 09dc0a2409
melib/conf: deserialize ToggleFlag from bool & string 2 months ago
Manos Pitsidianakis 3bc187c570
melib/collections: add RwRef{,Mut} structs 2 months ago
Manos Pitsidianakis 05393d8caa
listing/conversations: highlight two rows instead of three 2 months ago
Manos Pitsidianakis b49d965695
Fix unused var etc warnings 2 months ago
Manos Pitsidianakis 6235164df2
melib/nntp: increase chunk size 2 months ago
Manos Pitsidianakis 521f634e7b
melib/nntp: implement NNTP posting 2 months ago
Manos Pitsidianakis 978939d8e3
Bump version to 0.7.0 2 months ago
Manos Pitsidianakis d1437ff275
command/actions.rs: ask confirmation for delete 2 months ago
Manos Pitsidianakis f097593bed
melib/datetime: fix date format string 3 months ago
Ludovic LANGE b08570349d
Notmuch dynamic library can now be loaded on macos 4 months ago
Manos Pitsidianakis d6bf700175
Update Cargo.lock 3 months ago
Manos Pitsidianakis 5a9f63c51e
listing/compact: Fix off-by-one error in area calculation 11 months ago
Manos Pitsidianakis 9d7e877510
listing/plain: move flags to subject column 11 months ago
Manos Pitsidianakis ad2a10478e
listing/compact: move flags to subject column 11 months ago
Manos Pitsidianakis 64b62352d0
listing: add {unseen,selected,attachment,thread_snoozed} flag config values 12 months ago
Manos Pitsidianakis b411daddaa
listing/conversations: remove entry padding box character 11 months ago
Ludovic LANGE 66c6b62aa6
Cargo.lock: Update lexical-core version 4 months ago
Manos Pitsidianakis eea9ac2b58
README.md: update with new IRC channel location 4 months ago
Manos Pitsidianakis d16866e0f0
notifications: run update_xbiff even if notifications disabled 9 months ago
Manos Pitsidianakis bcca9abe66
docs: Use example.com in documentation 9 months ago
Manos Pitsidianakis 24b4c117e7
melib: don't use both {set,push}_references() 9 months ago
Manos Pitsidianakis b0fba401e6
melib/mbox: consistent line endings in MboxFormat::append 10 months ago
Manos Pitsidianakis 48d4343082
utilities/ProgressSpinner: add interval field and new spinners 10 months ago
Manos Pitsidianakis 2dfeb29b75
jobs/Timer: add set_interval() 10 months ago
Manos Pitsidianakis 63d2fb93f4
melib/nntp: fix not connecting with TLS 10 months ago
Manos Pitsidianakis cf9457882a
melib/mbox: add MboxMetadata type and write support 10 months ago
Manos Pitsidianakis 3fa9e355c2
melib/email: add Flag is_*() methods 10 months ago
Manos Pitsidianakis 3dae84182c
melib/mbox: add module-level doc 10 months ago
Manos Pitsidianakis a4ae4da8b1
Add export-mbox command 10 months ago
Manos Pitsidianakis 4050f6893f
melib/mbox: add MboxFormat::append() method 10 months ago
Manos Pitsidianakis dcccd303ac
melib/mbox: rename MboxReader to MboxFormat 10 months ago
Manos Pitsidianakis 22a64e2d76
melib: Remove unnecessary "pub use" std exports 10 months ago
Manos Pitsidianakis 781a1d0e1b
melib/backends: add collection() method to MailBackend 1 year ago
Manos Pitsidianakis eb8d29813c
utilities/Tabbed: send VisibilityChange event on changing tab 10 months ago
Manos Pitsidianakis 08af46f5ef
melib/datetime: fix test compile failure 10 months ago
Manos Pitsidianakis 2f47f1eebd
melib/jmap: fix mailbox children relationships being ignored 10 months ago
Manos Pitsidianakis 622ded8021
compose: add attribution line for replies 10 months ago
Manos Pitsidianakis 6d63429ad3
Add scrolling context to StatusBar 10 months ago
Manos Pitsidianakis 5eb4342af8
Update dependencies, update indexmap to ^1.6 10 months ago
Manos Pitsidianakis eca10a5660
melib/backends: add mailbox management events to RefreshEventKind 10 months ago
Manos Pitsidianakis a697dfabbd
melib/jmap: use receivedAt as alternative to Date in Envelope gen 10 months ago
Manos Pitsidianakis 23997bdec0
melib/jmap: add UTCDate queries in EmailFilterCondition 10 months ago
Manos Pitsidianakis 2e6a1e1ef8
melib/datetime: rename tests for consistency 10 months ago
Manos Pitsidianakis fe200a3218
melib/datetime: isolate unsafe blocks 10 months ago
Manos Pitsidianakis bf9143d8e4
melib/datetime: use Cow<'_, CStr> in timestamp_to_string() 10 months ago
Manos Pitsidianakis 441dcb62ca
melib/datetime: add format string constants 10 months ago
Manos Pitsidianakis 4cd3e28244
melib/datetime: fix import style inconsistencies 10 months ago
Manos Pitsidianakis 3dba6fdf60
melib/datetime: add posix locale arg in timestamp_to_string() 10 months ago
Manos Pitsidianakis 50cd81772f
melib/jmap: impl watch() with polling 10 months ago
Manos Pitsidianakis 613c3de3d2
melib/connections: add async sleep(dur: Duration) 10 months ago
Manos Pitsidianakis 62db7d7f32
melib/jmap: put JmapSession behind mutex 10 months ago
Manos Pitsidianakis 1c25ae12eb
Use default_cell in CellBuffer resize(), clear() 10 months ago
Manos Pitsidianakis ccc083cf88
Rewrite Cellbuffer Debug impl 10 months ago
Manos Pitsidianakis db69349251
melib/notmuch: avoid parsing entire email in Envelope creation 10 months ago
Manos Pitsidianakis 806254436b
melib/notmuch: add AccountHash field to NotmuchDb 10 months ago
Manos Pitsidianakis 4f164dc700
melib/notmuch: cleanup Query new() method 10 months ago
Manos Pitsidianakis ab0ef1b63c
melib/thread: hash Message-ID for ThreadNodeHash 10 months ago
Manos Pitsidianakis b966ee8fbd
melib/email: return &mut Self in set_*() methods 10 months ago
Manos Pitsidianakis 34e970d922
melib/datetime: Add Locale struct for error checking 10 months ago
Zisu Andrei f7cbd9a64d
melib/datetime: Set C locale for strptime parsing 10 months ago
Manos Pitsidianakis 829f1243fb
melib/imap: fix invalid FETCH edge case 10 months ago
Manos Pitsidianakis 1be30968ca
melib/mbox: fix FreeBSD compilation 10 months ago
Manos Pitsidianakis 92475c349a
melib/mbox: return Result in file locking 10 months ago
Manos Pitsidianakis 2d5f5e767c
listing/conversations: hash addr by addr_spec in from_address_list 10 months ago
Zisu Andrei 0034f195e3
melib/imap: Lazy evaluate idle capability 10 months ago
Manos Pitsidianakis 9124ad0ae7
conf/accounts: remove some unnecessary unwraps 10 months ago
Manos Pitsidianakis ed826357a3
Don't unwrap try_recv() on async jobs channels 10 months ago
Manos Pitsidianakis b2e853dd7b
melib/imap: update unseen count on \Seen set_flags() 10 months ago
matzipan@gmail.com aa503deb76
melib/imap: Set special usage attributes for INBOX 10 months ago
Manos Pitsidianakis fee8f5b575
melib/backends: move IsSubscribedFn to backends mod 10 months ago
Manos Pitsidianakis 7e977fe627
melib/imap/cache/sync: explicitly remove new seen messages from unseen counter 11 months ago
Manos Pitsidianakis 09684e821d
melib/imap: check INBOX when pausing IDLE 11 months ago
Manos Pitsidianakis 10b10e6267
README.md: add mirror links 11 months ago
Manos Pitsidianakis 48e7a493a9
Add reload-config command 11 months ago
Manos Pitsidianakis e5b0ff4fe2
state: remove runtime_settings 11 months ago
Manos Pitsidianakis 68f9d1220b
melib/imap: remove DoubleEndedIterator for ImapLineIterator 11 months ago
Manos Pitsidianakis 1408690a9a
melib/imap: don't retry watch conn on non-network error 11 months ago
Manos Pitsidianakis 76814cea20
themes/sail: make only headers_name bold 11 months ago
Manos Pitsidianakis 7e1e57a2df
conf/themes: add mail.view.headers_names and mail.view.headers_area 11 months ago
Manos Pitsidianakis f8a47586e9
mail/listing: show mailbox loading state in status 11 months ago
Manos Pitsidianakis 7efbe6d692
listing: fix menu/sidebar not being redrawn on updates 11 months ago
Manos Pitsidianakis 0f86934e16
mail/status: display in-progress jobs first 11 months ago
Manos Pitsidianakis c5a5c2666b
utilities/pager: show scrolling percentage and/or search results position 11 months ago
Manos Pitsidianakis 7db32ff1b3
terminal/cells: return success flag in CellBuffer::resize() 11 months ago
Manos Pitsidianakis 857d4d546f
utilities/pager: use LineBreakText for lazy line breaking 11 months ago
Manos Pitsidianakis 5327dae02d
melib/text_processing: add LineBreakText iterator 11 months ago
Manos Pitsidianakis c990687e5f
docs/meli-themes.5: replace toml spec dead link 11 months ago
Manos Pitsidianakis 453bb0b2b2
melib/smtp: implement gmail XOAUTH2 authentication method 11 months ago
Manos Pitsidianakis 4914f29e20
themes: make conversations defaults grey 11 months ago
Manos Pitsidianakis bedf181aff
melib/imap: examine all mailboxes before idle 11 months ago
Manos Pitsidianakis 9dd21eea50
melib/threads: prefer local ThreadNode env_hash 11 months ago
Manos Pitsidianakis 4939a1ad9e
melib/imap: remove some debug prints 11 months ago
Manos Pitsidianakis 8e7583a32f
melib/imap: don't clear mailbox counts before fetching 11 months ago
Manos Pitsidianakis 5f6b4745b8
melib/imap: don't use UNSEEN select response for unseen count 11 months ago
Manos Pitsidianakis 76c1c1a213
melib/imap: don't examine unloaded mailboxes for updates 11 months ago
Manos Pitsidianakis ddfadc748d
melib/imap: don't fetch RFC822 except when requested 11 months ago
Manos Pitsidianakis 66dea9148b
mail/view: don't update() if coordinates are unchanged 11 months ago
Manos Pitsidianakis 7b3fb86483
mail/view: reset self.theme_default on loading envelope 11 months ago
Manos Pitsidianakis d8c978ed2d
mail/view/thread: fix scrollbar incorrect rendering 11 months ago
Manos Pitsidianakis d076ff573f
MailView, StatusBar: Fix area bound check 11 months ago
Manos Pitsidianakis 6cbb89a8e5
utilities/widgets: fix tiny scrollbar grievances 11 months ago
Manos Pitsidianakis aa89969dca
utilities: use align_area in shortcut help panel 11 months ago
Manos Pitsidianakis 6a67322570
utilities: add scrollbar on y overflow in shortcuts panel 11 months ago
Manos Pitsidianakis 3e109cabf0
Add sail theme 11 months ago
Manos Pitsidianakis 1cbb6828f2
Add nord theme 11 months ago
Manos Pitsidianakis de018294e4
conf/themes: make notifications bg default color instead of red 11 months ago
Manos Pitsidianakis 6dd3b0bb4f
Fix theme_default not being respected 11 months ago
Manos Pitsidianakis 714ccb5e16
Move Color to src/terminal/color.rs 11 months ago
Manos Pitsidianakis 8d9247e9a3
listing: show auto-hide scrollbar in sidebar menu 11 months ago
Manos Pitsidianakis b659749880
listing: scroll account sidebar menu 11 months ago
Manos Pitsidianakis b053aaa145
listing: prevent invalid area in print_account() 11 months ago
Manos Pitsidianakis 883b3e3a4f
mail/view: show multipart/alternative files properly in attachment list 11 months ago
Manos Pitsidianakis 98c1ece28d
Update xdg-util dependency to 0.4.0 11 months ago
Manos Pitsidianakis 54b2066f73
mail/view: set dirty after closing ContactSelector 11 months ago
Manos Pitsidianakis 007e6320d5
utilities: respect theme_default in shortcut dialog 11 months ago
Manos Pitsidianakis e01275cd93
utilities/dialogs: add cursot Unfocused state as default 11 months ago
Manos Pitsidianakis 879af75d88
utilities/dialogs: use align_area to create box 11 months ago
Manos Pitsidianakis 6a5bb2e057
Add align_area() and Alignment enum 11 months ago
Manos Pitsidianakis 311c1a8a95
utilities/dialogs: respect theme_default 11 months ago
Manos Pitsidianakis ce5c7848e8
utilities: move dialogs to its own submodule 11 months ago
Andrew Jeffery daee4e46de
Allow configuration of the sidebar divider 11 months ago
Manos Pitsidianakis 92c12d3526
melib/imap: implement OAUTH2 authentication 11 months ago
Manos Pitsidianakis 0a8a0c04c8
compose: treat inline message/rfc822 as attachments 11 months ago
Manos Pitsidianakis ede5851baf
utilities: reverse order of drawing fields in form 11 months ago
Manos Pitsidianakis 79345b3e84
utilities/StatusBar: fix lack of bounds checking in hist_area 11 months ago
Manos Pitsidianakis b46cd09ca6
compose: pass body text when replying 11 months ago
Manos Pitsidianakis bf56c88918
compose: respect auto_choose_multipart_alternative when rendering multipart/alternative attachments to text 11 months ago
Manos Pitsidianakis 73372ff1e7
compose: add show_comments arg to attachment_displays_to_text() 11 months ago
Manos Pitsidianakis d4f508642a
widgets: allow text overflow in text fields 11 months ago
Manos Pitsidianakis f69f623818
Fix some invalid area calculations 11 months ago
Manos Pitsidianakis 2ef2add67f
imap: fix untrimmed query str resulting in invalid search criteria in cyrus 11 months ago
Manos Pitsidianakis 458209b448
view/thread: clear empty space in draw_list 11 months ago
Manos Pitsidianakis b7c48a1ed0
view/thread: make list draw area consistent 11 months ago
Manos Pitsidianakis f25f93fccf
utilities: Fix incorrect calculations in ScrollBar 11 months ago
Manos Pitsidianakis 31e4ed006d
listing: fix off by one error in PageDown movement 11 months ago
Manos Pitsidianakis 179ed52add
compose: grey embed area when embed is stopped 11 months ago
Manos Pitsidianakis ebc290cc2a
compose: set format flowed if configured in pager 11 months ago
Manos Pitsidianakis f9ce5327c2
melib/imap: fix some LazyCountSet logic errors in sync 11 months ago
Manos Pitsidianakis 5b86c342fb
Update smallvec dependency to 1.5.0 11 months ago
Manos Pitsidianakis 0aa5cf273f
mail/status: don't overwrite "In-progress jobs header" 11 months ago
Manos Pitsidianakis 041257f9a6
melib/text_processing: fix CodePointsIterator implementation 11 months ago
Manos Pitsidianakis 1da6d75b08
melib/text_processing: add new wcwidth implementation 11 months ago
Manos Pitsidianakis a7c0bca8ce
Fix test errors and warnings 11 months ago
Manos Pitsidianakis 023afbaae3
RateLimit: remove unupdated test 11 months ago
Manos Pitsidianakis 1c62de57ae
Never return true on processing JobFinished 11 months ago
Manos Pitsidianakis 76f8bdc558
Add configurable shortcut for 'quit' 11 months ago
Manos Pitsidianakis d404910a0f
melib/smtp: impl AUTH LOGIN 11 months ago
Manos Pitsidianakis c0e3e78940
listing: dont overdraw menu over listing 11 months ago
Manos Pitsidianakis aaee6d094c
Fix NO_COLOR cursor highlight in sidebar and progress spinner 12 months ago
Manos Pitsidianakis 60350eaa88
mail/status: add "general" shortcut section 12 months ago
Manos Pitsidianakis aa73bd71c3
listing: fix mailbox tree rendering 12 months ago
Manos Pitsidianakis aa7ebf2918
melib/smtp: fix SMTP syntax error on DSN notify use 12 months ago
Manos Pitsidianakis 2544f54107
melib/compose: prevent bare newlines in finalised drafts 12 months ago
Manos Pitsidianakis 72084da185
Add store_sent_mail option for gmail 12 months ago
Manos Pitsidianakis 23777171f2
listing: clear_area in draw_menu 12 months ago
Manos Pitsidianakis cbaf21764c
Remove status tab, move account status page to listing 12 months ago
Manos Pitsidianakis da69eecafe
mail/status: make AccountStatus public 12 months ago
Manos Pitsidianakis f0800f38a8
melib/maildir: make MaildirOp return Result<PathBuf> 12 months ago
Manos Pitsidianakis a34f0aac5b
melib: fix bincode serialization 12 months ago
Manos Pitsidianakis 353ac2d029
melib: set upper limit for bincode deserialize 12 months ago
Manos Pitsidianakis 6c07046b66
Update bincode dependency to 1.3.1 12 months ago
Manos Pitsidianakis 8ac5558d65
Makefile: add CARGO_ARGS env var 12 months ago
Manos Pitsidianakis 43d3d3681e
Makefile: replace install(1) with mkdir, rm, cp, chmod 12 months ago
Rudi Horn f1bdae65ee
melib/jmap: add HTTP redirect policy to client 12 months ago
Manos Pitsidianakis 6cc43540d6
docs/meli.conf.5: add SmtpPassword examples 12 months ago
Manos Pitsidianakis 6392904047
Replace PosixTimer with async timers 12 months ago
Manos Pitsidianakis 57e6cf3980
Limit dbus dependency to target_os = "linux" 1 year ago
Manos Pitsidianakis 9a9c876f4a
melib: add more encodings 1 year ago
Manos Pitsidianakis afa74ccfb5
compose: add From text entry autocomplete 1 year ago
Manos Pitsidianakis 560771b32a
widgets: select AutoCompleteEntry on Enter 1 year ago
Manos Pitsidianakis 7b1ab389fa
Remove unused plugin interface 1 year ago
Manos Pitsidianakis 594a2bd0dd
listing: add set operations to range select actions 1 year ago
Manos Pitsidianakis 05ef863a45
utilities: move PageMovement to components mod 1 year ago
Manos Pitsidianakis d5aa2cb3ef
melib/line_break: add segment tree impl 1 year ago
Manos Pitsidianakis f7fc2e31e0
melib: Remove unused crossbeam dependency 1 year ago
Manos Pitsidianakis 00f5c4b9c0
melib/maildir: split parsing into big chunks 1 year ago
Manos Pitsidianakis 4b91de3d59
state: remove overlay widgets on ComponentKill events 1 year ago
Manos Pitsidianakis eb36034740
accounts: autoload Sent folders automatically 1 year ago
Manos Pitsidianakis d4e347289c
melib/README: update feature table 1 year ago
Manos Pitsidianakis 662706607b
melib: remove memmap dependency 1 year ago
Manos Pitsidianakis b904f91f45
README: replace svg with webp screenshots 1 year ago
Manos Pitsidianakis 9f39a7c5a1
statusbar: delete num buffer chars with Backspace 1 year ago
Manos Pitsidianakis 126ed8a189
statusbar: don't overwrite num buffer when progress spinner is deactivated 1 year ago
Manos Pitsidianakis 91fe7435f7
melib/imap: add suggestion on STARTTLS error 1 year ago
Manos Pitsidianakis 7a9c150f33
melib/imap: fetch References header along with ENVELOPE 1 year ago
Manos Pitsidianakis b9f4d718c7
melib/sqlite3: reset db on version mismatch 1 year ago
Manos Pitsidianakis 54cb4ea623
melib/build.rs: remove unnecessary file creation 1 year ago
Manos Pitsidianakis 7919e95ddd
terminal/embed: remove some allocations and unwraps 1 year ago
Manos Pitsidianakis 89940dd606
cli-docs: compress included text 1 year ago
Manos Pitsidianakis b69bc219c3
README.md: Add screenshots and update text 1 year ago
Manos Pitsidianakis bb51d36579
composer: send NewJob event on submission 1 year ago
Manos Pitsidianakis a2456fa3f5
docs/meli.conf.5: small fixes & additions 1 year ago
Manos Pitsidianakis 3b97e66c10
docs/meli.conf.5: add progress_spinner_sequence doc 1 year ago
Manos Pitsidianakis ddfec3e207
listing: fix menu draw artifact 1 year ago
Manos Pitsidianakis a702a04043
melib/attachments: add SMIME signature variant 1 year ago
Manos Pitsidianakis 6264ee011f
terminal/embed: remove unwraps from kill() calls 1 year ago
Manos Pitsidianakis 5acd7dfe1c
mail/view: prevent spurious redraw in special modes 1 year ago
Manos Pitsidianakis 8090d614e2
conf/pager: remove unused max_width option 1 year ago
Manos Pitsidianakis 3949cecb75
mail/composer: add scrollbars 1 year ago
Manos Pitsidianakis 1e7b40e6b3
utilities: move pager to its own module 1 year ago
Manos Pitsidianakis d8d66641e2
utilities/widgets: only advance stage by timer in ProgressSpinner 1 year ago
Manos Pitsidianakis 393c5d0d53
state: cull redraws of floating notifications 1 year ago
Manos Pitsidianakis 4c1a9b2485
Fix minor warnings 1 year ago
Manos Pitsidianakis 03a1d5a985
listing: Update status on all update events 1 year ago
Manos Pitsidianakis 279c288a22
Alter enter_command_mode shortcut to `:` 1 year ago
Manos Pitsidianakis e4cddbad25
mail/view: send NewJob event on new jobs 1 year ago
Manos Pitsidianakis 67f50d95f4
Add quit command 1 year ago
Manos Pitsidianakis 0c68807814
Add export-mail command 1 year ago
Manos Pitsidianakis 4e72b6552a
conf: add setting for progress spinner 1 year ago
Manos Pitsidianakis 310d02042f
Rename toggle_thread_snooze to "toggle thread_snooze" 1 year ago
Manos Pitsidianakis 188e020bd1
Add opt-in mouse support 1 year ago
Manos Pitsidianakis 20840625d6
melib/gpgme: trim header file 1 year ago
Manos Pitsidianakis d51d0187a6
melib/imap: change byte cache String -> Vec<u8> 1 year ago
Manos Pitsidianakis 2944fc992b
melib/imap/untagged: handle EXPUNGE if our MSNs invalid 1 year ago
Manos Pitsidianakis 535d04f4f0
melib/imap/untagged: lower mbox count on EXPUNGE events 1 year ago
Manos Pitsidianakis 6f31388b27
compose: add EditAttachments menu 1 year ago
Manos Pitsidianakis 5337a54d96
compose: move gpg mod to its own file 1 year ago
Manos Pitsidianakis b343530f0c
widgets: add button type parameter to FormWidget 1 year ago
Manos Pitsidianakis cd68008e67
melib: Implement delete_messages for IMAP, Maildir 1 year ago
Manos Pitsidianakis 19891a3042
Cargo.toml: set codegen-units = 1 1 year ago
Manos Pitsidianakis 9ce62c735a
compose: add key selection state for gpg operations 1 year ago
Manos Pitsidianakis 39fab67523
compose: use melib::Bytes pretty print for attachment size 1 year ago
Manos Pitsidianakis 0ca7b0042e
utilities: ensure Form/Button widgets are not always non-dirty 1 year ago
Manos Pitsidianakis 406af1848f
compose: add `add-attachment-file-picker` command 1 year ago
Manos Pitsidianakis a4b78532b7
Refactor job structs into JoinHandle 1 year ago
Manos Pitsidianakis 4dd8474c30
gpgme: add PartialEq impl for Key 1 year ago
Manos Pitsidianakis 0dd9e6a34b
compose: kill selectors on ComponentKill 1 year ago
Manos Pitsidianakis eb1cb5cec6
compose: expand cursor reach to attachment area 1 year ago
Manos Pitsidianakis e42c9281fd
Fix input events going to hidden components 1 year ago
Manos Pitsidianakis bc74379b27
mailview: don't process_event if coordinates uninitialised 1 year ago
Manos Pitsidianakis be45b0c02d
compose: add encrypt layer 1 year ago
Manos Pitsidianakis 3ec1ecb349
Add import mail action 1 year ago
Manos Pitsidianakis afe7eed9ef
melib/compose: don't base64 encode unless it's not ascii 1 year ago
Manos Pitsidianakis 59e60f8d28
gpgme: add context flag set/get 1 year ago
Manos Pitsidianakis a2f11c341d
compose: add async draft filter stack in sending mail 1 year ago
Manos Pitsidianakis afee1e2be5
melib/compose: fix wrong Content-Type on PGP signatures and message/rfc822 1 year ago
Manos Pitsidianakis 08df7f39b2
Add toggle encrypt action in composer 1 year ago
Manos Pitsidianakis 5d968b7c40
imap: fix out of bounds panic on receive EXPUNGE 1 year ago
Manos Pitsidianakis 347b54e0f7
segment_tree: get_max() return 0 if tree empty 1 year ago
Manos Pitsidianakis 74f31875b8
listing: fix menu gaining focus if not visible 1 year ago
Manos Pitsidianakis 23ca41e3e8
add libgpgme feature 1 year ago
Manos Pitsidianakis b9c07bacef
melib: decode text inline message/rfc822 attachments 1 year ago
Manos Pitsidianakis 87443f156f
docs/meli.1: add copyto, moveto, delete commands 1 year ago
Manos Pitsidianakis b0e50a29bd
melib/list_management: don't ignore "NO" in List-Post 1 year ago
Manos Pitsidianakis 1ddde400ee
debian/: bump version to 0.6.2 1 year ago
  1. 66
      CHANGELOG.md
  2. 810
      Cargo.lock
  3. 27
      Cargo.toml
  4. 17
      Makefile
  5. 116
      README.md
  6. 32
      build.rs
  7. 10
      config_macros.rs
  8. 348
      contrib/oauth2.py
  9. 59
      debian/changelog
  10. 12
      docs/meli-themes.5
  11. 53
      docs/meli.1
  12. 355
      docs/meli.conf.5
  13. 35
      docs/samples/sample-config.toml
  14. 70
      docs/samples/themes/nord.toml
  15. 4
      docs/samples/themes/orca.toml
  16. 69
      docs/samples/themes/sail.toml
  17. 2
      docs/samples/themes/spooky.toml
  18. 2
      docs/samples/themes/watermelon.toml
  19. 1
      docs/screenshots/compact.svg
  20. BIN
      docs/screenshots/compact.webp
  21. 1
      docs/screenshots/compose.svg
  22. BIN
      docs/screenshots/compose.webp
  23. 1
      docs/screenshots/main.svg
  24. BIN
      docs/screenshots/main.webp
  25. 17
      melib/Cargo.toml
  26. 17
      melib/README.md
  27. 378
      melib/build.rs
  28. 4
      melib/src/addressbook.rs
  29. 12
      melib/src/addressbook/vcard.rs
  30. 114
      melib/src/backends.rs
  31. 299
      melib/src/backends/imap.rs
  32. 47
      melib/src/backends/imap/cache.rs
  33. 131
      melib/src/backends/imap/cache/sync.rs
  34. 164
      melib/src/backends/imap/connection.rs
  35. 19
      melib/src/backends/imap/mailbox.rs
  36. 11
      melib/src/backends/imap/operations.rs
  37. 181
      melib/src/backends/imap/protocol_parser.rs
  38. 443
      melib/src/backends/imap/untagged.rs
  39. 224
      melib/src/backends/imap/watch.rs
  40. 86
      melib/src/backends/jmap.rs
  41. 15
      melib/src/backends/jmap/connection.rs
  42. 62
      melib/src/backends/jmap/objects/email.rs
  43. 5
      melib/src/backends/jmap/operations.rs
  44. 19
      melib/src/backends/jmap/protocol.rs
  45. 41
      melib/src/backends/jmap/rfc8620.rs
  46. 29
      melib/src/backends/maildir.rs
  47. 103
      melib/src/backends/maildir/backend.rs
  48. 148
      melib/src/backends/maildir/stream.rs
  49. 257
      melib/src/backends/mbox.rs
  50. 260
      melib/src/backends/mbox/write.rs
  51. 299
      melib/src/backends/nntp.rs
  52. 57
      melib/src/backends/nntp/connection.rs
  53. 3
      melib/src/backends/nntp/mailbox.rs
  54. 9
      melib/src/backends/nntp/protocol_parser.rs
  55. 151
      melib/src/backends/notmuch.rs
  56. 86
      melib/src/backends/notmuch/message.rs
  57. 72
      melib/src/collection.rs
  58. 75
      melib/src/conf.rs
  59. 4
      melib/src/connections.rs
  60. 368
      melib/src/datetime.rs
  61. 146
      melib/src/email.rs
  62. 14
      melib/src/email/address.rs
  63. 175
      melib/src/email/attachment_types.rs
  64. 176
      melib/src/email/attachments.rs
  65. 179
      melib/src/email/compose.rs
  66. 2
      melib/src/email/compose/mime.rs
  67. 20
      melib/src/email/list_management.rs
  68. 42
      melib/src/email/parser.rs
  69. 40
      melib/src/email/pgp.rs
  70. 7
      melib/src/error.rs
  71. 5747
      melib/src/gpgme/bindings.rs
  72. 155
      melib/src/gpgme/io.rs
  73. 1356
      melib/src/gpgme/mod.rs
  74. 38
      melib/src/lib.rs
  75. 3
      melib/src/logging.rs
  76. 145
      melib/src/smtp.rs
  77. 117
      melib/src/sqlite3.rs
  78. 4
      melib/src/text_processing/grapheme_clusters.rs
  79. 573
      melib/src/text_processing/line_break.rs
  80. 84
      melib/src/text_processing/mod.rs
  81. 1480
      melib/src/text_processing/tables.rs
  82. 608
      melib/src/text_processing/wcwidth.rs
  83. 88
      melib/src/thread.rs
  84. 113
      src/bin.rs
  85. 287
      src/command.rs
  86. 18
      src/command/actions.rs
  87. 28
      src/components.rs
  88. 53
      src/components/contacts.rs
  89. 166
      src/components/contacts/contact_list.rs
  90. 1
      src/components/mail.rs
  91. 1176
      src/components/mail/compose.rs
  92. 312
      src/components/mail/compose/edit_attachments.rs
  93. 288
      src/components/mail/compose/gpg.rs
  94. 1419
      src/components/mail/listing.rs
  95. 766
      src/components/mail/listing/compact.rs
  96. 371
      src/components/mail/listing/conversations.rs
  97. 6
      src/components/mail/listing/offline.rs
  98. 293
      src/components/mail/listing/plain.rs
  99. 87
      src/components/mail/listing/thread.rs
  100. 206
      src/components/mail/pgp.rs

66
CHANGELOG.md

@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [alpha-0.7.2] - 2021-10-15
### Added
- Add forward mail option
- Add url_launcher config setting
- Add add_addresses_to_contacts command
- Add show_date_in_my_timezone pager config flag
- docs: add pager filter documentation
- mail/view: respect per-folder/account pager filter override
- pager: add filter command, esc to clear filter
- Show compile time features in with command argument
### Fixed
- melib/email/address: quote display_name if it contains ","
- melib/smtp: fix Cc and Bcc ignored when sending mail
- melib/email/address: quote display_name if it contains "."
## [alpha-0.7.1] - 2021-09-08
### Added
- Change all Down/Up shortcuts to j/k
- add 'GB18030' charset
- melib/nntp: implement refresh
- melib/nntp: update total/new counters on new articles
- melib/nntp: implement NNTP posting
- configs: throw error on extra unusued conf flags in some imap/nntp
- configs: throw error on missing `composing` section with explanation
### Fixed
- Fix compilation for netbsd-9.2
- conf: fixed some boolean flag values requiring to be string e.g. "true"
## [alpha-0.7.0] - 2021-09-03
### Added
Notable changes:
- add import command to import email from files into accounts
- add add-attachment-file-picker command and `file_picker_command` setting to
use external commands to choose files when composing new mail
- ask confirm for delete
- add export-mbox command
- add export-mail command
- add TLS support with nntp
- add JMAP watch with polling
- add reload-config command
- add import-mail command
- imap: implement gmail XOAUTH2 authentication method
- imap: implement OAUTH2 authentication
- compose: treat inline message/rfc822 as attachments
- add gpg support via libgpgme
### Fixed
- Loading notmuch library on macos
- Limit dbus dependency to target_os = "linux"
- IMAP, notmuch, mbox backends: various performance fixes
## [alpha-0.6.2] - 2020-09-24
### Added
@ -104,3 +167,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[alpha-0.6.0]: https://github.com/meli/meli/releases/tag/alpha-0.6.0
[alpha-0.6.1]: https://github.com/meli/meli/releases/tag/alpha-0.6.1
[alpha-0.6.2]: https://github.com/meli/meli/releases/tag/alpha-0.6.2
[alpha-0.7.0]: https://github.com/meli/meli/releases/tag/alpha-0.7.0
[alpha-0.7.1]: https://github.com/meli/meli/releases/tag/alpha-0.7.1
[alpha-0.7.2]: https://github.com/meli/meli/releases/tag/alpha-0.7.2

810
Cargo.lock
File diff suppressed because it is too large
View File

27
Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "meli"
version = "0.6.2"
version = "0.7.2"
authors = ["Manos Pitsidianakis <el13635@mail.ntua.gr>"]
edition = "2018"
@ -31,25 +31,21 @@ crossbeam = "0.7.2"
signal-hook = "0.1.12"
signal-hook-registry = "1.2.0"
nix = "0.17.0"
melib = { path = "melib", version = "0.6.2" }
melib = { path = "melib", version = "0.7.2" }
serde = "1.0.71"
serde_derive = "1.0.71"
serde_json = "1.0"
toml = { version = "0.5.6", features = ["preserve_order", ] }
indexmap = { version = "^1.5", features = ["serde-1", ] }
indexmap = { version = "^1.6", features = ["serde-1", ] }
linkify = "0.4.0"
notify = "4.0.1" # >:c
notify-rust = { version = "^4", optional = true }
termion = "1.5.1"
bincode = "1.2.0"
bincode = "^1.3.0"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
unicode-segmentation = "1.2.1" # >:c
libc = {version = "0.2.59", features = ["extra_traits",]}
rmp = "^0.8"
rmpv = { version = "^0.4.2", features=["with-serde",] }
rmp-serde = "^0.14.0"
smallvec = { version = "^1.4.0", features = ["serde", ] }
smallvec = { version = "^1.5.0", features = ["serde", ] }
bitflags = "1.0"
pcre2 = { version = "0.2.3", optional = true }
structopt = { version = "0.3.14", default-features = false }
@ -57,30 +53,37 @@ svg_crate = { version = "0.8.0", optional = true, package = "svg" }
futures = "0.3.5"
async-task = "3.0.0"
num_cpus = "1.12.0"
flate2 = { version = "1.0.16", optional = true }
[target.'cfg(target_os="linux")'.dependencies]
notify-rust = { version = "^4", optional = true }
[build-dependencies]
syn = { version = "1.0.31", features = [] }
quote = "^1.0"
proc-macro2 = "1.0.18"
flate2 = { version = "1.0.16", optional = true }
[profile.release]
lto = "fat"
opt-level = "z"
codegen-units = 1
opt-level = "s"
debug = false
[workspace]
members = ["melib", "tools", ]
[features]
default = ["sqlite3", "notmuch", "regexp", "smtp", "dbus-notifications"]
default = ["sqlite3", "notmuch", "regexp", "smtp", "dbus-notifications", "gpgme"]
notmuch = ["melib/notmuch_backend", ]
jmap = ["melib/jmap_backend",]
sqlite3 = ["melib/sqlite3"]
smtp = ["melib/smtp"]
regexp = ["pcre2"]
dbus-notifications = ["notify-rust",]
cli-docs = []
cli-docs = ["flate2"]
svgscreenshot = ["svg_crate"]
gpgme = ["melib/gpgme"]
# Print tracing logs as meli runs in stderr
# enable for debug tracing logs: build with --features=debug-tracing

17
Makefile

@ -26,6 +26,7 @@ MANDIR ?= ${EXPANDED_PREFIX}/share/man
CARGO_TARGET_DIR ?= target
MIN_RUSTC ?= 1.39.0
CARGO_BIN ?= cargo
CARGO_ARGS ?=
# Installation parameters
DOCS_SUBDIR ?= docs/
@ -48,7 +49,7 @@ GREEN ?= `[ -z $${NO_COLOR+x} ] && ([ -z $${TERM} ] && echo "" || tput setaf 2)
.POSIX:
.SUFFIXES:
meli: check-deps
@${CARGO_BIN} build ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" ${FEATURES} --release
@${CARGO_BIN} build ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" ${FEATURES} --release
help:
@echo "For a quick start, build and install locally:\n ${BOLD}${GREEN}PREFIX=~/.local make install${ANSI_RESET}\n"
@ -84,15 +85,18 @@ help:
@echo -n "* NO_COLOR ${UNDERLINE}"
@[ $${NO_COLOR+x} ] && echo -n "set" || echo -n "unset"
@echo ${ANSI_RESET}
@echo "* CARGO_BIN = ${UNDERLINE}${CARGO_BIN}${ANSI_RESET}"
@echo "* CARGO_ARGS = ${UNDERLINE}${CARGO_ARGS}${ANSI_RESET}"
@echo "* MIN_RUSTC = ${UNDERLINE}${MIN_RUSTC}${ANSI_RESET}"
@#@echo "* CARGO_COLOR = ${CARGO_COLOR}"
.PHONY: check
check:
@${CARGO_BIN} test ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --workspace
@${CARGO_BIN} test ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --workspace
.PHONY: check-deps
check-deps:
@(if ! echo ${MIN_RUSTC}\\n`${CARGO_BIN} --version | cut -d ' ' -f 2` | sort -CV; then echo "rust version >= ${RED}${MIN_RUSTC}${ANSI_RESET} required, found: `which ${CARGO_BIN}` `${CARGO_BIN} --version | cut -d ' ' -f 2`" \
@(if ! echo ${MIN_RUSTC}\\n`${CARGO_BIN} --version | grep ^cargo | cut -d ' ' -f 2` | sort -CV; then echo "rust version >= ${RED}${MIN_RUSTC}${ANSI_RESET} required, found: `which ${CARGO_BIN}` `${CARGO_BIN} --version | cut -d ' ' -f 2`" \
"\nYour options:\n - Set CARGO_BIN to a supported version\n - Install a supported version from your distribution's package manager\n - Install a supported version from ${UNDERLINE}https://rustup.rs/${ANSI_RESET}" ; exit 1; fi)
@ -137,7 +141,10 @@ install-bin: meli
*:${DESTDIR}${BINDIR}:*) echo -n "";; \
*) echo "\n${RED}${BOLD}WARNING${ANSI_RESET}: ${UNDERLINE}Path ${DESTDIR}${BINDIR} is not contained in your PATH variable.${ANSI_RESET} Consider adding it if necessary.\nPATH variable: ${PATH}";; \
esac
@install -D ./${CARGO_TARGET_DIR}/release/meli $(DESTDIR)${BINDIR}/meli
@mkdir -p $(DESTDIR)${BINDIR}
@rm -f $(DESTDIR)${BINDIR}/meli
@cp ./${CARGO_TARGET_DIR}/release/meli $(DESTDIR)${BINDIR}/meli
@chmod 755 $(DESTDIR)${BINDIR}/meli
.PHONY: install
@ -161,4 +168,4 @@ deb-dist:
.PHONY: build-rustdoc
build-rustdoc:
@RUSTDOCFLAGS="--crate-version ${VERSION}_${GIT_COMMIT}_${DATE}" ${CARGO_BIN} doc ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all-features --no-deps --workspace --document-private-items --open
@RUSTDOCFLAGS="--crate-version ${VERSION}_${GIT_COMMIT}_${DATE}" ${CARGO_BIN} doc ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all-features --no-deps --workspace --document-private-items --open

116
README.md

@ -1,92 +1,87 @@
# meli
For a quick start, build and install locally:
# meli [![GitHub license](https://img.shields.io/github/license/meli/meli)](https://github.com/meli/meli/blob/master/COPYING) [![Crates.io](https://img.shields.io/crates/v/meli)](https://crates.io/crates/meli)
```sh
PREFIX=~/.local make install
```
**BSD/Linux terminal email client with support for multiple accounts and Maildir / mbox / notmuch / IMAP / JMAP.**
Available subcommands:
- meli (builds meli with optimizations in `$CARGO_TARGET_DIR`)
- install (installs binary in `$BINDIR` and documentation to `$MANDIR`)
- uninstall
Secondary subcommands:
- clean (cleans build artifacts)
- check-deps (checks dependencies)
- install-bin (installs binary to `$BINDIR`)
- install-doc (installs manpages to `$MANDIR`)
- help (prints this information)
- dist (creates release tarball named `meli-VERSION.tar.gz` in this directory)
- deb-dist (builds debian package in the parent directory)
- distclean (cleans distribution build artifacts)
- build-rustdoc (builds rustdoc documentation for all packages in `$CARGO_TARGET_DIR`)
Community links:
[mailing lists](https://lists.meli.delivery/) | `#meli` on OFTC IRC | Report bugs and/or feature requests in [meli's issue tracker](https://git.meli.delivery/meli/meli/issues "meli gitea issue tracker")
The Makefile *should* be portable and not require a specific `make` version.
| | | |
:---:|:---:|:---:
![Main view screenshot](./docs/screenshots/main.webp "mail meli view screenshot") | ![Compact main view screenshot](./docs/screenshots/compact.webp "compact main view screenshot") | ![Compose with embed terminal editor screenshot](./docs/screenshots/compose.webp "composing view screenshot")
Main view | Compact main view | Compose with embed terminal editor
# Documentation
Main repository:
* https://git.meli.delivery/meli/meli
After installing meli, see `meli(1)` and `meli.conf(5)` for documentation. Sample configuration and theme files can be found in the `samples/` subdirectory.
Official mirrors:
* https://github.com/meli/meli
# Building
## Install
- Try an [online interactive web demo](https://meli.delivery/wasm2.html "online interactive web demo") powered by WebAssembly
- [`cargo install meli`](https://crates.io/crates/meli "crates.io meli package")
- [Download and install pre-built debian package, static linux binary](https://github.com/meli/meli/releases/ "github releases for meli"), or
- Install with [Nix](https://search.nixos.org/packages?show=meli&query=meli&from=0&size=30&sort=relevance&channel=unstable#disabled "nixos package search results for 'meli'")
meli requires rust 1.39 and rust's package manager, Cargo. Information on how
to get it on your system can be found here: <https://doc.rust-lang.org/cargo/getting-started/installation.html>
## Documentation
With Cargo available, the project can be built with
See also [Quickstart tutorial](https://meli.delivery/documentation.html#quick-start).
```sh
make
```
After installing meli, see `meli(1)`, `meli.conf(5)` and `meli-themes(5)` for documentation. Sample configuration and theme files can be found in the `docs/samples/` subdirectory. Manual pages are also [hosted online](https://meli.delivery/documentation.html "meli documentation").
The resulting binary will then be found under `target/release/meli`
meli by default looks for a configuration file in this location: `$XDG_CONFIG_HOME/meli/config.toml`
Run:
You can run meli with arbitrary configuration files by setting the `$MELI_CONFIG`
environment variable to their locations, i.e.:
```sh
make install
MELI_CONFIG=./test_config cargo run
```
to install the binary and man pages. This requires root, so I suggest you override the default paths and install it in your `$HOME`:
## Build
For a quick start, build and install locally:
```sh
make PREFIX=$HOME/.local install
PREFIX=~/.local make install
```
See `meli(1)` and `meli.conf(5)` for documentation.
Available subcommands for `make` are listed with `make help`. The Makefile *should* be POSIX portable and not require a specific `make` version.
You can build and run meli with one command:
meli requires rust 1.39 and rust's package manager, Cargo. Information on how
to get it on your system can be found here: <https://doc.rust-lang.org/cargo/getting-started/installation.html>
```sh
cargo run --release
```
With Cargo available, the project can be built with `make` and the resulting binary will then be found under `target/release/meli`. Run `make install` to install the binary and man pages. This requires root, so I suggest you override the default paths and install it in your `$HOME`: `make PREFIX=$HOME/.local install`.
While the project is in early development, meli will only be developed for the
linux kernel and respected linux distributions. Support for more UNIX-like OSes
is on the roadmap.
You can build and run meli with one command: `cargo run --release`.
## Features
### Build features
Some functionality is held behind "feature gates", or compile-time flags. The following list explains each feature's purpose:
- `dbus-notifications` enables showing notifications using `dbus`.
- `notmuch` provides support for using a notmuch database as a mail backend
- `jmap` provides support for connecting to a jmap server and use it as a mail backend
- `sqlite3` provides support for builting fast search indexes in local sqlite3 databases
- `gpgme` enables GPG support via `libgpgme` (on by default)
- `dbus-notifications` enables showing notifications using `dbus` (on by default)
- `notmuch` provides support for using a notmuch database as a mail backend (on by default)
- `jmap` provides support for connecting to a jmap server and use it as a mail backend (off by default)
- `sqlite3` provides support for builting fast search indexes in local sqlite3 databases (on by default)
- `cli-docs` includes the manpage documentation compiled by either `mandoc` or `man` binary to plain text in `meli`'s command line. Embedded documentation can be viewed with the subcommand `meli man [PAGE]`
- `svgscreenshot` provides support for taking screenshots of the current view of meli and saving it as SVG files. Its only purpose is taking screenshots for the official meli webpage.
- `debug-tracing` enables various trace debug logs from various places around the meli code base. The trace log is printed in `stderr`.
- `svgscreenshot` provides support for taking screenshots of the current view of meli and saving it as SVG files. Its only purpose is taking screenshots for the official meli webpage. (off by default)
- `debug-tracing` enables various trace debug logs from various places around the meli code base. The trace log is printed in `stderr`. (off by default)
## Building in Debian
### Build Debian package (*deb*)
Building with Debian's packaged cargo might require the installation of these
two packages: `librust-openssl-sys-dev librust-libdbus-sys-dev`
A `*.deb` package can be built with `make deb-dist`
# Using notmuch
### Using notmuch
To use the optional notmuch backend feature, you must have `libnotmuch5` installed in your system. In Debian-like systems, install the `libnotmuch5` packages. meli detects the library's presence on runtime.
# Building with JMAP
### Using GPG
To use the optional gpg feature, you must have `libgpgme` installed in your system. In Debian-like systems, install the `libgpgme11` package. meli detects the library's presence on runtime.
### Building with JMAP
To build with JMAP support, prepend the environment variable `MELI_FEATURES='jmap'` to your make invocation:
@ -111,18 +106,7 @@ are printed in stderr, thus you can run meli with a redirection (i.e `2> log`)
Code style follows the default rustfmt profile.
# Configuration
meli by default looks for a configuration file in this location: `$XDG_CONFIG_HOME/meli/config.toml`
You can run meli with arbitrary configuration files by setting the `$MELI_CONFIG`
environment variable to their locations, ie:
```sh
MELI_CONFIG=./test_config cargo run
```
# Testing
## Testing
How to run specific tests:
@ -130,14 +114,14 @@ How to run specific tests:
cargo test -p {melib, meli} (-- --nocapture) (--test test_name)
```
# Profiling
## Profiling
```sh
perf record -g target/debug/bin
perf script | stackcollapse-perf | rust-unmangle | flamegraph > perf.svg
```
# Running fuzz targets
## Running fuzz targets
Note: `cargo-fuzz` requires the nightly toolchain.

32
build.rs

@ -37,6 +37,8 @@ fn main() {
]);
#[cfg(feature = "cli-docs")]
{
use flate2::Compression;
use flate2::GzBuilder;
const MANDOC_OPTS: &[&'static str] = &["-T", "utf8", "-I", "os=Generated by mandoc(1)"];
use std::env;
use std::fs::File;
@ -45,7 +47,7 @@ fn main() {
use std::process::Command;
let out_dir = env::var("OUT_DIR").unwrap();
let mut out_dir_path = Path::new(&out_dir).to_path_buf();
out_dir_path.push("meli.txt");
out_dir_path.push("meli.txt.gz");
let output = Command::new("mandoc")
.args(MANDOC_OPTS)
@ -54,11 +56,15 @@ fn main() {
.or_else(|_| Command::new("man").arg("-l").arg("docs/meli.1").output())
.unwrap();
let mut file = File::create(&out_dir_path).unwrap();
file.write_all(&output.stdout).unwrap();
let file = File::create(&out_dir_path).unwrap();
let mut gz = GzBuilder::new()
.comment(output.stdout.len().to_string().into_bytes())
.write(file, Compression::default());
gz.write_all(&output.stdout).unwrap();
gz.finish().unwrap();
out_dir_path.pop();
out_dir_path.push("meli.conf.txt");
out_dir_path.push("meli.conf.txt.gz");
let output = Command::new("mandoc")
.args(MANDOC_OPTS)
.arg("docs/meli.conf.5")
@ -70,11 +76,15 @@ fn main() {
.output()
})
.unwrap();
let mut file = File::create(&out_dir_path).unwrap();
file.write_all(&output.stdout).unwrap();
let file = File::create(&out_dir_path).unwrap();
let mut gz = GzBuilder::new()
.comment(output.stdout.len().to_string().into_bytes())
.write(file, Compression::default());
gz.write_all(&output.stdout).unwrap();
gz.finish().unwrap();
out_dir_path.pop();
out_dir_path.push("meli-themes.txt");
out_dir_path.push("meli-themes.txt.gz");
let output = Command::new("mandoc")
.args(MANDOC_OPTS)
.arg("docs/meli-themes.5")
@ -86,7 +96,11 @@ fn main() {
.output()
})
.unwrap();
let mut file = File::create(&out_dir_path).unwrap();
file.write_all(&output.stdout).unwrap();
let file = File::create(&out_dir_path).unwrap();
let mut gz = GzBuilder::new()
.comment(output.stdout.len().to_string().into_bytes())
.write(file, Compression::default());
gz.write_all(&output.stdout).unwrap();
gz.finish().unwrap();
}
}

10
config_macros.rs

@ -87,6 +87,14 @@ use super::*;
}
let override_ident: syn::Ident = format_ident!("{}Override", s.ident);
let mut field_tokentrees = vec![];
let mut attrs_tokens = vec![];
for attr in &s.attrs {
if let Ok(syn::Meta::List(ml)) = attr.parse_meta() {
if ml.path.get_ident().is_some() && ml.path.get_ident().unwrap() == "cfg" {
attrs_tokens.push(attr);
}
}
}
let mut field_idents = vec![];
for f in &s.fields {
let ident = &f.ident;
@ -146,6 +154,7 @@ use super::*;
//let fields = &s.fields;
let literal_struct = quote! {
#(#attrs_tokens)*
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(deny_unknown_fields)]
pub struct #override_ident {
@ -153,6 +162,7 @@ use super::*;
}
#(#attrs_tokens)*
impl Default for #override_ident {
fn default() -> Self {
#override_ident {

348
contrib/oauth2.py

@ -0,0 +1,348 @@
#!/usr/bin/env python3
#
# Copyright 2012 Google Inc.
# Copyright 2020 Manos Pitsidianakis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Performs client tasks for testing IMAP OAuth2 authentication.
To use this script, you'll need to have registered with Google as an OAuth
application and obtained an OAuth client ID and client secret.
See https://developers.google.com/identity/protocols/OAuth2 for instructions on
registering and for documentation of the APIs invoked by this code.
This script has 3 modes of operation.
1. The first mode is used to generate and authorize an OAuth2 token, the
first step in logging in via OAuth2.
oauth2 --user=xxx@gmail.com \
--client_id=1038[...].apps.googleusercontent.com \
--client_secret=VWFn8LIKAMC-MsjBMhJeOplZ \
--generate_oauth2_token
The script will converse with Google and generate an oauth request
token, then present you with a URL you should visit in your browser to
authorize the token. Once you get the verification code from the Google
website, enter it into the script to get your OAuth access token. The output
from this command will contain the access token, a refresh token, and some
metadata about the tokens. The access token can be used until it expires, and
the refresh token lasts indefinitely, so you should record these values for
reuse.
2. The script will generate new access tokens using a refresh token.
oauth2 --user=xxx@gmail.com \
--client_id=1038[...].apps.googleusercontent.com \
--client_secret=VWFn8LIKAMC-MsjBMhJeOplZ \
--refresh_token=1/Yzm6MRy4q1xi7Dx2DuWXNgT6s37OrP_DW_IoyTum4YA
3. The script will generate an OAuth2 string that can be fed
directly to IMAP or SMTP. This is triggered with the --generate_oauth2_string
option.
oauth2 --generate_oauth2_string --user=xxx@gmail.com \
--access_token=ya29.AGy[...]ezLg
The output of this mode will be a base64-encoded string. To use it, connect to a
IMAPFE and pass it as the second argument to the AUTHENTICATE command.
a AUTHENTICATE XOAUTH2 a9sha9sfs[...]9dfja929dk==
"""
import base64
import imaplib
import json
from optparse import OptionParser
import smtplib
import sys
import urllib.request, urllib.parse, urllib.error
def SetupOptionParser():
# Usage message is the module's docstring.
parser = OptionParser(usage=__doc__)
parser.add_option('--generate_oauth2_token',
action='store_true',
dest='generate_oauth2_token',
help='generates an OAuth2 token for testing')
parser.add_option('--generate_oauth2_string',
action='store_true',
dest='generate_oauth2_string',
help='generates an initial client response string for '
'OAuth2')
parser.add_option('--client_id',
default=None,
help='Client ID of the application that is authenticating. '
'See OAuth2 documentation for details.')
parser.add_option('--client_secret',
default=None,
help='Client secret of the application that is '
'authenticating. See OAuth2 documentation for '
'details.')
parser.add_option('--access_token',
default=None,
help='OAuth2 access token')
parser.add_option('--refresh_token',
default=None,
help='OAuth2 refresh token')
parser.add_option('--scope',
default='https://mail.google.com/',
help='scope for the access token. Multiple scopes can be '
'listed separated by spaces with the whole argument '
'quoted.')
parser.add_option('--test_imap_authentication',
action='store_true',
dest='test_imap_authentication',
help='attempts to authenticate to IMAP')
parser.add_option('--test_smtp_authentication',
action='store_true',
dest='test_smtp_authentication',
help='attempts to authenticate to SMTP')
parser.add_option('--user',
default=None,
help='email address of user whose account is being '
'accessed')
parser.add_option('--quiet',