Re: set config file from environment variable?
On Sat, Apr 16, 2016 at 11:09:11PM -0400, Xu Wang wrote: > It is possible to set config file with > > mutt -F /path/to/muttrc > > Is it possible to do so with environment variable? I looked at > environment variable section in man mutt and could not see it so I'm > guessing it is not possible, but I want to double-check. > Seems like there should be a MUTTRC variable doesn't it? I don't know if an alias like this would help. It becomes mutt -F $MUTTRC if MUTTRC is set, otherwise it is just mutt. But MUTTRC doesn't have to be an exported variable. alias mymutt='mutt ${MUTTRC+-F ${MUTTRC}}' or even alias mutt='mutt ${MUTTRC+-F ${MUTTRC}}' Jon -- Jon H. LaBadie j...@jgcomp.com 11226 South Shore Rd. (703) 787-0688 (H) Reston, VA 20190 (703) 935-6720 (C)
set config file from environment variable?
It is possible to set config file with mutt -F /path/to/muttrc Is it possible to do so with environment variable? I looked at environment variable section in man mutt and could not see it so I'm guessing it is not possible, but I want to double-check. Kind regards, Xu
Mutterer: a config file generator for mutt, offlineimap, and msmtp
I posted this earlier to the offlineimap mailing list and I think it might interest some subscribers of this list too. I hope this is not inappropriate. -- mwnx --- Begin Message --- Hello, Hoping this is an appropriate place to do so, I'd like to present a project of mine which might interest the offlineimap community. The project, codenamed Mutterer, is a script to centralise and automate configuration of mutt, offlineimap, msmtp, and possibly more in the future, by generating all the necessary configs from a single centralised config file. Below is the README.md from the github page, which you can check out here: https://github.com/mwnx/mutterer -- mwnx Mutterer > Centralise and automate your client-side email configuration. Mutterer is a tool to let you generate your email configuration for **mutt**, **offlineimap**, **msmtp** for all your email accounts from a single muttererrc configuration file. To make automation possible, it translates the central configuration file to **bash**, so you can use the full power of bash within your config. It was created from the observation that a lot of configuration code is redundant amongst these three programs as well as amongst the various accounts one may possess (if you're like me and have several accounts). Here is an example muttererrc file to show how simple it is to get going with Mutterer: ```bash [general] imap.accounts = john,JMan [groups] defaults = john JMan defaults_extra = %defaults main_account = john [accounts %defaults] folder=${MDIR:-~/.mail/} [account john] name = \"John Doe\" address = john...@mycompany.example.com password = mypassword imap_host = imap.mycompany.example.com smtp_host = smtp.mycompany.example.com:465 smtp.tls = on smtp.tls_starttls = on account_key = j mutt.color status = black white [account JMan] name = JMan address = jman93874915699...@gmail.com password = mypassword account_key = J mutt.color status = black magenta # The gmail preset will detect good defaults for imap and smtp here . all ``` And that's all there is to it for msmtp and offlineimap. For mutt, you'll probably want to define your own global (as opposed to account-specific) shortcuts in your ~/.mutt/muttrc which will be included from the main generated config file (~/.muttrc). What you get from this config file is: - IMAP and SMTP setup. Notice how there is no need to explicitly define anything relating to imap or smtp for gmail since these are automatically configured by the 'all' script included in the last line. - Shortcut to switch to each account's inbox ("gj" for "john" and "gJ" for "JMan"). The shortcut prefix key ("g" by default) is modifiable. - Shortcut to switch to various basic boxes for each user (by default: "\_j": junk/spam, "\_t": trash, "\_s": sent, "\_i": inbox, "\_d": drafts). to switch - Different status bar colour depending on the account you are currently in. - Other small details. See presets/{all,defaults,detect} for more details. Note also that this program has a fairly modular design and it should therefore be pretty easy to add support for other clients or tools. For instance, adding support for an indexer such as NotMuch or other methods of accessing POP3 or IMAP. Installation **WARNING**: running mutterer will overwrite your previous ~/.muttrc, ~/.offlineimaprc, and ~/.msmtprc so make a backup first! First, get mutt (I recommend mutt-patched if you're on debian), offlineimap and msmtp. You'll also need asciidoc to generate the documentation. Now, just clone the repository, and from inside it, run "make" to generate the man pages, followed by "(sudo) make install". Or if you don't want to install it, you can just run the "mutterer" script directly from the repository's directory. Create a ~/.muttererrc, using doc/muttererrc.example as inspiration and get going with "mutterer install" (**see above WARNING first**). Contributing You can help by contributing presets for various email providers. See "presets/detect". Currently supported email domains are: - gmx.com - hotmail.com - gmail.com ___ OfflineIMAP-project mailing list: offlineimap-proj...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project OfflineIMAP homepages: - https://github.com/OfflineIMAP - http://offlineimap.org--- End Message ---
Re: config file
> signature is indeed verified.. Okay... > And then there is an attachment (as seen from Outlook 'ATT00076.dat' > which has : You're using Outlook as your reference? > So how can we have this embedded in the body of the mail itself ? Uh... Most folks *don't* want that in the body of the mail itself. But you can force it; try adding the following to your muttrc: auto_view application/pgp-signature And then add the following to your mailcap: application/pgp-signature; cat %s; copiousoutput > and have the name of the file attachment changed to 'signature.asc' You don't want to do this. See the mailing list archives for the full discussion of why mutt doesn't specify a filename (hint: it's not really a file, it's part of the MIME structure). > When you send a mail, I can see in the body: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > -BEGIN PGP SIGNATURE- > ... > -END PGP SIGNATURE- > > I would like to have the same format..in the body of the mail itself A, I see. You want old-style signatures. Add the following to your muttrc: set pgp_autoinline=yes Generally, though, old-style signatures (which I use for this mailing list, because I'm often assisting people with broken email clients or configurations) have some pretty severe drawbacks. For example, it's impossible to sign your attachments, or to deal with non-ASCII email (there are some hacks, but they're unreliable workarounds for dealing with broken clients and are only applicable to specific ASCII-like character sets). As another example, the email that I'm replying to included some bits that looked like the old-style signatures, but were invalid. Email clients that attempt to verify old-style signatures will take one look at that and scream "FORGED EMAIL!", and may refuse to display your email at all. You cannot include that kind of data in the body of your email and use old-style signatures, otherwise your message risks being considered corrupt by savvy email clients (I had to jump through a few hoops in order to make mutt display your corrupt message). Thankfully, most pgp programs will try to prevent you from doing stupid things like that, and will mangle your messages in order to prevent invalid messages. But my point stands. With the exception of mailing lists where I may be dealing with people with broken mail clients (such as this one), I recommend avoiding that old style of PGP signature. It's intrusive and not very capable. PGP/MIME (the newer style of PGP signature) is MUCH better, and neatly avoids all those problems. The only reason I use them for this list is because some ancient versions of Outlook Express get confused by the PGP/MIME signature and refuse to display the message (which is idiotic, but that's Microsoft for you), but whenever I have to send something in a non-ASCII character set, I switch back to PGP/MIME. ~Kyle
Re: config file
Hi Kyle, signature is indeed verified.. When i send a mail, I see this in the body of the mail: [-- PGP output follows (current time: Tue Aug 19 09:53:01 2008) --] gpg: Signature made Tue Aug 19 09:45:35 2008 PDT using DSA key ID E4D5F777 gpg: Good signature from "xx <[EMAIL PROTECTED]>" [-- End of PGP output --] [-- The following data is signed --] xx [-- End of signed data --] And then there is an attachment (as seen from Outlook 'ATT00076.dat' which has : -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (SunOS) iD8DBQFIqvivwPhtruTV93cRAvQVAKCCUNzqUt4NAgW4NVGtgvscir0PbACeLugg TIGka5xULC+sJIkgKRQ0wl8= =KZe1 -END PGP SIGNATURE- So how can we have this embedded in the body of the mail itself ? and have the name of the file attachment changed to 'signature.asc' When you send a mail, I can see in the body: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 -BEGIN PGP SIGNATURE- ... -END PGP SIGNATURE- I would like to have the same format..in the body of the mail itself :) Thanks, - Ravi On Tue, Aug 19, 2008 at 7:11 AM, Kyle Wheeler <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Monday, August 18 at 09:35 PM, quoth Ravi Uday: >>> Thats pretty much I had.. but then I cant see the >>> >>> --BEGIN PGP MESSAGE-- > > Can't read them, or are they not there? > >>> There is a attachment in the mail and that contains the signature >>> part..! Can we have it inlined in the body of hte mail ? > > Sounds like you're not having mutt actually verify the signature. Add > the following to your muttrc: > > set crypt_verify_sig=yes > > ~Kyle > - -- > Compassion is the basis of morality. > -- Arnold Schopenhauer > -BEGIN PGP SIGNATURE- > Comment: Thank you for using encryption! > > iEYEARECAAYFAkiq1KgACgkQBkIOoMqOI16O2wCg2vCrf+QuS9iUHBuwI2GbQYZr > u4MAoIZmr+z5wQzUenfjuG4dTwYGDh6J > =gapP > -END PGP SIGNATURE- >
Re: config file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday, August 18 at 09:35 PM, quoth Ravi Uday: >> Thats pretty much I had.. but then I cant see the >> >> --BEGIN PGP MESSAGE-- Can't read them, or are they not there? >> There is a attachment in the mail and that contains the signature >> part..! Can we have it inlined in the body of hte mail ? Sounds like you're not having mutt actually verify the signature. Add the following to your muttrc: set crypt_verify_sig=yes ~Kyle - -- Compassion is the basis of morality. -- Arnold Schopenhauer -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkiq1KgACgkQBkIOoMqOI16O2wCg2vCrf+QuS9iUHBuwI2GbQYZr u4MAoIZmr+z5wQzUenfjuG4dTwYGDh6J =gapP -END PGP SIGNATURE-
Re: config file
Anybody ??? - Ravi On Mon, Aug 18, 2008 at 6:18 PM, Ravi Uday <[EMAIL PROTECTED]> wrote: > Thanks John, > > Thats pretty much I had.. but then I cant see the > > --BEGIN PGP MESSAGE-- > ... > --END PGP MESSAGE -- > > and > > -BEGIN PGP SIGNATURE- > ... > -END PGP SIGNATURE- > > texts inline in the body of the mail. > > There is a attachment in the mail and that contains the signature > part..! Can we have it inlined in the body of hte mail ? > > Thanks, > - Ravi > > On Mon, Aug 18, 2008 at 5:57 PM, John <[EMAIL PROTECTED]> wrote: >> On (18/08/08 16:41), Ravi Uday wrote: >> | >> | Hi, >> | >> | I am tyring to integrate PGP with Mutt. Can anyone of you supply me a >> | basic muttrc >> | which has PGP configurations ? >> | I did setup PGP properly butsomehow its not working when sending mails. >> | >> | Thanks, >> | Ravi >> | >> >> I "borrowed" this portion of my .muttrc, but can not remember who >> deserves the credit. (I do remember it was a highly respected source.) >> Even so, all the usual warnings apply. >> >> ## GPG >> set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch >> --output - %f" >> set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" >> set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output >> - %f" >> set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 >> --armor --detach-sign --textmode %?a?-u %a? %f" >> set pgp_clearsign_command="gpg --no-verbose --batch --output - >> --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" >> set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose >> --output - --encrypt --textmode --armor --always-trust --encrypt-to > GPG key here> -- -r %r -- %f" >> set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch >> --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? >> --armor --always-trust --encrypt-to -- -r %r -- %f" >> set pgp_import_command="gpg --no-verbose --import -v %f" >> set pgp_export_command="gpg --no-verbose --export --armor %r" >> set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint >> --check-sigs %r" >> set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons >> --list-keys %r" >> set pgp_list_secring_command="gpg --no-verbose --batch --with-colons >> --list-secret-keys %r" >> set pgp_autosign=yes >> set pgp_sign_as= >> set pgp_replyencrypt=yes >> set pgp_timeout=1800 >> set pgp_good_sign="^gpg: Good signature from" >> # GPG/PGP related color directives: >> mono bodybold"^gpg: Good signature" >> mono bodyreverse "^gpg: Bad signature from.*" >> color bodybrightblack cyan "^gpg: Signature made.*" >> color bodybrightblack green "^gpg: Good signature >> from.*" >> color bodybrightblack yellow"^gpg: Can't check >> signature.*" >> color bodybrightblack yellow"^gpg: WARNING: .*" >> color bodybrightwhite red "^gpg: BAD signature from.*" >> >> >> >> -- >> [EMAIL PROTECTED] >> >> GPG key 1024D/99421A63 2005-01-05 >> EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63 >> gpg --keyserver subkeys.pgp.net --recv-keys 99421A63 >> >> -BEGIN PGP SIGNATURE- >> Version: GnuPG v1.4.9 (GNU/Linux) >> >> iEYEARECAAYFAkiqGpEACgkQeBOf6ZlCGmPVcQCghV7EUyUofoj3PrhXSo8B2jch >> QR0AoKeOWYepGR2Zs5KelEPrKg0Eh5x5 >> =4a35 >> -END PGP SIGNATURE- >> >> >
Re: config file
Thanks John, Thats pretty much I had.. but then I cant see the --BEGIN PGP MESSAGE-- ... --END PGP MESSAGE -- and -BEGIN PGP SIGNATURE- ... -END PGP SIGNATURE- texts inline in the body of the mail. There is a attachment in the mail and that contains the signature part..! Can we have it inlined in the body of hte mail ? Thanks, - Ravi On Mon, Aug 18, 2008 at 5:57 PM, John <[EMAIL PROTECTED]> wrote: > On (18/08/08 16:41), Ravi Uday wrote: > | > | Hi, > | > | I am tyring to integrate PGP with Mutt. Can anyone of you supply me a > | basic muttrc > | which has PGP configurations ? > | I did setup PGP properly butsomehow its not working when sending mails. > | > | Thanks, > | Ravi > | > > I "borrowed" this portion of my .muttrc, but can not remember who > deserves the credit. (I do remember it was a highly respected source.) > Even so, all the usual warnings apply. > > ## GPG > set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch > --output - %f" > set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" > set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output > - %f" > set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 > --armor --detach-sign --textmode %?a?-u %a? %f" > set pgp_clearsign_command="gpg --no-verbose --batch --output - > --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" > set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose > --output - --encrypt --textmode --armor --always-trust --encrypt-to key here> -- -r %r -- %f" > set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch > --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? > --armor --always-trust --encrypt-to -- -r %r -- %f" > set pgp_import_command="gpg --no-verbose --import -v %f" > set pgp_export_command="gpg --no-verbose --export --armor %r" > set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint > --check-sigs %r" > set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons > --list-keys %r" > set pgp_list_secring_command="gpg --no-verbose --batch --with-colons > --list-secret-keys %r" > set pgp_autosign=yes > set pgp_sign_as= > set pgp_replyencrypt=yes > set pgp_timeout=1800 > set pgp_good_sign="^gpg: Good signature from" > # GPG/PGP related color directives: > mono bodybold"^gpg: Good signature" > mono bodyreverse "^gpg: Bad signature from.*" > color bodybrightblack cyan "^gpg: Signature made.*" > color bodybrightblack green "^gpg: Good signature from.*" > color bodybrightblack yellow"^gpg: Can't check > signature.*" > color bodybrightblack yellow"^gpg: WARNING: .*" > color bodybrightwhite red "^gpg: BAD signature from.*" > > > > -- > [EMAIL PROTECTED] > > GPG key 1024D/99421A63 2005-01-05 > EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63 > gpg --keyserver subkeys.pgp.net --recv-keys 99421A63 > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkiqGpEACgkQeBOf6ZlCGmPVcQCghV7EUyUofoj3PrhXSo8B2jch > QR0AoKeOWYepGR2Zs5KelEPrKg0Eh5x5 > =4a35 > -END PGP SIGNATURE- > >
Re: config file
On (18/08/08 16:41), Ravi Uday wrote: | | Hi, | | I am tyring to integrate PGP with Mutt. Can anyone of you supply me a | basic muttrc | which has PGP configurations ? | I did setup PGP properly butsomehow its not working when sending mails. | | Thanks, | Ravi | I "borrowed" this portion of my .muttrc, but can not remember who deserves the credit. (I do remember it was a highly respected source.) Even so, all the usual warnings apply. ## GPG set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to -- -r %r -- %f" set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to -- -r %r -- %f" set pgp_import_command="gpg --no-verbose --import -v %f" set pgp_export_command="gpg --no-verbose --export --armor %r" set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" set pgp_autosign=yes set pgp_sign_as= set pgp_replyencrypt=yes set pgp_timeout=1800 set pgp_good_sign="^gpg: Good signature from" # GPG/PGP related color directives: mono bodybold"^gpg: Good signature" mono bodyreverse "^gpg: Bad signature from.*" color bodybrightblack cyan "^gpg: Signature made.*" color bodybrightblack green "^gpg: Good signature from.*" color bodybrightblack yellow"^gpg: Can't check signature.*" color bodybrightblack yellow"^gpg: WARNING: .*" color bodybrightwhite red "^gpg: BAD signature from.*" -- [EMAIL PROTECTED] GPG key 1024D/99421A63 2005-01-05 EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63 gpg --keyserver subkeys.pgp.net --recv-keys 99421A63 signature.asc Description: Digital signature
config file
Hi, I am tyring to integrate PGP with Mutt. Can anyone of you supply me a basic muttrc which has PGP configurations ? I did setup PGP properly butsomehow its not working when sending mails. Thanks, Ravi
Re: making Mutt re-read its config file ?
On Sat, 06 Jul 2002, Lee J. Moore wrote: [..] > macro index \er ":source ~/etc/mutt/muttrc\n" "Reload muttrc" Oops, I forgot to mention that my muttrc location is a bit exotic and would have to be changed in that macro to ~/.muttrc on many users setups. :-) -- Lee J. Moore [EMAIL PROTECTED] Benefit the community and reply to the list msg29416/pgp0.pgp Description: PGP signature
Re: making Mutt re-read its config file ?
On Sat, 06 Jul 2002, Mehul N. Sanghvi wrote: > > 'allo, > > I am a relatively new user of Mutt and was wondering how to > get it to re-read its config file, without quiting out of it > everytime. Is there a way to do that ? I bound a macro to Esc r macro index \er ":source ~/etc/mutt/muttrc\n" "Reload muttrc" -- Lee J. Moore [EMAIL PROTECTED] Benefit the community and reply to the list msg29415/pgp0.pgp Description: PGP signature
Re: making Mutt re-read its config file ?
Patrick, Thanks for the help. Just what I was looking for. mehul On Sat, Jul 06, 2002 at 10:47:25AM -0500, Patrick wrote: > * Mehul N. Sanghvi <[EMAIL PROTECTED]> [07-06-02 10:36]: > > > > 'allo, > > > > I am a relatively new user of Mutt and was wondering how to > > get it to re-read its config file, without quiting out of it > > everytime. Is there a way to do that ? > > :source ~/.muttrc > > provided your config file is .muttrc AND located in your $HOME > directory. > > NOTE: The ':' opens a command-line at the bottom of mutt and is > required. > -- > Patrick Shanahan > Registered Linux User #207535 > @ http://counter.li.org -- Mehul N. Sanghvi email: [EMAIL PROTECTED] Superior software is always free! URL: http://kirsun.com/~mehul
Re: making Mutt re-read its config file ?
* Mehul N. Sanghvi <[EMAIL PROTECTED]> [07-06-02 10:36]: > > 'allo, > > I am a relatively new user of Mutt and was wondering how to > get it to re-read its config file, without quiting out of it > everytime. Is there a way to do that ? :source ~/.muttrc provided your config file is .muttrc AND located in your $HOME directory. NOTE: The ':' opens a command-line at the bottom of mutt and is required. -- Patrick Shanahan Registered Linux User #207535 @ http://counter.li.org
making Mutt re-read its config file ?
'allo, I am a relatively new user of Mutt and was wondering how to get it to re-read its config file, without quiting out of it everytime. Is there a way to do that ? thanks, mehul