X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-mutt;h=643e2d05639ceeec4e6870484f973d2999a32ca2;hb=c08b156abb0b2b1b1335cb1ada0c08758553238b;hp=135ad3c4dc84e114d5dc07d255f1dcd28639f52a;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git diff --git a/usr_bin/grml-mutt b/usr_bin/grml-mutt index 135ad3c..643e2d0 100755 --- a/usr_bin/grml-mutt +++ b/usr_bin/grml-mutt @@ -4,11 +4,15 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Son Apr 24 16:55:51 CEST 2005 [mika] ################################################################################ PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'} -PN=`basename "$0"` +PN=$(basename "$0") + +if [ -r /etc/grml/script-functions ] ; then + . /etc/grml/script-functions + check4progs dialog mutt || echo "Warning - mutt is not available. Continuing anyway.">&2 +fi writemuttrc() { cat > $MUTTRC << EOF @@ -17,7 +21,6 @@ cat > $MUTTRC << EOF # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Son Apr 24 16:55:51 CEST 2005 [mika] ################################################################################ # important variables - adjust them if necessary @@ -33,7 +36,8 @@ $IMAPDATA set allow_8bit # send data as it is. no conversion. unset arrow_cursor # Show current mail with an inverse bar. set ascii_chars # set: use ASCII characters to build the thread tree - set autoedit # call editor without prompting for To: and Subject: + unset autoedit # call editor without prompting for To: and Subject:? + set auto_tag=yes # the next operation applies to the tagged messages automatically unset confirmappend # set: prompt for confirmation on appending mail to folder set confirmcreate # set: prompt for confirmation on creation of folders set copy # Always keep a copy of my mails! @@ -42,7 +46,7 @@ $IMAPDATA set editor=vim # use Vim as the editor (Vi IMproved www.vim.org) set folder=~/Mail # directory with all mail folders unset followup_to # do not generate a Followup-To header - set force_name # set: save outbound mail by username +# set force_name # set: save outbound mail by username set hidden_host # do not use a hostname in the address - PROBLEMATIC! set history=100 # number of input lines for prompts to remember set include # set: include mail as quoted text in replies @@ -50,10 +54,12 @@ $IMAPDATA set mime_forward=ask-yes # ask: attach message - or just quote it? unset move # do not move read mails from mailbox to $mbox (was: "set hold") set pager_context=1 # number of lines that overlap on paging -# set pager_index_lines=0 # number of lines to see from the index +# set pager_index_lines=0 # number of lines to see from the index set pager_stop # "next_page" won't jump to next message at end of messages + set postponed=+postponed # where save postponed messages? # set print_command="mp|lpr" # pipe message to "mp" for formattting - then on to "lpr" unset prompt_after # set: gives you a prompt when pager exits + set quit=ask-yes # ask before exiting set quote_regexp="^>" # some people just use '>' - *sigh* set read_inc=10 # '10': show count number for every tenth mail set record=+outbox # outbox / where to save outgoing mails @@ -61,8 +67,8 @@ $IMAPDATA set reply_to=ask-yes # "reply": set: Use address in Reply-To? set reverse_alias # show the name of sender as set with my alias for him set reverse_name # reply as the user to whom the mail was sent to - set save_name # set: save outbound mail to =username if it exists -# set shell=zsh # use the zsh for shell commands +# set save_name # save outbound mail to =username if it exists +# set shell=zsh # use the zsh for shell commands set sort=threads # sorting method - I definitely like "threads" best set status_on_top # set: present the status bar at top, ie before the index set strict_threads # set: use references: for threading only, ie do not @@ -71,8 +77,15 @@ $IMAPDATA set tmpdir="/tmp" # directory where temporary files are to be placed set to_chars="X+TCF" # message flags: non-personal,personal,To:,Cc:,From: set use_from # 'set from=' requires a 'set use_from'! +# set use_envelope_from # when set, mutt will use $envelope_from_address as the envelope sender set write_inc=10 # update number after each tenth read mail +# Sending mail: +# set sendmail="/usr/bin/msmtp" # which sendmail program should be used? +# set smtp_url="smtp://yourusername@smtp.example.org:port/" # versions >=1.5... + # ... of Mutt have built-in SMTP support +# set smtp_pass="password" # password for smtp_url option + # Options with a long value: # set alternates=... set attribution="* %n <%a> [%(%y%m%d %H:%M)]:" # how to cite the author @@ -318,7 +331,7 @@ ASKPOP=$(dialog --stdout --title "$PN" --yesno "Configure POP3?" 0 0) retval=$? case $retval in - 0) + 0) GETPOP3=$(dialog --stdout --title "$PN" --inputbox "Your POP3 account (pop[s]://[user]@hostname[:port]):" 0 56 "pop://") || exit 0 POP3=${GETPOP3} askpop && \ @@ -340,7 +353,7 @@ ASKIMAP=$(dialog --stdout --title "$PN" --yesno "Configure IMAP?" 0 0) retval=$? case $retval in - 0) + 0) GETIMAP=$(dialog --stdout --title "$PN" --inputbox "Your IMAP account (imap[s]://[user@]hostname[:port]/mailbox):" 0 65 "imap://") || exit 0 IMAP=${GETIMAP} askimap && \ @@ -362,7 +375,7 @@ case $retval in esac writecolors() { - if [ "$COLOR" == 'light' ] ; then + if [ "$COLOR" = 'light' ] ; then lightcolors fi } @@ -374,25 +387,23 @@ WRITEMUTTRC=$(dialog --stdout --title "$PN" --yesno "Write $MUTTRC?" 5 65) retval=$? case $retval in - 0) + 0) if [ -f "$MUTTRC" ] ; then dialog --stdout --title "$PN" --yesno "$MUTTRC exists. Overwrite?" 5 65 retval=$? case $retval in - 0) + 0) writemuttrc && writecolors && \ dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successful." 7 65 || \ - dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 + { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; } ;; -# *) exit 1 ;; esac else writemuttrc && writecolors && \ dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successfull." 7 65 || \ - dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 + { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; } fi ;; -# *) exit 1 ;; esac dialog --stdout --title "$PN" --msgbox "Thanks for using $PN!