Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Config suitable for mutt-1.5.21. Check compatability for other versions.
- today=`date`
- muttrc="$HOME/.muttrc"
- clear
- echo ".muttrc Maker for GMail (or other IMAP) by Alistair Ross"
- echo
- if [ -e $muttrc ]
- then
- printf "\a"
- echo "WARNING: There is already a .muttrc config file in your home directory"
- echo "This setup wizard will overwrite this file if you continue."
- echo "To abort this process at any time, press Ctrl-C"
- echo "Hit RETURN to continue."
- read x
- fi
- echo
- echo "Enter your email address>"
- read imap_user
- echo "Enter your IMAP password (note this will be echoed to the screen) >"
- read imap_pass
- echo "Enter your name as you wish to appear to your recipients, eg, John Smith >"
- read realname
- echo "Enter the IMAP folder URI, press return for imaps://imap.gmail.com:993 >"
- read folder
- if [ -z $folder ]
- then
- folder="imaps://imap.gmail.com:993"
- fi
- echo "Enter your SMTP URL (just hit return if you are using GMail, otherwise format is smtp://[email protected]:587/ >"
- read smtp_url
- if [ -z $smtp_url ]
- then
- smtp_url="smtp://$imap_user:587/"
- fi
- echo "Enter your from address (hit return to assume $imap_user) >"
- read from
- if [ -z $from ]
- then
- from="$imap_user"
- fi
- echo "Enter the hostname of your email provider (hit enter for gmail.com) >"
- read hostname
- if [ -z $hostname ]
- then
- hostname="gmail.com"
- fi
- echo "Enter the name of the IMAP Drafts folder (hit enter for +[Gmail]/Drafts) >"
- read postponed
- if [ -z $postponed ]
- then
- postponed="+[Gmail]/Drafts"
- fi
- clear
- printf "\a"
- echo "Thanks. I'm going to set a whole bunch of defaults for you. Including the below
- settings regarding certificate authentication which may or may not be pertinent
- to your mail server and/or preferences.
- For example, here's a few below that may be of interest. To change any setting,
- simply edit ~/.muttrc
- ignore 'Authentication-Results:'
- ignore 'DomainKey-Signature:'
- ignore 'DKIM-Signature:'
- hdr_order Date From To Cc
- set askcc = no
- set ascii_chars = yes # default: no
- set editor = '/usr/bin/vim'"
- echo "# .muttrc configuration generated by muttrcmaker for Gmail/IMAP
- # Configuration written on $today
- set imap_user = '$imap_user'
- set imap_pass = '$imap_pass'
- set imap_login = '$imap_user'
- set folder = 'imaps://imap.gmail.com:993'
- #set imap_authenticators = 'set imap_authenticators='digest-md5:gssapi:cram-md5:login'
- set smtp_url = '$smtp_url'
- set smtp_pass = '$imap_pass'
- set from = '$from'
- set realname = '$realname'
- set signature = '~/.signature'
- set hostname = '$hostname'
- set use_ipv6 = no
- set spoolfile = '+INBOX'
- set postponed='$postponed'
- set header_cache=~/.mutt/cache/headers
- set message_cachedir=~/.mutt/cache/bodies
- set certificate_file=~/.mutt/certificates
- set move = no
- set sort = 'threads'
- set sort_aux = 'last-date-received'
- set imap_check_subscribed
- ignore 'Authentication-Results:'
- ignore 'DomainKey-Signature:'
- ignore 'DKIM-Signature:'
- hdr_order Date From To Cc
- set askcc = no
- set ascii_chars = yes # default: no
- set editor = '/usr/bin/vim'
- # Colors
- color attachment brightmagenta default
- color error brightred default
- color hdrdefault red default
- color indicator brightyellow red
- color markers brightcyan default
- color message brightcyan default
- color normal default default
- color quoted brightblue default
- color search default green
- color signature red default
- color status yellow blue
- color tilde magenta default
- color tree magenta default
- # set abort_nosubject = ask-yes
- # set abort_unmodified = yes
- # set alias_file = '~/.muttrc'
- # set alias_format = '%4n %2f %t %-10a %r'
- # set allow_8bit = yes
- # set allow_ansi = no
- # set arrow_cursor = no
- # set askbcc = no
- # set assumed_charset = '(empty)'
- # set attach_charset = '(empty)'
- # set attach_format = '%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] '
- # set attach_sep = '\n'
- # set attach_split = yes
- # set attribution = 'On %d, %n wrote:'
- # set auto_tag = no
- # set autoedit = no
- # set beep = yes
- # set beep_new = no
- # set bounce = ask-yes
- # set bounce_delivered = yes
- # set braille_friendly = no
- # set certificate_file = '~/.mutt_certificates'
- # set charset = '(empty)'
- # set check_mbox_size = no
- # set check_new = yes
- # set collapse_unread = yes
- # set compose_format = '-- Mutt: Compose [Approx. msg size: %l Atts: %a]%>-'
- # set config_charset = '(empty)'
- # set confirmappend = yes
- # set confirmcreate = yes
- # set connect_timeout = '30'
- # set content_type = 'text/plain'
- # set copy = yes
- # set crypt_autoencrypt = no
- # set crypt_autopgp = yes
- # set crypt_autosign = no
- # set crypt_autosmime = yes
- # set crypt_replyencrypt = yes
- # set crypt_replysign = no
- # set crypt_replysignencrypted = no
- # set crypt_timestamp = yes
- # set crypt_use_gpgme = no
- # set crypt_use_pka = no
- # set crypt_verify_sig = yes
- # set date_format = '!%a, %b %d, %Y at %I:%M:%S%p %Z'
- # set default_hook = '~f %s !~P | (~P ~C %s)'
- # set delete = ask-yes
- # set delete_untag = yes
- # set digest_collapse = yes
- # set display_filter = '(empty)'
- # set dotlock_program = '/usr/local/bin/mutt_dotlock'
- # set dsn_notify = '(empty)'
- # set dsn_return = '(empty)'
- # set duplicate_threads = yes
- # set edit_headers = no
- # set encode_from = no
- # set entropy_file = '(empty)'
- # set envelope_from_address = '(empty)'
- # set escape = '~'
- # set fast_reply = no
- # set fcc_attach = yes
- # set fcc_clear = no
- # set folder = '~/Mail'
- # set folder_format = '%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f'
- # set followup_to = yes
- # set force_name = no
- # set forward_decode = yes
- # set forward_decrypt = yes
- # set forward_edit = yes
- # set forward_quote = no
- # set gecos_mask = '^[^,]*'
- # set hdrs = yes
- # set header = no
- # set header_cache = '(empty)'
- # set header_cache_compress = yes
- # set header_cache_pagesize = '16384'
- # set help = yes
- # set hidden_host = no
- # set hide_limited = no
- # set hide_missing = yes
- # set hide_thread_subject = yes
- # set hide_top_limited = no
- # set hide_top_missing = yes
- # set history = '10'
- # set history_file = '~/.mutthistory'
- # set honor_disposition = no
- # set honor_followup_to = yes
- # set ignore_linear_white_space = no
- # set ignore_list_reply_to = no
- # set imap_check_subscribed = no
- # set imap_delim_chars = '/.'
- # set imap_headers = '(empty)'
- # set imap_idle = no
- # set imap_keepalive = '900'
- # set imap_list_subscribed = no
- # set imap_passive = yes
- # set imap_peek = yes
- # set imap_pipeline_depth = '15'
- # set imap_servernoise = yes
- # set implicit_autoview = no
- # set include = ask-yes
- # set include_onlyfirst = no
- # set indent_string = '> '
- # set index_format = '%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s'
- # set ispell = 'ispell'
- # set keep_flagged = no
- # set locale = 'C'
- # set mail_check = '5'
- # set mail_check_recent = yes
- # set mailcap_path = '(empty)'
- # set mailcap_sanitize = yes
- # set maildir_header_cache_verify = yes
- # set maildir_trash = no
- # set mark_old = yes
- # set markers = yes
- # set mask = '!^\.[^.]'
- # set mbox = '~/mbox'
- # set mbox_type = 'mbox'
- # set menu_context = '0'
- # set menu_move_off = yes
- # set menu_scroll = no
- # set message_cache_clean = no
- # set message_cachedir = '(empty)'
- # set message_format = '%s'
- # set meta_key = no
- # set metoo = no
- # set mh_purge = no
- # set mh_seq_flagged = 'flagged'
- # set mh_seq_replied = 'replied'
- # set mh_seq_unseen = 'unseen'
- # set mime_forward = no
- # set mime_forward_decode = no
- # set mime_forward_rest = yes
- # set mix_entry_format = '%4n %c %-16s %a'
- # set mixmaster = '1'
- # set move = no
- # set narrow_tree = no
- # set net_inc = '10'
- # set pager = 'builtin'
- # set pager_context = '0'
- # set pager_format = '-%Z- %C/%m: %-20.20n %s%* -- (%P)'
- # set pager_index_lines = '0'
- # set pager_stop = no
- # set pgp_auto_decode = no
- # set pgp_autoinline = no
- # set pgp_check_exit = yes
- # set pgp_clearsign_command = '(empty)'
- # set pgp_decode_command = '(empty)'
- # set pgp_decrypt_command = '(empty)'
- # set pgp_encrypt_only_command = '(empty)'
- # set pgp_encrypt_sign_command = '(empty)'
- # set pgp_entry_format = '%4n %t%f %4l/0x%k %-4a %2c %u'
- # set pgp_export_command = '(empty)'
- # set pgp_getkeys_command = '(empty)'
- # set pgp_good_sign = '(empty)'
- # set pgp_ignore_subkeys = yes
- # set pgp_import_command = '(empty)'
- # set pgp_list_pubring_command = '(empty)'
- # set pgp_list_secring_command = '(empty)'
- # set pgp_long_ids = no
- # set pgp_mime_auto = ask-yes
- # set pgp_replyinline = no
- # set pgp_retainable_sigs = no
- # set pgp_show_unusable = yes
- # set pgp_sign_as = '(empty)'
- # set pgp_sign_command = '(empty)'
- # set pgp_sort_keys = 'address'
- # set pgp_strict_enc = yes
- # set pgp_timeout = '300'
- # set pgp_use_gpg_agent = no
- # set pgp_verify_command = '(empty)'
- # set pgp_verify_key_command = '(empty)'
- # set pipe_decode = no
- # set pipe_sep = '\n'
- # set pipe_split = no
- # set pop_auth_try_all = yes
- # set pop_authenticators = '(empty)'
- # set pop_checkinterval = '60'
- # set pop_delete = ask-no
- # set pop_host = '(empty)'
- # set pop_last = no
- # set pop_pass = '(empty)'
- # set pop_reconnect = ask-yes
- # set pop_user = '(empty)'
- # set post_indent_string = '(empty)'
- # set postpone = ask-yes
- # set postponed = '~/postponed'
- # set preconnect = '(empty)'
- # set print = ask-no
- # set print_command = 'lpr'
- # set print_decode = yes
- # set print_split = no
- # set prompt_after = yes
- # set query_command = '(empty)'
- # set query_format = '%4c %t %-25.25a %-25.25n %?e?(%e)?'
- # set quit = yes
- # set quote_regexp = '^([ \t]*[|>:}#])+'
- # set read_inc = '10'
- # set read_only = no
- # set recall = ask-yes
- # set record = '~/sent'
- # set reply_regexp = '^(re([\[0-9\]+])*|aw):[ \t]*'
- # set reply_self = no
- # set reply_to = ask-yes
- # set resolve = yes
- # set reverse_alias = no
- # set reverse_name = no
- # set reverse_realname = yes
- # set rfc2047_parameters = no
- # set save_address = no
- # set save_empty = yes
- # set save_history = '0'
- # set save_name = no
- # set score = yes
- # set score_threshold_delete = '-1'
- # set score_threshold_flag = '9999'
- # set score_threshold_read = '-1'
- # set search_context = '0'
- # set send_charset = 'us-ascii:iso-8859-1:utf-8'
- # set sendmail = '/usr/sbin/sendmail -oem -oi'
- # set sendmail_wait = '0'
- # set shell = '(empty)'
- # set sig_dashes = yes
- # set sig_on_top = no
- # set simple_search = '~f %s | ~s %s'
- # set sleep_time = '1'
- # set smart_wrap = yes
- # set smileys = '(>From )|(:[-^]?[][)(><}{|/DP])'
- # set smime_ask_cert_label = yes
- # set smime_ca_location = '(empty)'
- # set smime_certificates = '(empty)'
- # set smime_decrypt_command = '(empty)'
- # set smime_decrypt_use_default_key = yes
- # set smime_default_key = '(empty)'
- # set smime_encrypt_command = '(empty)'
- # set smime_encrypt_with = '(empty)'
- # set smime_get_cert_command = '(empty)'
- # set smime_get_cert_email_command = '(empty)'
- # set smime_get_signer_cert_command = '(empty)'
- # set smime_import_cert_command = '(empty)'
- # set smime_is_default = no
- # set smime_keys = '(empty)'
- # set smime_pk7out_command = '(empty)'
- # set smime_sign_command = '(empty)'
- # set smime_sign_opaque_command = '(empty)'
- # set smime_timeout = '300'
- # set smime_verify_command = '(empty)'
- # set smime_verify_opaque_command = '(empty)'
- # set smtp_authenticators = '(empty)'
- # set smtp_pass = '(empty)'
- # set smtp_url = '(empty)'
- # set sort = 'date'
- # set sort_alias = 'alias'
- # set sort_aux = 'date'
- # set sort_browser = 'alpha'
- # set sort_re = yes
- # set spam_separator = ','
- # set spoolfile = '(empty)'
- # set ssl_ca_certificates_file = '(empty)'
- # set ssl_client_cert = '(empty)'
- # set ssl_force_tls = no
- # set ssl_min_dh_prime_bits = '0'
- # set ssl_starttls = yes
- # set ssl_use_sslv2 = no
- # set ssl_use_sslv3 = yes
- # set ssl_use_tlsv1 = yes
- # set ssl_usesystemcerts = yes
- # set ssl_verify_dates = yes
- # set ssl_verify_host = yes
- # set status_chars = '-*%A'
- # set status_format = '-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---'
- # set status_on_top = no
- # set strict_threads = no
- # set suspend = yes
- # set text_flowed = no
- # set thorough_search = yes
- # set thread_received = no
- # set tilde = no
- # set time_inc = '0'
- # set timeout = '600'
- # set tmpdir = '(empty)'
- # set to_chars = ' +TCFL'
- # set tunnel = '(empty)'
- # set uncollapse_jump = no
- # set use_8bitmime = no
- # set use_domain = yes
- # set use_envelope_from = no
- # set use_from = yes
- # set use_idn = yes
- # set user_agent = yes
- # set visual = '(empty)'
- # set wait_key = yes
- # set weed = yes
- # set wrap = '0'
- # set wrap_headers = '78'
- # set wrap_search = yes
- # set wrapmargin = '0'
- # set write_bcc = yes
- # set write_inc = '10'
- " > .muttrc
- echo
- echo "$HOME/.muttrc Created."
Advertisement
Add Comment
Please, Sign In to add comment