/media/bill/SAMSUNG_G4/IJCNN2019/System_maintenance/mutt email notes.txt www.BillHowell.ca 30Jul2019 initial I wanted a fast command-line email program for [individualised, mass] emails, where 50 < mass < 1000 recipients http://www.mutt.org/doc/manual/ 24************************24 08********08 22May2021 mutt - how do I download emails? forget it - too much wo too primitive for easy use Great for auto-emails, though https://www.linux.com/news/fetching-email-mutt/ Fetching email with Mutt October 25, 2005 Author: Shashank Sharma What do you look for in an email program? You may find it in Mutt, an easy-to-use text-based messaging client. Here’s all you need to know to get started with Mutt. To read mail from a POP account using Mutt, you need to have a mail transfer agent such as Sendmail and a mail delivery agent such as Procmail installed, as well as a program that can connect to a POP server and download your emails, such as fetchmail. Most standard *nix systems, have all these programs installed. If everything is in place, let’s configure Mutt and the other programs to read Google’s Gmail messages, as Gmail allows POP forwarding. 08********08 01Feb2019 mutt setup Table_2.12._Most_common_mail_sending_keys Key Function Description m compose a new message r reply to sender g reply to all recipients reply to all recipients preserving To/Cc L reply to mailing list address f forward message b bounce (remail) message Esc k mail a PGP public key to someone Table_2.13._Most_common_compose_menu_keys Key Function Description a attach a file A attach message(s) to the message Esc k attach a PGP public key d edit description on attachment D detach a file t edit the To field Esc f edit the From field r edit the Reply-To field c edit the Cc field b edit the Bcc field y send the message s edit the Subject S select S/MIME options f specify an "Fcc" mailbox p select PGP options P postpone this message until later q quit (abort) sending the message w write the message to a folder i check spelling (if available on your system) ^F wipe passphrase(s) from memory m 4. Editing Input Fields 4.1. Introduction Mutt has a built-in line editor for inputting text, e.g. email addresses or filenames. The keys used to manipulate text input are very similar to those of Emacs. See [731]Table 2.3, "Most common line editor keys" for a full reference of available functions, their default key bindings, and short descriptions. Table_2.3._Most_common_line_editor_keys Key Function Description ^A or move to the start of the line ^B or move back one char Esc B move back one word ^D or delete the char under the cursor ^E or move to the end of the line ^F or move forward one char Esc F move forward one word complete filename, alias, or label ^T complete address with query ^K delete to the end of the line Esc d delete to the end of the word ^W kill the word in front of the cursor ^U delete entire line ^V quote the next typed key recall previous string from history recall next string from history ^R use current input to search history kill the char in front of the cursor Esc u convert word to upper case Esc l convert word to lower case Esc c capitalize the word ^G n/a abort n/a finish editing ************ 31Jul2019 Search "Linux mutt email and how do I specify many bcc?" https://superuser.com/questions/980857/how-to-add-multiple-address-cc-and-bcc-in-mutt#980888 For any option of mutt: mutt [-nx] [-e cmd] [-F file] [-H file] [-i file] [-s subj] [-b addr] [-c addr] [-a file [...] --] if you have multiple arguments following, you can use quotation marks " and commas , to separate the individual commands within the same group. For example -e "set content_type=text/html, realname='John Citizen'" -b "email1@dom.com, email2@dom.com" Full command: mutt -e "set content_type=text/html, realname='John Citizen'" -s "This is some subject" -- "this_is_the_email_you_want_to_send_to@recipients_email_address.com, second_persons_email@domain.com, third_persons_email@domain.com" < /home/dir/some_directory/the_HTML_file_you_want_to_send.html shareimprove this answer answered Feb 25 at 0:10 3kstc https://unix.stackexchange.com/questions/128004/mutt-not-sending-email-when-specifying-smtp-server#128035 https://unix.stackexchange.com/questions/143734/avoid-mutt-sending-mail-with-too-many-entries-in-to-or-cc-fields ************ 30Jul2019 https://unix.stackexchange.com/questions/128004/mutt-not-sending-email-when-specifying-smtp-server#128035 +-----+ Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS? In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem. However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes. Here's an example telnet session which shows a mailserver that uses STARTTLS: $ telnet smtp.example.com 587 Trying 127.0.0.1... Connected to smtp.example.com. Escape character is '^]'. 220 smtp.example.com ESMTP Postfix (Debian/GNU) EHLO test 250- 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN QUIT 221 2.0.0 Bye Connection closed by foreign host. shareimprove this answer edited May 6 '14 at 3:12 answered May 6 '14 at 1:58 JoeNahmias +-----+ I had the same thing and this is what worked for me. set ssl_starttls=yes set ssl_force_tls=yes set imap_user = "user@example.com" set imap_pass = "!HASHEDPASSWORD!" set folder = imap://mail.example.com/ set spoolfile = imap://mail.example.com/INBOX # SMTP user auth # # fill in the right user and pass based on your setup # # protocols: smtp for TLS (25/587), smtps for SSL (465) set smtp_url = "smtp://$imap_user@mail.example.com:587" set smtp_pass = "$imap_pass" # Where to save copies of outgoing mail set record = '+Sent' What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder. When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server. PS: check sourced config files, they might specify conflicting settings and/or in the wrong order. HTH shareimprove this answer edited Apr 22 '15 at 19:00 SailorCire 1,91611 gold badge99 silver badges2121 bronze badges answered Apr 22 '15 at 18:25 Bee Dee +-----+ I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time. The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate. By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates. So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate. shareimprove this answer edited Mar 31 '17 at 0:22 G-Man 15.2k99 gold badges4343 silver badges8181 bronze badges answered Mar 30 '17 at 23:50 user4645 ************ 30Jul2019 LMDE Software Manager installed Mutt can't copy text descriptions +-----+ https://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/ MAIL First run a quick test to make sure the “sendmail” application is installed and working correctly. Execute the following command, replacing “you@youremailid.com” with your e-mail address. # mail -s “Hello world” you@youremailid.com $ mail -s “Hello world” Bill@BillHowell.ca >> This disappeared in the ether (?) Hit the return key and you will come to a new line. Enter the text “This is a test from my server”. Follow up the text by hitting the return key again. Then hit the key combination of Control+D to continue. The command prompt will ask you if you want to mark a copy of the mail to any other address, hit Control+D again. Check your mailbox. This command will send out a mail to the email id mentioned with the subject, “Hello world”. To add content to the body of the mail while running the command you can use the following options. If you want to add text on your own: # echo “This will go into the body of the mail.” | mail -s “Hello world” you@youremailid.com And if you want mail to read the content from a file: # mail -s “Hello world” you@youremailid.com < /home/calvin/application.log Some other useful options in the mail command are: -s subject (The subject of the mail) -c email-address (Mark a copy to this “email-address”, or CC) -b email-address (Mark a blind carbon copy to this “email-address”, or BCC) Here’s how you might use these options: # echo “Welcome to the world of Calvin n Hobbes” | mail -s “Hello world” calvin@cnh.com -c hobbes@cnh.com -b susie.derkins@cnh.com MUTT One of major drawbacks of using the mail command is that it does not support the sending of attachments. mutt, on the other hand, does support it. I’ve found this feature particularly useful for scripts that generate non-textual reports or backups which are relatively small in size which I’d like to backup elsewhere. Of course, mutt allows you to do a lot more than just send attachments. It is a much more complete command line mail client than the “mail” command. Right now we’ll just explore the basic stuff we might need often. Here’s how you would attach a file to a mail: # echo “Sending an attachment.” | mutt -a backup.zip -s “attachment” calvin@cnh.com >> mutt bill@billhowell.ca <"" This command will send a mail to calvin@cnh.com with the subject (-s) “attachment”, the body text “Sending an attachment.”, containing the attachment (-a) backup.zip. Like with the mail command you can use the “-c” option to mark a copy to another mail id. +-----+ http://www.mutt.org Features Some of Mutt's features include: color support message threading MIME support (including RFC2047 support for encoded headers) PGP/MIME (RFC2015) various features to support mailing lists, including list-reply active development community POP3 support IMAP support full control of message headers when composing support for multiple mailbox formats (mbox, MMDF, MH, maildir) highly customizable, including keybindings and macros change configuration automatically based on recipients, current folder, etc. searches using regular expressions, including an internal pattern matching language Delivery Status Notification (DSN) support postpone message composition indefinetly for later recall easily include attachments when composing, even from the command line ability to specify alternate addresses for recognition of mail forwarded from other accounts, with ability to set the From: headers on replies/etc. accordingly multiple message tagging reply to or forward multiple messages at once .mailrc style configuration files easy to install (uses GNU autoconf) compiles against either curses/ncurses or S-lang translation into at least 20 languages small and efficient It's free! (no cost and GPL'ed) Though written from scratch, Mutt's initial interface was based largely on the ELM mail client. To a large extent, Mutt is still very ELM-like in presentation of information in menus (and in fact, ELM users will find it quite painless to switch as the default key bindings are identical). As development progressed, features found in other popular clients such as PINE and MUSH have been added, the result being a hybrid, or "mutt." At present, it most closely resembles the SLRN news client. Mutt was originally written by Michael Elkins but is now developed and maintained by the members of the Mutt development mailing list. # enddoc