GPG spams output using "--no-verbose --quiet --batch" when decrypting email with Mutt

Asked by Ricardo

Binary package hint: gnupg

I'm using GPG with Mutt to encrypt my email but GPG seems to output constantly its messages despite I'm using "--no-verbose --quiet --batch". So, I need to refresh the Mutt interface in order to revert what GPG does.

The output of GPG should be supressed with these options, but this is not the case.

¿Is this a bug in GPG?

The GPG I'm using with Mutt is the recommended in the doc:

### GPG config for Mutt ###
set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -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 --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_getkeys_command="gpg --recv-keys %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
### End ###

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnupg Edit question
Assignee:
No assignee Edit question
Solved by:
Ricardo
Solved:
Last query:
Last reply:
Revision history for this message
Daniel Leidert (dleidert-deactivatedaccount) said :
#1

What about using --no-tty?

Revision history for this message
Ricardo (jimenezrick) said :
#2

The problem persist. When a gpg does a key verification or an email is decrypted, gpg usually output some message which get merged with the ncurses mutt interface.

I tried with the next gnupg config in the .muttrc using "--no-tty":

### GPG section in the .muttrc ###
set pgp_decode_command="gpg --no-tty --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="gpg --no-tty --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --no-tty --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="gpg --no-tty --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-tty --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --no-tty --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --no-tty %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="gpg --no-tty --no-verbose --import %f"
set pgp_export_command="gpg --no-tty --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-tty --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-tty --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-tty --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_getkeys_command="gpg --recv-keys %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
### END ###

Revision history for this message
Michael Bienia (geser) said :
#3

Can you attach a screenshot please?

I use mutt with gpg myself and my settings look similar and I don't get any messages from gpg disturbing mutt.

Revision history for this message
Ricardo (jimenezrick) said :
#4

The attached screenshot is the Mutt email view afer openning a singned email.

Revision history for this message
Ricardo (jimenezrick) said :
#5

Another screenshot showing the index emails menu after showing the previous email.

Revision history for this message
Ricardo (jimenezrick) said :
#6

This thread seems dead.

Revision history for this message
Ricardo (jimenezrick) said :
#7

SOLVED:

The next line must be removed: set pgp_getkeys_command="gpg --recv-keys %r"

It has to be omitted or set to the default value: set pgp_getkeys_command=""