mutt message "skipped: public key already present"

Christian Aistleitner christian at quelltextlich.at
Sat Dec 15 17:44:43 CET 2012


Hi ilf,

On Fri, Dec 14, 2012 at 10:02:29PM +0100, ilf wrote:
> I am using GnuPG (1.4.11) with mutt (1.5.21) and the following muttrc 
> settings:
> 
> > set crypt_autosign
> > set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
> 
> When encrypting a mail with myself in Cc:, I get the following:
> 
> > skipped: public key already present 
> > Press any key to continue.
> 
> How can I disable having to press a key after this message or disable it 
> completely?

That problem may stem from having an "encrypt-to" line with your
key/email address in your GnuPG configuration.

Upon encryption GnuPG tries to obtain a list of keys to encrypt
to. GnuPG adds each recipient's key to this list (This includes your
key, due to the Cc). GnuPG adds the encrypt-to key (if one is given)
to this list.

So if you set encrypt-to to your own key, and Cc to yourself, your key
would be added twice to this list, and GnuPG warns against this.

mutt in turn sees that pgp_encrypt_only_command resulted in some
output on stderr and therefore pauses so you can read the output.

IIRC, mutt does not allow to skip the waiting (as $wait_key does not
apply here). pgpewrap does not allow to mangle stderr. GnuPG does not
allow to turn this logging off.

So either you insert some code to filter out this line of stderr
somewhere between those three programs, you patch either of those
three programs, or you get rid of the "encrypt-to" setting.

Maybe mutt's fcc_clear covers your use case?

Best regards,
Christian


-- 
---- quelltextlich e.U. ---- \\ ---- Christian Aistleitner ----
                           Companies' registry: 360296y in Linz
Christian Aistleitner
Gruendbergstrasze 65a        Email:  christian at quelltextlich.at
4040 Linz, Austria           Phone:          +43 732 / 26 95 63
                             Fax:            +43 732 / 26 95 63
                             Homepage: http://quelltextlich.at/
---------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: </pipermail/attachments/20121215/b0e12a60/attachment.pgp>


More information about the Gnupg-users mailing list