Menu

Possible problem with quotes in command line

2014-06-26
2014-06-26
  • Freek Dijkstra

    Freek Dijkstra - 2014-06-26

    I experience the following problem with Enigmail 1.6 (20131006-1849) with Thunderbird 24.6.0 on Mac OS X 10.9.3 as well as 10.7.5.

    When sending a signed message, I get an OpenPGP Alert: "Error - encryption command failed", and the mail is not send.

    When I try to send an email from the debug tab in the preference window, it gives an OpenPGP Alert: "OpenPGP is working properly. For details, check the Console available from the OpenPGP menu"

    Nevertheless, I don't see any email arriving at the given email address.

    For the record, I entered an email as-is. E.g. "myaccount@macfreek.nl" (without quotes).

    This console has the following text:

    EnigTest: START ********************************
    EnigTest: To: myaccount@macfreek.nl
    TEST MESSAGE 123
    TEST MESSAGE 345
    
    enigmail> /opt/local/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --comment "Using GnuPG with Thunderbird - http://www.enigmail.net/" -t --clearsign -u <myaccount@macfreek.nl> --passphrase-fd 0 --no-use-agent
    ************************************************
    EnigTest: SIGNING ONLY
    EnigTest: cipherText = 
    EnigTest: exitCode = 2
    ************************************************
    
    ************************************************
    EnigTest: VERIFICATION
    EnigTest: decryptedText = 
    EnigTest: exitCode  = 2
    EnigTest: signature = undefined
    ************************************************
    enigmail> /opt/local/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --comment "Using GnuPG with Thunderbird - http://www.enigmail.net/" -a -t --encrypt --sign -r <myaccount@macfreek.nl> -u <myaccount@macfreek.nl> --passphrase-fd 0 --no-use-agent
    ************************************************
    EnigTest: SIGNING + ENCRYPTION
    EnigTest: cipherText = 
    EnigTest: exitCode = 2
    ************************************************
    
    ************************************************
    EnigTest: DECRYPTION
    EnigTest: decryptedText = 
    EnigTest: exitCode  = 2
    EnigTest: signature = undefined
    ************************************************
    

    (in a futile attempt to stop spam, I replace my actual email address with 'myaccount')

    The 'exitCode = 2' prompted me to test these commands in the terminal:

    When doing so I get:

    ~% /opt/local/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --comment "Using GnuPG with Thunderbird - http://www.enigmail.net/" -a -t --encrypt --sign -r <myaccount@macfreek.nl> -u <myaccount@macfreek.nl> --passphrase-fd 0 --no-use-agent
    zsh: no such file or directory: myaccount@macfreek.nl
    

    On the other hand, the following works fine (note the quotations around the email address) (the ctrl-C interupt is mine, interupting the process waiting for input):

    ~% /opt/local/bin/gpg --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --comment "Using GnuPG with Thunderbird - http://www.enigmail.net/" -a -t --encrypt --sign -r "<myaccount@macfreek.nl>" -u "<myaccount@macfreek.nl>" --passphrase-fd 0 --no-use-agent
    ^C
    gpg: Interrupt caught ... exiting
    

    So it seems that the PGP command that Enigmail sends to the shell fails because it does not contains quotes around the email address.

    Is the above an configuration error on my part? Is it a known bug? Is there any way I remedy this so I can send signed mails again?

    Thanks for any suggestion!

    [Edit: obscured my real email address]

     

    Last edit: Freek Dijkstra 2014-06-26
  • Olav Seyfarth

    Olav Seyfarth - 2014-06-26

    Using email addresses without quotes should work fine. No known bugs here.

    The self-test looks good in the debug log.

    The error "no such file or directory" results from '<' and '>' being interpreted by the shell as input/output redirection. If you execute on the shell, you'll have to quote these, like '\<' and '>'. So the test you did seems not helpful to find the culprit.

    Right at the start you state, that "the mail is not send." Why is that? Is no mail saved in "Sent" and no dialogs/status line changes visible or just since no message appears "on the other end" (which could have many reasons)? However, "Error - encryption command failed" means that either GnuPG or Enigmail failed. Which may have many causes.

    Can you send encrypted messages to others? Try sending one to me: olav a enigmail d net

    Have you been able to encrypt using Enigmail before? What did you change?
    How many keys do you have that contain a UID containing the email address you are trying to send to?
    Would you mind trying the latest nighly build in case the offending stuff was fixed during the last 9 months?

     

Log in to post a comment.