clawsmail-password-decrypter icon indicating copy to clipboard operation
clawsmail-password-decrypter copied to clipboard

decrypt SMTP passwords as well

Open lw-karo opened this issue 6 years ago • 0 comments

Claws-mail provides different settings for the imap (incoming) and smtp (outgoing) connections. This trivial patch for the python script decrypts the SMTP passwords as well.

diff --git a/clawsmail-passdecrypt.py b/clawsmail-passdecrypt.py
index f59223f..ee7c66b 100755
--- a/clawsmail-passdecrypt.py
+++ b/clawsmail-passdecrypt.py
@@ -82,6 +82,8 @@ def accountrc_decrypt(filename, key=PASSCRYPT_KEY, mode=DES.MODE_CFB):
 
             password = pass_decrypt(p.get(s, 'password'), key, mode=mode)
             print('password for %s, %s is "%s"' % (account, address, password))
+            smtp_password = pass_decrypt(p.get(s, 'smtp_password'), key, mode=mode)
+            print('SMTP password for %s, %s is "%s"' % (account, address, smtp_password))
         except Exception as e:
             print('Error resolving password for account "%s": %s' % (s, e))
 

lw-karo avatar Jul 09 '18 12:07 lw-karo