[offlineimap] password from mysql database (#175)

naveensharmayoung notifications at github.com
Tue Mar 17 21:54:32 GMT 2015


i am using mysql database to store password of gmail and getting it via function
python file 
def username():
   db = MySQLdb.connect(host="localhost", # your host, usually localhost
                     user="root", # your username
                      passwd="1555511", # your password
                      db="database") # name of the data base

# you must create a Cursor object. It will let
#  you execute all the queries you need
   cur = db.cursor()

# Use all the SQL you like
   cur.execute("select password from database)
   data = cur.fetchall()
   for row in data:
       fname = row[0]
# print all the first cell of all the rows
       return fname 
and my offlineimaprc files is 
[Repository Remote2]
type = IMAP
remotehost = imap.gmail.com
remoteuser = nk86 at gmail.com
remotepasseval = username()
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
maxconnections = 3

realdelete = no
but error in authentication how to correct this error

---
Reply to this email directly or view it on GitHub:
https://github.com/OfflineIMAP/offlineimap/issues/175
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20150317/2284b0f7/attachment.html>


More information about the OfflineIMAP-project mailing list