s-mailx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
s-mailx [2022/02/07 19:25] – zilog | s-mailx [2022/06/26 15:15] (current) – flagged Gmail config as no longer functional zilog | ||
---|---|---|---|
Line 9: | Line 9: | ||
* all Heirloom-mailx features: POP3/ | * all Heirloom-mailx features: POP3/ | ||
* Maildir support | * Maildir support | ||
+ | * readline (cmd history) | ||
* optional coloration | * optional coloration | ||
* enhanced spam filtering | * enhanced spam filtering | ||
Line 21: | Line 22: | ||
==== Configuration ==== | ==== Configuration ==== | ||
+ | Several S-mailx options are pre-set via ''/ | ||
+ | |||
The default user configuration file for S-mailx is '' | The default user configuration file for S-mailx is '' | ||
Line 41: | Line 44: | ||
</ | </ | ||
- | Note that this technique is also used for the Heirloom mailx client via the NAIL_EXTRA_RC variable; having both '' | + | Note that this technique is also used for the Heirloom mailx client via the NAIL_EXTRA_RC variable; having both '' |
<file config ~/ | <file config ~/ | ||
Line 51: | Line 54: | ||
# see s-nail(1) for details: | # see s-nail(1) for details: | ||
set v15-compat=yes | set v15-compat=yes | ||
- | |||
- | # always start even if no new messages: | ||
- | set emptystart | ||
# set EDITOR if different than default: | # set EDITOR if different than default: | ||
Line 118: | Line 118: | ||
} | } | ||
+ | ### note: due to 2022 Gmail policy change this no longer works ### | ||
# Typical Gmail IMAP/SMTP w/ SSL setup (enable IMAP on your acct first); | # Typical Gmail IMAP/SMTP w/ SSL setup (enable IMAP on your acct first); | ||
- | # note use of " | + | # note use of " |
account gmail { | account gmail { | ||
set hold | set hold | ||
set folder=" | set folder=" | ||
- | set password-gmail.user%40gmail.com@imap.gmail.com="********" | + | |
+ | | ||
set shortcut sent=" | set shortcut sent=" | ||
set shortcut trash=" | set shortcut trash=" | ||
set from=' | set from=' | ||
- | set replyto=' | + | set reply-to=' |
set record=+Sent | set record=+Sent | ||
shortcut saved +Saved | shortcut saved +Saved | ||
shortcut sent +Sent | shortcut sent +Sent | ||
- | ## Gmail SMTP stuff: | + | |
- | set smtp=smtps://smtp.gmail.com | + | # => reserved chars in SMTP pwd need to be URL percent encoded <= |
- | set smtp-auth-user=" | + | set mta="smtps:// |
- | set smtp-auth-password=" | + | |
} | } | ||
</ | </ | ||
+ | ===== S-mailx Usage ===== | ||
+ | |||
+ | Basic usage is essentially identical for all mailx-style clients and so won't be covered here; see the [[traditional_mail_1_mailx_1# | ||
+ | |||
+ | S-mailx has fairly decent interactive help. Get a listing of all commands with '' | ||
+ | |||
+ | ==== Remote accounts ==== | ||
+ | |||
+ | Remote or alternate SDF accounts are accessed via the '' | ||
+ | |||
+ | < | ||
+ | |||
+ | Note the " | ||
+ | |||
+ | If multiple folders are configured for an account they can usually be listed using the '' | ||
+ | |||
+ | ^ shortcut | ||
+ | | % | system Inbox | | ||
+ | | # | previous folder | ||
+ | | & | account MBOX | | ||
+ | |||
+ | |||
+ | To return to your default account -- the one associated with YOU -- within a S-mailx session use '' | ||
+ | |||
+ | ==== Colors and other hacks ==== | ||
+ | |||
+ | S-mailx can colorize your session experience depending on your terminal' | ||
+ | |||
+ | Example: | ||
+ | <code file=~sdfuser/ | ||
+ | # colors: prompt & msg info=teal, headers=green, | ||
+ | set colour-pager | ||
+ | if terminal && " | ||
+ | colour iso view-msginfo fg=cyan | ||
+ | colour iso view-header ft=bold, | ||
+ | colour iso view-header fg=green | ||
+ | colour iso mle-prompt fg=cyan | ||
+ | colour iso mle-error fg=red | ||
+ | endif | ||
+ | </ | ||
+ | |||
+ | Note european spelling -- use // | ||
+ | |||
+ | Hacking the prompt: by default the S-mailx prompt is just a **//?// | ||
+ | |||
+ | <code file=~sdfuser/ | ||
+ | set prompt=' | ||
+ | </ | ||
+ | |||
+ | For a local folder, say // | ||
+ | |||
+ | < | ||
+ | |||
+ | Not bad. However, remote IMAP accounts can look a bit uglier: < | ||
+ | |||
+ | If you are accessing such accounts you're already aware of their type; no need to display the full path. The following hack checks if variable //acount// is set (only set for remote accounts) and if so, uses a regex expression to filter the contents of the // | ||
+ | |||
+ | <code file=~sdfuser/ | ||
+ | # customize prompt | ||
+ | define custom-prompt { | ||
+ | if -z $' | ||
+ | set prompt=' | ||
+ | else | ||
+ | vput vexpr prompt regex " | ||
+ | endif | ||
+ | } | ||
+ | set folder-hook=custom-prompt | ||
+ | </ | ||
+ | |||
+ | Now when we switch to our account " | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | [gmail]: | ||
+ | ... | ||
+ | [gmail]: | ||
+ | </ | ||
+ | |||
+ | A bit nicer! |
s-mailx.1644261952.txt.gz · Last modified: 2022/02/07 19:25 by zilog