I use a script to decrypt my password for offlineimap, but somehow it's not working anymore ...
The file was encrypted with
gpg --symmetric password
For offlineimap I use this combination.
gpg --quiet --batch --no-tty --for-your-eyes-only --decrypt password.gpg
On Linux it's working like it should, but on FreeBSD I get the following error:
gpg --quiet --batch --no-tty --for-your-eyes-only --decrypt ~/.mail-accounts/xxxxxx/password.gpg
gpg: can't query passphrase in
batch mode gpg: decryption failed: bad key
Am I missing something?
gpg --version gpg (GnuPG) 1.4.19
---COPYRIGHT INFO ---
Home: ~/.gnupg Supported algorithms: Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2
I use the default gpg.conf without any changes.
It's not only working in offlineimap, also in my terminal and everywhere. ( on linux it's working)
Link to python file: https://github.com/tarruda/dot-files/blob/master/mail/offlineimap.py ( not me )
Same script found on stackexange. Encrypt OfflineIMAP Password
The call in offlineimap
remotepasseval = decrypt_password("[email protected]")
The idea behind is, that it's encrypted with "symmetric". When offlineimap is starting the python script an pinentry window opens and asks for the pw.
But the pinentry window isn't starting like on linux. On linux it is the same version only differ in Minor version.
In gpg 1.4.19 also the --batch option is available and has worked before, but i don't know what happens.