s-mailx
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
s-mailx [2022/02/07 17:43] – created zilog | s-mailx [2022/06/26 15:15] (current) – flagged Gmail config as no longer functional zilog | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== Documentation and Features ===== | ===== Documentation and Features ===== | ||
- | The s-mailx(1) manpage | + | The s-mailx manpage, '' |
- | * all of 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 ==== | ||
- | The default user configuration file for S-mailx is '' | + | Several S-mailx options are pre-set via ''/ |
+ | |||
+ | The default user configuration file for S-mailx is '' | ||
<file ~sdfuser/ | <file ~sdfuser/ | ||
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 ~/ | ||
## ~sdfuser/ | ## ~sdfuser/ | ||
+ | |||
+ | # hold mail in system Inbox (default): | ||
+ | set hold | ||
# see s-nail(1) for details: | # see s-nail(1) for details: | ||
set v15-compat=yes | set v15-compat=yes | ||
+ | |||
+ | # set EDITOR if different than default: | ||
+ | #set EDITOR=vi | ||
+ | |||
# allow " | # allow " | ||
set bsdcompat dot flip autoprint | set bsdcompat dot flip autoprint | ||
- | # set some additional headers | + | ## Mbox settings: |
- | set customhdr='Organization: SDF Public Access UNIX System,\ | + | set from=' |
- | Zodiac-Sign: Scorpio' | + | set reply-to=' |
+ | # redundant is set in ~/ | ||
+ | set folder=mail | ||
+ | # ' | ||
+ | set MBOX=+Save | ||
+ | set record=+Sent | ||
+ | shortcut saved +Save | ||
+ | shortcut sent +Sent | ||
+ | |||
+ | ## automatic MIME type processing: | ||
+ | # pipe all webified msgs thru lynx(1): | ||
+ | set pipe-text/ | ||
+ | |||
+ | ## command aliases: | ||
+ | # use to return from remote accts: | ||
+ | commandalias home ' | ||
+ | # match mail(1) cmd: | ||
+ | commandalias inc ' | ||
+ | # quiet the ' | ||
+ | commandalias set ' | ||
+ | # thread/ | ||
+ | commandalias thrd 'sort thread' | ||
+ | commandalias uthr ' | ||
+ | |||
+ | ## email address aliases: | ||
+ | alias snail-list | ||
+ | |||
+ | # group aliases - note: cc/bcc mailings need to have | ||
+ | # at least one To: entry | ||
+ | #alias hop-list | ||
+ | # mrwarts@mud.bog \ | ||
+ | # " | ||
+ | |||
+ | ## SMTP stuff: | ||
+ | # wait until MTA finishes when sending mail. | ||
+ | # => allows seeing any errors: | ||
+ | set sendwait | ||
+ | |||
+ | ### IMAP accounts section: ### | ||
+ | |||
+ | # Another SDF user account: | ||
+ | account sdfuser2 { | ||
+ | set hold | ||
+ | # just because.. | ||
+ | set ssl-verify-mx.sdf.org=ignore | ||
+ | set MBOX=+Saved | ||
+ | set folder=imaps:// | ||
+ | set inbox=imaps:// | ||
+ | set password-sdfuser2@mx.sdf.org=" | ||
+ | set from=' | ||
+ | set record=+Sent | ||
+ | shortcut saved +Saved | ||
+ | shortcut sent +Sent | ||
+ | } | ||
+ | |||
+ | ### note: due to 2022 Gmail policy change this no longer works ### | ||
+ | # Typical Gmail IMAP/ | ||
+ | # note use of "URL percent encoded" | ||
+ | account gmail { | ||
+ | | ||
+ | set folder=" | ||
+ | set inbox=" | ||
+ | set password-gmail.user%40gmail.com@imap.gmail.com='********' | ||
+ | set shortcut sent=" | ||
+ | set shortcut trash=" | ||
+ | set from=' | ||
+ | set reply-to=' | ||
+ | set record=+Sent | ||
+ | shortcut saved +Saved | ||
+ | shortcut sent +Sent | ||
+ | ### Gmail SMTP stuff ### | ||
+ | # => reserved chars in SMTP pwd need to be URL percent encoded <= | ||
+ | set mta=" | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== 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 | ||
+ | |||
+ | < | ||
+ | |||
+ | 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 //mailbox-resolved// variable to just display the account and folder names: | ||
+ | |||
+ | <code file=~sdfuser/ | ||
+ | # customize prompt | ||
+ | define custom-prompt { | ||
+ | if -z $'\$account' | ||
+ | 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.1644255797.txt.gz · Last modified: 2022/02/07 17:43 by zilog