PDA

View Full Version : mutt + gmail imap + gnupg


graudeejs
August 23rd, 2009, 18:22
Here's what you need to have in your mutt config if you want to
mutt + gmail imap:

set realname = "YOUR_NAME SURNAME"
set from = "LOGIN@gmail.com"

set signature = ~/.mutt/sign

set imap_user = "LOGIN"
set folder = "imaps://imap.gmail.com:993"
set postponed = "+[Gmail]/Drafts"
#set spoolfile = "+INBOX"
# I prefer to start with All Mail folder
set spoolfile = "+[Gmail]/All Mail"
set record = "+[Gmail]/Sent Mail"
set imap_check_subscribed = yes
set copy


when you started mutt, you'll start in All Mail folder (I love this), to change folder press c, and type folder name, or hit ?, to get list of folders


+ gnupg:

# replace 0x7ED573D3 with your private key ID
set pgp_sign_as = 0x7ED573D3

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 = "/usr/local/bin/pgpewrap gpg --batch \
--quiet --no-verbose --output - --encrypt --textmode --armor \
--always-trust --encrypt-to %a -- -r %r -- %f"
set pgp_encrypt_sign_command = "/usr/local/bin/pgpewrap gpg \
--passphrase-fd 0 --batch --quiet --no-verbose --textmode \
--output - --encrypt --sign %?a?-u %a? --armor --always-trust \
--encrypt-to %a -- -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_timeout = 300
set pgp_good_sign = "^gpg: Good signature from"
set pgp_use_gpg_agent = yes

set pgp_autosign = yes
set pgp_replyencrypt = yes
set pgp_replysign = yes
set pgp_replysignencrypted = yes
set pgp_strict_enc = yes
set pgp_verify_sig = yes
set pgp_auto_decode = yes


I attached my entire mutt config :)
Extract it in your home dir, then then check all files, and edit as necessary (very little to do)

Have fun!
For more info on mutt configuration read
http://people.gl.ciw.edu/cohen/mutt/manual.html

vivek
August 23rd, 2009, 20:46
Nice, but I do not trust much with Google. How hard is to run your own mail server these days?

graudeejs
August 23rd, 2009, 20:48
Nice, but I do not trust much with Google. How hard is to run your own mail server these days?

Ye, I don't trust googe as well.
But I can't afford to run my own server, just to get/send mail