------------------------------------------------------------------------------------- / _ \ \_\(_)/_/ _//"\\_ JOHLEM.net / \ https://johlem.net/V1/topics/cheatsheet.php ------------------------------------------------------------------------------------- create configuration file multi maiil account for mutt ---- To create a configuration file for multiple email accounts in Mutt, you will need to first create a separate account file for each email account you want to add. These files should contain the necessary information for Mutt to connect to the email server, such as the server address, port number, and login credentials. You can then create a main configuration file, usually called ".muttrc", in your home directory, that will reference these account files. Here is an example of how you might set up the .muttrc file: -- source "~/.mutt/account1" source "~/.mutt/account2" # Set the default account to use set from = "user1@example.com" # Add keybindings to switch between accounts macro index,pager A ":set from=user1@example.com\nINBOX\n" "switch to account 1" macro index,pager B ":set from=user2@example.com\nINBOX\n" "switch to account 2" --- This way, you can easily switch between the accounts by pressing "A" or "B" in Mutt, and you can also set the default account to use. -- show to manage mail encryption with mutt Mutt supports several ways to manage mail encryption when sending and receiving emails. Some of the most common methods include: PGP (Pretty Good Privacy) encryption: Mutt can be configured to use the GnuPG (GPG) command-line tool for PGP encryption and decryption. This method requires you to generate a PGP keypair and import the public key of your recipients. S/MIME (Secure/Multipurpose Internet Mail Extensions) encryption: Mutt can also be configured to use the OpenSSL command-line tool for S/MIME encryption and decryption. This method requires you to generate an S/MIME certificate and import the public certificate of your recipients. External encryption and decryption scripts: Mutt can be configured to use external scripts for encryption and decryption. This allows you to use other encryption tools, such as Enigmail or GPGME, to handle encryption and decryption. To configure Mutt to use PGP encryption, you will need to set the following variables in your .muttrc file: -- set pgp_sign_as= 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_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to %r -- -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 %r %f" set pgp_import_command="gpg --no-verbose --import %f" set pgp_export_command="gpg --no-verbose --export --armor %r" set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" -- ou can adjust the commands as per your needs. To configure Mutt to use S/MIME encryption, you will need to set the following variables in your .muttrc file: set smime_decrypt_command="openssl smime -decrypt -in %f -recip %r -inkey %r" set smime_verify_command="openssl smime -verify -CAfile %r -in %f" set smime_sign_command="openssl smime -sign -outform PEM -signer %r -inkey %r -out %f -text" set smime_encrypt_command="openssl smime -encrypt -out