# jgw's .nailrc file - use with /usr/pkg/bin/mailx #------------------------------------------------ # IMPORTANT! # You should to add the following to ~/.mailrc # set NAIL_EXTRA_RC=~/.nailrc #------------------------------------------------ # *** GLOBAL SETTINGS SECTION *** # Note: # Set variables _persist_ until the session ends # unless unset or reset. Type 'set' to display # current settings. # Source extra settings (aliases, macros, etc.): #source ~/extra_stuff # Use alternate MTA (bypasses local MTA): #set sendmail="/path/to/msmtp -a my_account" # Use alternate SMTP server (bypasses default SMTP): #set smtp-auth="login" #set smtp-auth-user="myacct" #set smtp-auth-password="secret" #set smtp=smtps://lavabit.com:465 # Set SSL Cert check method ("ignore" is quite; "ask" is default): #set ssl-verify="ask" set ssl-verify="ignore" #set ssl-no-default-ca #set ssl-v2-allow # Set directory where "folders" should look for mail folders # (generally not needed if set in ~/.mailrc) #set folder=mail # Set MBOX (defaults to ~/mbox): #set MBOX="~/mail/Saved" # Have nail retain copies of outgoing msgs: set record="~/mail/Sent" # Have 'record' (above) interpreted relative to 'folder': #set outfolder # Set dead.letter location (default is ~/dead.letter) #set DEAD="~/mail/dead.letter" # Retain the specified headers: retain User-Agent bcc cc date from subject to # Only retain the specified headers when saving messages: saveretain bcc cc date from subject to # Set junk mail DB directory: #set junkdb="~/mail/junk/.junkdb" # Start regardless of whether msgs are in /var/mail/<user>: set emptystart # Set alternate SHELL to use for 'sh','~!' and '!' commands: #set SHELL="/bin/sh" # Set default From: and Reply To: header fields: set from="My Name<me@freeshell.org>" set replyto="metoo@tenex.org (Me Too)" # Set AUTOSORT criteria: #set autosort=thread # Set signature file: #set signature="~/.signature-nail" # Have original msg text quoted in Replies: set quote # Specify what should be prompted for before sending msgs: set askcc set askbcc set askattach # Set default cmd for the '|' (pipe) command: #set cmd="clear ; /usr/pkg/bin/urlview" # Tell nail to start regardless of whether msgs are in /var/mail/<user>: set emptystart # Turn off autoprint so that 'd' _doesn't_ print the next message: #unset autoprint # Have html-based msgs piped thru lynx: set pipe-text/html="lynx -dump -nolist -stdin" # Have multi-part msgs (ie plain text + html) piped thru 'snip': #set pipe-multipart/alternative="~/bin/snip" # *** SUB-FOLDER SHORTCUTS SECTION shortcut saved +Saved shortcut sent +Sent shortcut draft +Draft # *** GROUP ALIASES *** # (note: cc/bcc mailings need to have at least one To: entry) alias hop-list hoppy@mud.bog \ mrwarts@mud.bog \ froggy@mud.bog alias bounce spam@uce.gov consumer.hotline@doj.state.or.us # *** ALIASES *** alias gopher "Gopher Project Discussion <gopher-project@lists.alioth.debian.org>" alias nail-devel nail-devel@lists.sourceforge.net alias netbsd-users "NetBSD Users list <netbsd-users@netbsd.org>" alias ups "totaltrack@ups.com (UPS pkg tracking)" # *** MACRO DEFINITIONS SECTION *** # run by typing 'call <macro>' or using folder-hooks # home - return to /var/mail/$USER and reset applicable variables. # Useful for getting back to local mail folders from IMAP accts. define home { fi /var/mail/$USER set folder="~/mail" set record="~/mail/Sent" shortcut saved +Saved shortcut sent +Sent shortcut draft +Draft set from="My Name<me@freeshell.org>" set replyto="metoo@tenex.org (Me Too)" } # ms - mark msgs with ":SPAM" Subject line as junk define ms { j /SPAM f :j } # eg - Exclude Good messages: # Displays "new" or "unseen" msgs that _aren't_ from lists # I subscribe to ( as determined by subject "keyword" or # from "[user@]domain.nam" ): define eg { f (or new unseen not subject "gopher" not from "netbsd.org" not from "good@heart.com") } # uas - Unset Alternate SMTP variables define uas { unset smtp-auth unset smtp-auth-user unset smtp-auth-password unset smtp } # *** POP3 ACCT SHORTCUTS SECTION ** use Mailx -f <acct> *** # unencrypted acct: shortcut mypop_acct pop3://me@mail.non-imap-server.com # SSL encrypted acct: shortcut mypop_sslacct pop3s://me@mail.non-imap-server.com # *** Remote IMAP ACCounts Section (no POP3) *** # Note: ALL outgoing messages are processed LOCALLY unless an # alternate MTA/SMTP server is set globally (see defaults above) # or within an 'account'. Also, variables set in IMAP accounts # persist until session endsunless unset/reset. Type 'set' to see # current settings, 'ac' for defined accounts. IMAP accounts are # not cached locally unless "imap-cache" is set. # Set local caching of remote IMAP accounts: #set imap-cache="~/mail/.imap-cache" # Typical SDF user IMAP acct setup w/ SSL encryption: # (probably don't need this _on_ SDF...) account sdf { set folder=imaps://sdf_user@wm.sdf.org/mail/ set record=+Sent shortcut sent +Sent shortcut saved +Saved set from="SDF user<sdf_user@tx0.org>" set replyto="SDF user<sdf_user@tx0.org>" set password-sdf_user@wm.sdf.org="secret" } # A fastmail account using 'imapmail.org' domain & SSL: account fastmail { set folder=imaps://someuser\@imapmail.org@messagingengine.com/INBOX. set record=+Sent shortcut sent +Sent shortcut saved +Save set from="someuser@imapmail.org (someuser)" set replyto="someuser@imapmail.org (someuser)" set password-someuser\@imapmail.org@messagingengine.com="secret" set autosort=thread ## folder-hook runs 'ms' macro (marks SPAM msgs as 'junk') set folder-hook-imaps://someuser\@imapmail.org@messagingengine.com/INBOX=ms ## use fastmail SMTP server (you'll be asked for user:pw) #set smtp=smtps://mail.messagingengine.com:465 } # Lavabit account w/ SSL & alternate SMTP set: account lavabit { set folder=imap://me@lavabit.com/ set record=+Sent shortcut sent +Sent shortcut saved +Saved shortcut draft +Draft shortcut trash +Trash set from="me@lavabit.com (Me)" set replyto="me@lavabit.com (Me)" set password-me@lavabit.com="secret" ## v-- unset after exiting acct (call 'uas' macro) --v set smtp-auth="login" set smtp-auth-user="me" set smtp-auth-password="secret" set smtp=smtps://lavabit.com:465 }