Gnus save encrypted messages in IMAP as plain text ================================================== Bulk decrypt and save --------------------- PGP-encryption is wonderful to protect the confidentiallity of the message during transport. But once received, the encryption makes it hard to search in messages. Gnus makes it possible to decrypt a number of messages and save the plain text version to disk. I started with an IMAP folder containing a number of PGP-encrypted messages. To create a archive with the decrypted version we have to do the following steps. * Select messages * Run gnus-summary-save-article-file * At the prompt, give the name of the file to save to Select messages --------------- This can be either be done by marking some messages with the '#' key, or by giving a number as argument to gnus-summary-save-article-file: (gnus-summary-save-article-file 42) will save the next 42 messages as plain text (gnus-summary-save-article-file -42) will save the previous 42 messages as plain text Run gnus-summary-save-article-file: ----------------------------------- A single message can be saved as plain text with the keys 'O f' The messages marked with '#' can also be saved in bulk as plain text with the keys 'O f' At the prompt, give the name of the file to save to --------------------------------------------------- In either method, single file, marked file, or a number of files, the name of the file to save the plain text version to, has to be supplied. After the first messages has been saved this way, the supplied name will be prompted as default for the next. This means, that just typen RET (Enter-key), the plain text version of next message will appended to file, the plain text version of first messsage was saved into. This behaviour can be changed by setting a value to gnus-prompt-before-saving, Setting gnus-prompt-before-saving to 't' ........................................ With gnus-prompt-before-saving set to 't', you are only prompted once for the file name. Setting gnus-prompt-before-saving to 'nil' .......................................... By setting gnus-prompt-before-saving to 'nil, Gnus will simply save all the articles in the default files. See: https://www.gnu.org/software/emacs/manual/html_node/gnus/Saving-Articles.html The messages are decrypted and then saved, starting from the "From: <email-address" line. A blank line is inserted between the messages. Thanks ------ Thanks to Gijs Hillenius for helping me out with this. Last edited: $Date: 2023/08/06 19:19:05 $