-
1 Attachment(s)
Conky SSL Email Python Script
ArchLinux : Package support is present in the AUR. All my packages can be seen here: http://aur.archlinux.org/packages.php?SeB=m&K=kaivalagi
Ubuntu/Debian : All the script packages have now been copied into the Conky Companions PPA. Any package updates will be provided by the team through this new ppa. The ppa can be found here: https://launchpad.net/~conky-companions/+archive/ppa. To use this ppa first delete the old ppa files using this:
Code:
sudo rm /etc/apt/sources.list.d/m-buck* && sudo rm /etc/apt/sources.list.d/conkyhardcore*
Then follow the modified first post instructions for the scripts
Intro
This is a simple script to return the count of emails in an inbox, it supports SSL (secure) and standard connections to IMAP and POP3 services on the standard port numbers.
Currently a mail message count of unread emails is returned for IMAP accounts, for POP3 accounts I still need to figure out how I will provide this, currently the total email count is returned. POP3 is a very old and limited protocol, hence the issues.
There is a README with the install, I suggest you give it atleast a quick once over! It can be found in the installation folder, normally following the path of /usr/share/conky<scriptname>/
Basic Install
Method 1: Using apt
1) Add the repository to your OS install:
Code:
sudo add-apt-repository ppa:conky-companions/ppa
* Note if you are running 9.10 or below then refer to the PPA link at the end of this post for help on installing from the ppa, good guidance can be found on the launchpad site
2) Now that is done simply run the following to update your repo cache and install the script:
Code:
sudo apt-get update && sudo apt-get install conkyemail
Method 2: Using deb file
Run the .deb file available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages
Warning, this will not ensure you are kept up-to-date. Only method 1 will do that ;)
Method 3: Using tar.gz file
Extract all the contents of the tar.gz file to an appropriate folder, and edit the conkyEmail script to point to the correct location where conkyEmail.py is. The tar.gz file is available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages
Unless you are using a non-Debian based OS I don't suggest this. Users of Debian/Ubuntu flavour OS's should ideally use method 1.
Again will will not receive updates using this method. ONLY method 1 can do this for you ;) ;)
All further details on setup are orientated around the deb package based install, so may differ from what you choose your setup to be, if done using the tarball.
Usage Help
You can get the current help options at any time by running (change the path as necessary):
or
Code:
Usage: conkyEmail [options]
Options:
-h, --help show this help message and exit
-m SERVERTYPE, --servertype=SERVERTYPE
servertype to check [default: POP] The server type
options are POP or IMAP
-s SERVERNAME, --servername=SERVERNAME
server name to access [default: pop.mail.yahoo.co.uk]
The server name should be either a domain name or ip
address
-o NUMBER, --port=NUMBER
Define an alternative port number to use other than
the default for the protocol/ssl
-f FOLDER, --folder=FOLDER
[default: Inbox] IMAP folder to check, not applicable
for POP mail checks
-e, --ssl Use an SSL based connection.
-u USERNAME, --username=USERNAME
username to login with
-p PASSWORD, --password=PASSWORD
Password to login with, if not set the username is
used to fetch a 'conky' password from the keyring
-t FILE, --template=FILE
define a template file to generate output in one call.
A displayable item in the file is in the form
[--servertype=IMAP --ssl --servername=imap.gmail.com
--folder=Inbox --username=joebloggs
--password=letmein, --connectiontimeout=10]. Note that
the short forms of the options are not currently
supported! None of these options are applicable at
command line when used in templates.
-i NUMBER, --mailinfo=NUMBER
[default: 0] The number of newest emails to output
'from' and 'subject' information for. Not applicable
at command line when using templates.
-w NUMBER, --maxwidth=NUMBER
[default: 80] Define the number of characters to
output per line
-l NUMBER, --linelimit=NUMBER
[default: 0] If above zero this limits the number of
lines output for mail info
-q CHAR, --quote=CHAR
[default: "] The character to use for quotations
around the subject line
-c NUMBER, --connectiontimeout=NUMBER
[default: 10] Define the number of seconds before a
connection timeout can occur. Not applicable at
command line when using templates.
-v, --verbose request verbose output, not a good idea when running
through conky!
-V, --version Displays the version of the script.
--errorlogfile=FILE If a filepath is set, the script appends errors to the
filepath.
--infologfile=FILE If a filepath is set, the script appends info to the
filepath.
The important thing to note now is that the script is called using this in Conky:
Code:
{execi 1800 conkyEmail ...options...}
Rather than something like this as before:
Code:
{execi 1800 python /path/to/file/conkyEmail.py ...options...}
Development History
Development history going forwards can be seen here https://code.launchpad.net/~conky-companions/+junk/conkyemail
All packages available from me can be found here: https://launchpad.net/~conky-companions/+archive/ppa
-
Re: Conky SSL Email Python Script
Hi kaivalagi,
I never realized there was a problem with the POP3 stuff as I use:
Code:
${color1}Hay ${color4}${execi 60 python /home/my_name/Conky/scripts/mail/conkyEmail.py --servertype=POP --servername=pop3.my_isp.com --username=my_name --password=my_password} ${color1}E-mail$color
and my setup "deletes mail" from the server when I download it.
That works for me.
CHIMO!
Bruce
EDIT: Hey, I just realized, I have a gmail account as well and it's set to a POP3 account, I can use this there too. (I only want a number anyway).
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
Bruce M.
Hi kaivalagi,
I never realized there was a problem with the POP3 stuff as I use:
Code:
${color1}Hay ${color4}${execi 60 python /home/my_name/Conky/scripts/mail/conkyEmail.py --servertype=POP --servername=pop3.my_isp.com --username=my_name --password=my_password} ${color1}E-mail$color
and my setup "deletes mail" from the server when I download it.
That works for me.
CHIMO!
Bruce
EDIT: Hey, I just realized, I have a gmail account as well and it's set to a POP3 account, I can use this there too. (I only want a number anyway).
POP3 doesn't have an unread mail count feature, for that I'd need to keep track of all the emails to understand what is read and what is not, not easy outside of the main mail client used...POP3 is ancient really, outdated and should be disregarded as a protocol.
I recommend switching your gmail account to IMAP based rather then POP...it is more secure generally, and with SSL as well is the bee's knees :)
You can do this via the google mail settings online, and then it's a simple case of changes your account setting in thunderbird/evolution etc...
Your call though, just a recommendation...
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
kaivalagi
I recommend switching your gmail account to IMAP based rather then POP...it is more secure generally, and with SSL as well is the bee's knees :)
You can do this via the google mail settings online, and then it's a simple case of changes your account setting in thunderbird/evolution etc...
Your call though, just a recommendation...
Thanks K, I'll definately check that out. Don't have an option with my ISP though, I think they only provide POP3. However I will check that out as well.
Regardless, I never leave mails on my server, they are deleted when I download them.
CHIMO!
Bruce
-
Re: Conky SSL Email Python Script
Hey, I've been trying to get this to work with my uni and gmail but it always says there are 0 new. Both using IMAP and google is configured right.
-
Re: Conky SSL Email Python Script
Same thing here:( I use ivleph's script and it works great.
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
Hey, I've been trying to get this to work with my uni and gmail but it always says there are 0 new. Both using IMAP and google is configured right.
I'll take a look at some point soon, it used to work...? And nothing is changed ??
-
Re: Conky SSL Email Python Script
UPDATE
Fixed the issue with IMAP counts not working properly, grab the tarball from this post.
I switched to using the "UNSEEN" IMAP search filter instead of "RECENT", recent no longer works as desired?
OPTIONAL
I have updated the first post, as conkyEmail is now available from my personal package archive at launchpad. If you install it this way you'll get any updates with minimal fuss...
Just bear in mind you'll need to change the conky calls from:
Code:
${execi 1800 python /path/to/script conkyEmail.py ...options...}
to:
Code:
${execi 1800 conkyEmail ...options...}
More extensive details to come shortly...
-
Re: Conky SSL Email Python Script
Thank you, it works great now!
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
Thank you, it works great now!
Did you use the new apt based install?
It's working well for conkyForecast...:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
kaivalagi
Did you use the new apt based install?
It's working well for conkyForecast...:)
I would but I'm using arch.
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
I would but I'm using arch.
Sorry, didn't occur to me :lolflag:
If I forget to update attachments at any point, you can download the latest tarball from my launchpad account page here: https://launchpad.net/~m-buck/+archive
-
Re: Conky SSL Email Python Script
Thanks kaivalagi. This time it works like a charm:) May I know whether your scripts can display 4 latest message or not.
I would like to do something like this:
Gmail: x new.
1. From:Subject
2.
3.
4.
Yahoo: x new.
1. From:Subject
2.
3.
4.
Hope I'm not asking too much:) Thanks again
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Thanks kaivalagi. This time it works like a charm:) May I know whether your scripts can display 4 latest message or not.
I would like to do something like this:
Gmail: x new.
1. From:Subject
2.
3.
4.
Yahoo: x new.
1. From:Subject
2.
3.
4.
Hope I'm not asking too much:) Thanks again
Not currently supported, although the python libraries I used can get hold of that detail. I'll have a look at some point to see how tricky it might be.
I'm assuming you'd want the top 4 (could be any number) ordered by newest first?
The tricky thing is making it happen without going back and forth to the mail server on each script call...Interesting challenge I think :)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
I would but I'm using arch.
OFF TOPIC...
Just curious here Purpose of Reason but were you using arch when you were helping me with conky back in Dec of last year?
And just so people know, PoR is one of my mentors.
Back on Topic...
Nice idea - From:Subject.
Won't play will with someone who is controlling spacing though.
Code:
Ubuntu Forums: Reply to thread '[all variants] Conky SSL Email Python Script'
Heather: Old Age
Tom Smith: Hello
For me, the number of new mails is just fine. :)
I'd say K.I.S.S. it. But those who have seen my conky know the K.I.S.S. principle was not applied. :lolflag:
Have a nice day.
Bruce
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
Bruce M.
Nice idea - From:Subject.
Won't play will with someone who is controlling spacing though.
Code:
Ubuntu Forums: Reply to thread '[all variants] Conky SSL Email Python Script'
Heather: Old Age
Tom Smith: Hello
For me, the number of new mails is just fine. :)
I'd say
K.I.S.S. it. But those who have seen my conky
know the
K.I.S.S. principle was not applied. :lolflag:
Have a nice day.
Bruce
I have the "from" and "subject" output working now for IMAP, but like you've said it will be a problem to keep data aligned nicely (we need html tables in conky!)
The only way I can see this sort of working is if the template option is scrubbed and separate exec calls are needed for each mailbox.
The reason being 2 fold:
- Currently having the possibility of mailbox counts along the same output line (based on a template) means that any multiple line output for extra info will mess the layout up well and truly
- An alternative template for "from" and "subject" layout would be troublesome for multiple messages and for the spacing of "from" and "subject" data, if on the same line, due to lengths differing.
The question is, how many people need to retrieve data for more than one mailbox, if only a few exist (like me) can they make do with multiple calls (I can)
I am planning on providing 2 new options, an --accountname=Yahoo option, and a --mailinfo=3 option for the amount of detailed output. If mailinfo if not set or set to zero, current functionality will remain and only count info is returned. Only when you provide a positive mailinfo number will the script then start piecing together info for output, probably in multi-line format like this:
<accountname> <count>
From: <from> Subject: <subject>
From: <from> Subject: <subject>
From: <from> Subject: <subject>
So...what's the consensus? I can do this and the only side effect for keeping current functionality will be the requirement for multiple exec calls for multiple mailboxes...
Edit: current output is this:
GMail: 3 New
From: Sainimere Tala <xxxxxxx@xxxxxxx.com> Subject: RE: Amori's pics
From: Admin <xxxxx@xxxxxxxxx.com> Subject: Request
From: "Mark Buck" <xxxxxxxxxxxxxxxxx@yahoo.com.au> Subject: test
or with --mailinfo not set:
3
-
1 Attachment(s)
Re: Conky SSL Email Python Script
TESTING
I've got the --mailinfo option working for both pop and imap, and have left the template functions in place.
Any --mailinfo option in a template is ignored, so the mailinfo option can only be used in command arguments in exec calls.
I've attached the script here...remember to run the script with --help option to get details...
Let me know what you think, if all is okay then I'll publish it through my personal project archive for apt updates...
The changes shouldn't affect your current use of the script :) Please check....
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Wow! You're as quick as Superman!:)I have tested your scripts but maybe because I do not know how to use --help, the result is a bit awkward. Anyway, it turn out more a less as expected. Congratulation! and Thanks:)
As you can see from my screenshot, the red circle is the result if I use ivleph script and the blue one is from yours. I am just curious why imap.googlemail.com is displayed. Besides, do I have option to display:
"Mark Buck":test
instead of
From: "Mark Buck" <xxxxxxxxxxxxxxxxx@yahoo.com.au> Subject: test
In other word can I get the similar result as if I use ivleph. Sorry for being too demanding but I just want to use only one script to handle my email instead of two as for now. Btw, your scripts is well maintained!:)
Code:
${color 00bfff}Email${color blue}${hr 0}$color
${color aeaeae}Gmail: ${color red}${texeci 60 perl ~/.scripts/conkyGmail.pl n} new.$alignr${color aeaeae}Yahoo: ${color red}${execi 60 python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx --password=xxx --ssl} new.
${color #696969}${texeci 60 perl ~/.scripts/conkyGmail.pl s}
${color aeaeae}GMail: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=IMAP --servername=imap.googlemail.com --username=xxx --password=xxx --ssl --mailinfo=3 }
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Wow! You're as quick as Superman!:)I have tested your scripts but maybe because I do not know how to use --help, the result is a bit awkward. Anyway, it turn out more a less as expected. Congratulation! and Thanks:)
As you can see from my screenshot, the red circle is the result if I use ivleph script and the blue one is from yours. I am just curious why imap.googlemail.com is displayed. Besides, do I have option to display:
"Mark Buck":test
instead of
From: "Mark Buck" <xxxxxxxxxxxxxxxxx@yahoo.com.au> Subject: test
In other word can I get the similar result as if I use ivleph. Sorry for being too demanding but I just want to use only one script to handle my email instead of two as for now. Btw, your scripts is well maintained!:)
Code:
${color 00bfff}Email${color blue}${hr 0}$color
${color aeaeae}Gmail: ${color red}${texeci 60 perl ~/.scripts/conkyGmail.pl n} new.$alignr${color aeaeae}Yahoo: ${color red}${execi 60 python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx --password=xxx --ssl} new.
${color #696969}${texeci 60 perl ~/.scripts/conkyGmail.pl s}
${color aeaeae}GMail: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=IMAP --servername=imap.googlemail.com --username=xxx --password=xxx --ssl --mailinfo=3 }
Try attached
Do we really need the number output for each email? I would sooner lose it to save space in conky...it's just a something you're used to right?
you can set --mailinfo to be how ever many extra lines of info you want, if set to 5 but you have 3 new mails it will only use the space required for the 3 etc...
If this is how you want it then you can use this script for all your mailboxes....it works for ssl/non-ssl pop and imap
Everyone else, can you let me know you're okay with this change, i.e. it doesn't change what the script does for you...
-
Re: Conky SSL Email Python Script
Thanks Kaivalagi:) Exactly as I want (hope not sound too selfish:)). Now I will delete the other script confidently. Thanks again.
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Hello,
After testing the script, I found a glitch/bug (don't know what exactly). See attachment at the red circle regarding my Gmail account. I sent test email from Yahoo account with the same subject (Test conkyEmail.py). But as as you can see conky do not display it correctly. As for Yahoo, it is ok:)
For the Yahoo account, is your script read any email in Inbox or just the "New" one?
Edit:
One more thing, if I already read the email in Gmail, conky will display "Gmail: ?" instead of "Gmail=0". Yahoo account is ok (Yahoo=0)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Hello,
After testing the script, I found a glitch/bug (don't know what exactly). See attachment at the red circle regarding my Gmail account. I sent test email from Yahoo account with the same subject (Test conkyEmail.py). But as as you can see conky do not display it correctly. As for Yahoo, it is ok:)
For the Yahoo account, is your script read any email in Inbox or just the "New" one?
Edit:
One more thing, if I already read the email in Gmail, conky will display "Gmail: ?" instead of "Gmail=0". Yahoo account is ok (Yahoo=0)
Yep, I found those myself just now, I'm on it.
The ? is because the script isn't handling noting coming back for imap anymore (too much cut/paste)- easy fix.
The other issue is because I go looking for the keyword From and Subject, no all email data is the same....I might need to use regex instead of simple find and replace :)
Bear with me...
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Hi kaivalagi, found another bug. Please refer attachment. For Gmail, only one email got displayed even tho there are 2 new emails.
Edit:
I just receive another email but same problem occur. Seem like only one email being displayed.
-
1 Attachment(s)
Re: Conky SSL Email Python Script
wariskampar,
New version attached, I have tried it with a couple of email providers and it seems okay with all...
Better for you too? *fingers crossed*
P.S.--mailinfo=2 to see 2 email from and subject lines
Cheers
-
Re: Conky SSL Email Python Script
It works great (so far)!. I keep opening my Hotmail account to get a reply from you. Hehe. It makes me thing it is better to be able to monitor Hotmail within my Conky as well. Just wonder if this great script support Hotmail as well. Thanks again kaivalagi:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
It works great (so far)!. I keep opening my Hotmail account to get a reply from you. Hehe. It makes me thing it is better to be able to monitor Hotmail within my Conky as well. Just wonder if this great script support Hotmail as well. Thanks again kaivalagi:)
No chance for the foreseeable, Hotmail interfacing is not worth the hassle....maybe I'll take a look if I get bored and have no other scripts to work on :)
I've tested with and without the mailinfo option and am happy, so I'll update the apt based package soon too....
Edit: package uploaded, should be available within the next hour, First post also updated with the files.
-
Re: Conky SSL Email Python Script
Hi kaivalagi, conky do not display correct Yahoo info this morning. I got 2 new mails but that do not reflect in conky. Something must break somewhere along the way.
Gmail: 0
Yahoo:
Edit:
Maybe, this problem is not with your script at all. When I try to access Yahoo online, I get this message
Sorry, Forbidden.
You don't have permission to access this URL on this server.
Please check the URL for proper spelling and capitalization. If you're having trouble locating a destination on Yahoo!, try visiting the Yahoo! home page or look through a list of Yahoo!'s online services. Also, you may find what you're looking for if you try searching below.
I know I get new mail from Evolution. Will keep you informed then
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Hi kaivalagi, conky do not display correct Yahoo info this morning. I got 2 new mails but that do not reflect in conky. Something must break somewhere along the way.
Gmail: 0
Yahoo:
Edit:
Maybe, this problem is not with your script at all. When I try to access Yahoo online, I get this message
Sorry, Forbidden.
You don't have permission to access this URL on this server.
Please check the URL for proper spelling and capitalization. If you're having trouble locating a destination on Yahoo!, try visiting the Yahoo! home page or look through a list of Yahoo!'s online services. Also, you may find what you're looking for if you try searching below.
I know I get new mail from Evolution. Will keep you informed then
Would be nice if it displayed a ? rather than nothing...I'll take a look at some point
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Hi kaivalagi, conky do not display correct Yahoo info this morning. I got 2 new mails but that do not reflect in conky. Something must break somewhere along the way.
Gmail: 0
Yahoo:
Edit:
Maybe, this problem is not with your script at all. When I try to access Yahoo online, I get this message
Sorry, Forbidden.
You don't have permission to access this URL on this server.
Please check the URL for proper spelling and capitalization. If you're having trouble locating a destination on Yahoo!, try visiting the Yahoo! home page or look through a list of Yahoo!'s online services. Also, you may find what you're looking for if you try searching below.
I know I get new mail from Evolution. Will keep you informed then
Well I found an alternative problem with yahoo, they are breaking the rules with their email data structure and not presenting dates in the correct rfc format...so I've updated the script to cope. The script uses the dates to order the mailinfo list in the correct order
See 1.04 in first post or update from apt when available (currently building)
Cheers
-
Re: Conky SSL Email Python Script
Do you mean the script was updated. When I replace conkyEmail.py with the new one, Yahoo problem persist (Yahoo= ). I use Method 3 to install so I have to update it manually.
You're absolutely right. better to display Yahoo=? or Yahoo=Server Down to indicate such condition.
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Do you mean the script was updated. When I replace conkyEmail.py with the new one, Yahoo problem persist (Yahoo= ). I use Method 3 to install so I have to update it manually.
You're absolutely right. better to display Yahoo=? or Yahoo=Server Down to indicate such condition.
The problem you raised is not happening with me, although if you're using the --ssl option you could have problems, yahoo ssl is up and down like a yoyo at the moment.
Try running the conkyEmail exec on the command line with an addition --verbose option to where the problem might be occurring...
-
Re: Conky SSL Email Python Script
This may sound stupid, can I ignore --ssl in my code? Btw, here is my current code:
Code:
${color aeaeae}GMail: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=IMAP --servername=imap.googlemail.com --username=xxx --password=xxx --ssl --mailinfo=4 }
${color aeaeae}Yahoo: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx --password=xxx --ssl --mailinfo=4 }
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
This may sound stupid, can I ignore --ssl in my code? Btw, here is my current code:
Code:
${color aeaeae}GMail: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=IMAP --servername=imap.googlemail.com --username=xxx --password=xxx --ssl --mailinfo=4 }
${color aeaeae}Yahoo: ${color1}${execi 60 python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx --password=xxx --ssl --mailinfo=4 }
the --ssl option is just that, an option. It's best to use it if supported, and I have been with yahoo pop for some time. Just recently it started playing up...yahoo does it again!
lose the --ssl on your yahoo account and see if that sorts the issue out
keep the ssl on the imap google stuff, that will work just fine
-
Re: Conky SSL Email Python Script
Still no luck. I really think Yahoo is the culprit. I still can not access my account online. Same damn error message:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Still no luck. I really think Yahoo is the culprit. I still can not access my account online. Same damn error message:)
Run this in a terminal session with your correct username and password, to see whats going on...
Code:
python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx --password=xxx --ssl --mailinfo=4 --verbose
Off for a bit, I'll catch up later
-
Re: Conky SSL Email Python Script
I'm so dump earlier I tried this code but with execi at the front:lolflag: Here is the result
=4 --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.com
ssl: True
username: xxx
password: xxx
mailinfo: 4
verbose: True
*** INFO: Logging on to POP server: pop.mail.yahoo.com
*** INFO: Getting message count from POP server: pop.mail.yahoo.com
*** INFO: Extracting message data from POP server: pop.mail.yahoo.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from POP server: pop.mail.yahoo.com
*** ERROR:getOutputText:Unexpected error: <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/home/aznan/.scripts/conkyEmail.py", line 412, in <module>
email.outputData()
File "/home/aznan/.scripts/conkyEmail.py", line 392, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
Yahoo is accessible but ERROR at getOutputText. What does it mean?
Edit:
Yahoo has back to normal a few minute ago. So, there is nothing wrong with your script (improvement is always welcome though:))
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
I'm so dump earlier I tried this code but with execi at the front:lolflag: Here is the result
=4 --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.com
ssl: True
username: xxx
password: xxx
mailinfo: 4
verbose: True
*** INFO: Logging on to POP server: pop.mail.yahoo.com
*** INFO: Getting message count from POP server: pop.mail.yahoo.com
*** INFO: Extracting message data from POP server: pop.mail.yahoo.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from POP server: pop.mail.yahoo.com
*** ERROR:getOutputText:Unexpected error: <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/home/aznan/.scripts/conkyEmail.py", line 412, in <module>
email.outputData()
File "/home/aznan/.scripts/conkyEmail.py", line 392, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
Yahoo is accessible but ERROR at getOutputText. What does it mean?
Edit:
Yahoo has back to normal a few minute ago. So, there is nothing wrong with your script (improvement is always welcome though:))
I'll see what I can do about the output and error messages for this...maybe a nice message saying "**** ERROR: Failed to communication with the server" would do here...along with a ? for output...one day the script will be perfect, just not today ;)
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Hi kaivalagi, find another bug today. I set --mailinfo=4 but Conky do not display 4 emails as it suppose to do. Please refer attachment
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Hi kaivalagi, find another bug today. I set --mailinfo=4 but Conky do not display 4 emails as it suppose to do. Please refer attachment
Something went wrong :) Because the script uses the raw email data so it can handle all email accounts and not just gmail, it is a little more "at risk" with varying email data.
If it's not too late can you run the same with --verbose as an option in the terminal and post the output please (minus your email account details naturally).
I might have a look tonight but am rather busy over the next few days so I can't promise anything...
Cheers
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Here is the test result:
Code:
aznan@aznan-laptop:~$ python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx--password=xxx --ssl --mailinfo=4 --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.com
ssl: True
username: xxx
password: xxx
mailinfo: 4
verbose: True
*** INFO: Logging on to POP server: pop.mail.yahoo.com
*** INFO: Getting message count from POP server: pop.mail.yahoo.com
*** INFO: Extracting message data from POP server: pop.mail.yahoo.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from POP server: pop.mail.yahoo.com
6 New
1. Corel: "Corel Special Offer: save $70 on world's No. 1 playback software"
2. DonationCoder.com Newsletter: "DC Newsletter for August 28, 2008 - Codename "Dizzying Discounts"
3. The Code Project: "[CodeProject] Daily News - Google introduces Android apps store"
4. lilyy: "[masdutch] JUst for reading time : 10 Great Goals to set for this Ramadan"
Please compare this result with the attachment. Something is wrong right:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Here is the test result:
Code:
aznan@aznan-laptop:~$ python ~/.scripts/conkyEmail.py --servertype=POP --servername=pop.mail.yahoo.com --username=xxx--password=xxx --ssl --mailinfo=4 --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.com
ssl: True
username: xxx
password: xxx
mailinfo: 4
verbose: True
*** INFO: Logging on to POP server: pop.mail.yahoo.com
*** INFO: Getting message count from POP server: pop.mail.yahoo.com
*** INFO: Extracting message data from POP server: pop.mail.yahoo.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from POP server: pop.mail.yahoo.com
6 New
1. Corel: "Corel Special Offer: save $70 on world's No. 1 playback software"
2. DonationCoder.com Newsletter: "DC Newsletter for August 28, 2008 - Codename "Dizzying Discounts"
3. The Code Project: "[CodeProject] Daily News - Google introduces Android apps store"
4. lilyy: "[masdutch] JUst for reading time : 10 Great Goals to set for this Ramadan"
Please compare this result with the attachment. Something is wrong right:)
Are you sure --mailinfo is not 2 in your conkyrc :)
Do me a favour and create a new conkyrc with just the one account conkyEmail call to see whether you get all 4 lines then...
I just found another interesting issue, some subject lines are encoded for various charsets, I am now trying to handle all possibilities with the mail decode_header function...not straight forward...without this you can get subjects like this:
Code:
=?iso-8859-1?Q?Fr=E5nvaro=2C_autosvar:_Join_my_network_on_LinkedIn?=
Fun...
-
Re: Conky SSL Email Python Script
I C&P the code from the conkyrc so I'm sure I set --mailinfo=4. I'll try to run conkyEmail with only one account call. Will post the result then:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
I C&P the code from the conkyrc so I'm sure I set --mailinfo=4. I'll try to run conkyEmail with only one account call. Will post the result then:)
Any news? I am confused about this one!
-
Re: Conky SSL Email Python Script
UPDATE
- Added header decoding for sender and subject, to handle multiple character sets used.
If you receive emails with special characters as used in a lot of languages other than English, this will return decent output for from and subject text.
First post updated :)
-
Re: Conky SSL Email Python Script
Since the development of this script is 'damn' fast, I have to use Apt method than updating conkyEmail.py manually(at last):)
Anyway, my previous problem still persist (--mailinfo=4 but display max 3 emails). Perhaps I should try --mailinfo=5 to get 4 lines because when running --verbose, the result was correct. Anyway, don't worry kaivalagi. I'm more than happy right now. Please do not stop undating this script:)
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
wariskampar
Since the development of this script is 'damn' fast, I have to use Apt method than updating conkyEmail.py manually(at last):)
Anyway, my previous problem still persist (--mailinfo=4 but display max 3 emails). Perhaps I should try --mailinfo=5 to get 4 lines because when running --verbose, the result was correct. Anyway, don't worry kaivalagi. I'm more than happy right now. Please do not stop undating this script:)
No chance of a halt to changes, they never seem to stop being required, even if it's just me requiring them for now :)
I can't figure the mailinfo list issue out, I don't have the problem with either IMAP or POP based output...I'll investigate further...soon
-
Re: Conky SSL Email Python Script
ok I must admit that I have not played around with this script before tonight. On that note, I need some help. When trying to run the script from a CLI I get this: (uname and password stripped out of course )
Code:
conkyEmail --servertype=POP --servername=pop.gmail.com --username=xxx --password=xxx -v --ssl
*** INITIAL OPTIONS:
servertype: POP
servername: pop.gmail.com
ssl: True
username: XXXXXXXX
password: XXXXXXXX
mailinfo: 0
verbose: True
*** INFO: Logging on to POP server: pop.gmail.com
*** ERROR:getPOPEmailData:Unexpected error: <class 'poplib.error_proto'>
?
Anyone know what I am doing wrong? Latest ver installed from the PPA
Thanks,
Hippy
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
ok I must admit that I have not played around with this script before tonight. On that note, I need some help. When trying to run the script from a CLI I get this: (uname and password stripped out of course )
Code:
conkyEmail --servertype=POP --servername=pop.gmail.com --username=xxx --password=xxx -v --ssl
*** INITIAL OPTIONS:
servertype: POP
servername: pop.gmail.com
ssl: True
username: XXXXXXXX
password: XXXXXXXX
mailinfo: 0
verbose: True
*** INFO: Logging on to POP server: pop.gmail.com
*** ERROR:getPOPEmailData:Unexpected error: <class 'poplib.error_proto'>
?
Anyone know what I am doing wrong? Latest ver installed from the PPA
Thanks,
Hippy
It should be straight forward
Could your gmail account be setup for IMAP (account settings online)?
I am using IMAP for gmail and POP for yahoo...both working
Can you run it with --verbose, and post back the results, it might highlight what is wrong, but by the looks of it there is a protocol error when trying to use POP with your gmail account.
I'd check your gmail account settings first off
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
ok I must admit that I have not played around with this script before tonight. On that note, I need some help. When trying to run the script from a CLI I get this: (uname and password stripped out of course )
Well, first off I think you need your uname and password in there!
OHHHHHHHH!!!!! ... just for here. OK, I get it.
Quote:
Originally Posted by
HippyRandall
Code:
conkyEmail --servertype=POP --servername=pop.gmail.com --username=xxx --password=xxx -v --ssl
*** INITIAL OPTIONS:
servertype: POP
servername: pop.gmail.com
ssl: True
username: XXXXXXXX
password: XXXXXXXX
mailinfo: 0
verbose: True
*** INFO: Logging on to POP server: pop.gmail.com
*** ERROR:getPOPEmailData:Unexpected error: <class 'poplib.error_proto'>
?
Anyone know what I am doing wrong? Latest ver installed from the PPA
Thanks,
Hippy
Can't help Hippy, I don't use gmail.com although I do have an account.
Maybe I should set it up.
Hmmmmmmmmm, Destroyer project for the day.
Check out what K said.
CHIMO!
Bruce
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
kaivalagi
It should be straight forward
Could your gmail account be setup for IMAP (account settings online)?
I am using IMAP for gmail and POP for yahoo...both working
Can you run it with --verbose, and post back the results, it might highlight what is wrong, but by the looks of it there is a protocol error when trying to use POP with your gmail account.
I'd check your gmail account settings first off
Just woke up but I managed to get gmail working with IMAP but still can't get POP working with my ISP email. Will investigate further after more caffeine and nicotine.
Oh and that output was with the --verbose option.
Hippy
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
Just woke up but I managed to get gmail working with IMAP but still can't get POP working with my ISP email. Will investigate further after more caffeine and nicotine.
Oh and that output was with the --verbose option.
Hippy
Doh, of course the --verbose option was used :)
It might be that SSL isn't supported? try POP without --ssl
To be honest though you are better off with IMAP, it is a superior protocol for emails...
IMAP also works better with the script...if for example you keep files on the server in your mail clients POP server settings, you'll get the count including those, IMAP however knows the difference between seen and unseen items so whatever your mail clients settings it will work fine reporting the correct number of new emails.
-
Re: Conky SSL Email Python Script
ok it is now working with my POP restricted ISP.
New problem: using the --mailinfo=4 option on my IMAP enabled gmail I get this:
Code:
*** INFO: Searching for new mail on IMAP server: imap.gmail.com
*** INFO: Extracting message data for IMAP server: imap.gmail.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** ERROR:getEmailData:Unexpected error: <type 'exceptions.ValueError'>
*** INFO: Logging of from IMAP server: imap.gmail.com
2 New
1. Freewebs.com: "September Update -- New Templates, Links and Home Page"
Notice the "2 New" but it is only returning the subject of the first one. I don't think I will be using this option in a conky environment but still curious why it's not returning both new messages.
Hippy
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
Notice the "2 New" but it is only returning the subject of the first one. I don't think I will be using this option in a conky environment but still curious why it's not returning both new messages.
Hippy
Not enough caffeine and or nicotine maybe?
I'll drink one and smoke one here for ya, to give it an extra jolt.
What do I know, I don't leave mail on the server (never have) and I only collect the # of mails.
Works like a charm. \\:D/
CHIMO!
Bruce
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
ok it is now working with my POP restricted ISP.
New problem: using the --mailinfo=4 option on my IMAP enabled gmail I get this:
Code:
*** INFO: Searching for new mail on IMAP server: imap.gmail.com
*** INFO: Extracting message data for IMAP server: imap.gmail.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** ERROR:getEmailData:Unexpected error: <type 'exceptions.ValueError'>
*** INFO: Logging of from IMAP server: imap.gmail.com
2 New
1. Freewebs.com: "September Update -- New Templates, Links and Home Page"
Notice the "2 New" but it is only returning the subject of the first one. I don't think I will be using this option in a conky environment but still curious why it's not returning both new messages.
Hippy
It's the second from or subject line I think...could you debug it? if so put a breakpoint into the getEmailData function and walk through the function...also if not personal can you forward the email to me?
The script does a bunch of stuff with the header records in an email, decoding them to display accented characters etc...
-
Re: Conky SSL Email Python Script
The second undisplayed email was just a test email that I sent myself from another account on netzero.
I am not the programmer here so I would need some help on stepping through the code etc. My Eclipse know how has been failing me lately :(
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
The second undisplayed email was just a test email that I sent myself from another account on netzero.
I am not the programmer here so I would need some help on stepping through the code etc. My Eclipse know how has been failing me lately :(
In that case could you sent an equivalent test email to my googlemail account? I can test from here then :)
-
1 Attachment(s)
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
The second undisplayed email was just a test email that I sent myself from another account on netzero.
I am not the programmer here so I would need some help on stepping through the code etc. My Eclipse know how has been failing me lately :(
Can you give the attached py script a try instead, I replaced the regex function to cope with varying timezone time info...
Every mail server treats email message data slightly differently, nothing like standards aye!
-
Re: Conky SSL Email Python Script
*** INFO: Logging on to IMAP server: imap.gmail.com
*** INFO: Searching for new mail on IMAP server: imap.gmail.com
*** INFO: Extracting message data for IMAP server: imap.gmail.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from IMAP server: imap.gmail.com
3 New
1. Rick: "test2 another attempt at the conky script"
2. Rick: "test3 yet another attempt at conky email script"
3. Rick: "test4 yet another attempt at conky email script"
damnit now everyone knows my real name ](*,):frown:
it now works properly. I have not looked at the code or the differences between this one you posted and the already installed version but whatever you did...:KS:popcorn:
Hippy
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
*** INFO: Logging on to IMAP server: imap.gmail.com
*** INFO: Searching for new mail on IMAP server: imap.gmail.com
*** INFO: Extracting message data for IMAP server: imap.gmail.com
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from IMAP server: imap.gmail.com
3 New
1. Rick: "test2 another attempt at the conky script"
2. Rick: "test3 yet another attempt at conky email script"
3. Rick: "test4 yet another attempt at conky email script"
damnit now everyone knows my real name ](*,):frown:
it now works properly. I have not looked at the code or the differences between this one you posted and the already installed version but whatever you did...:KS:popcorn:
Hippy
Thanks Rick!
I'll get the update out tonight at some point...
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
kaivalagi
Thanks Rick!
:confused: who? no one here by that moniker
-
Re: Conky SSL Email Python Script
UPDATE
Updated the script to handle mailinfo functionality better, it should now cope with all email message data possible.
The first post has been updated and the apt package is available
Cheers
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
HippyRandall
1. Rick: "test2 another attempt at the conky script"
2. Rick: "test3 yet another attempt at conky email script"
3. Rick: "test4 yet another attempt at conky email script"
damnit now everyone knows my real name ](*,):frown:
Hippy
Would that be Rick Hippy or Hippy Rick?
CHIMO!
Bruce M.
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
kaivalagi
UPDATE
Updated the script to handle mailinfo functionality better, it should now cope with all email message data possible.
The first post has been updated and the apt package is available
Cheers
Thanks hippi and kavailagi. Hippi for reporting the bug in a very professional ways until kaivalagi can solve it. I should learn how to do the testing. Now, the similar problem that I've been reporting to kaivalagi is solved! After the update, all 4 emails are displayed correctly (and elegantly!):)
-
Re: Conky SSL Email Python Script
This could be related to my uni's server...
When i call the script w/ mailinfo, it reports address, subject.
When i call again, all messages are marked as read.
Code:
# conkyEmail --servertype=IMAP --servername=imap.uni.edu -username=xxx --password=xxx -v --mailinfo=2
*** INITIAL OPTIONS:
servertype: IMAP
servername: imap.uni.edu
ssl: False
username: xxx
password: xxx
mailinfo: 2
verbose: True
*** INFO: Logging on to IMAP server: imap.pitt.edu
*** INFO: Searching for new mail on IMAP server: imap.pitt.edu
*** INFO: Extracting message data for IMAP server: imap.pitt.edu
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Processing email data to determine 'From', 'Subject' and 'Received Date'
*** INFO: Logging of from IMAP server: imap.pitt.edu
2 New
1. addres1@xxx "RE: subj1"
2. None: "subj2"
then when i reissue the command all my has been marked as read -->
*** INITIAL OPTIONS:
servertype: IMAP
servername: imap.uni.edu
ssl: False
username: xxx
password: xxx
mailinfo: 2
verbose: True
*** INFO: Logging on to IMAP server: imap.pitt.edu
*** INFO: Searching for new mail on IMAP server: imap.pitt.edu
*** INFO: Logging of from IMAP server: imap.pitt.edu
0
I had thunderbird open when i made theses calls
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
lessfield
This could be related to my uni's server...
When i call the script w/ mailinfo, it reports address, subject.
When i call again, all messages are marked as read.
I had thunderbird open when i made theses calls
That is strange! When checking emails with the IMAP protocol it should not mark the messages as read...
Have you tried it in the same way with other email accounts such as gmail etc...I wonder whether you get the same result, if you do then it would indicate it relates to the script/thunderbird/your setup...if not then it will be down to your uni imap server.
Is it possible for you to test this out please?
I too run thunderbird whilst conky checks my emails, and all is fine. I just tested it by running conky/killing it and doing that several times...the email notifications stay there...
Once I have a clear picture of what is going on, if it will help I'll delve into the IMAP library code and try and figure it out...
-
Re: Conky SSL Email Python Script
I'm trying the new version with arch and get this output.
Code:
[reasons // ~] ~/.scripts/conkyEmail --template=/home/shawn/.scripts/conkyEmail.template
Traceback (most recent call last):
File "/home/shawn/.scripts/conkyEmail.py", line 421, in <module>
email.outputData()
File "/home/shawn/.scripts/conkyEmail.py", line 402, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
[reasons // ~]
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
I'm trying the new version with arch and get this output.
Code:
[reasons // ~] ~/.scripts/conkyEmail --template=/home/shawn/.scripts/conkyEmail.template
Traceback (most recent call last):
File "/home/shawn/.scripts/conkyEmail.py", line 421, in <module>
email.outputData()
File "/home/shawn/.scripts/conkyEmail.py", line 402, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
[reasons // ~]
Can you run this and post back the results (minus any sensitive info of course...)
Code:
~/.scripts/conkyEmail --template=/home/shawn/.scripts/conkyEmail.template --verbose
Looks like at the very least the script needs for more validation and error messaging added :)
-
Re: Conky SSL Email Python Script
Code:
template --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.co.uk
ssl: False
username: None
password: None
mailinfo: 0
verbose: True
*** ERROR:getOutputTextFromTemplate:Unexpected error: <type 'exceptions.NameError'>
Traceback (most recent call last):
File "/home/shawn/.scripts/conkyEmail.py", line 421, in <module>
email.outputData()
File "/home/shawn/.scripts/conkyEmail.py", line 402, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
I don't think its reading the template.
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
PurposeOfReason
Code:
template --verbose
*** INITIAL OPTIONS:
servertype: POP
servername: pop.mail.yahoo.co.uk
ssl: False
username: None
password: None
mailinfo: 0
verbose: True
*** ERROR:getOutputTextFromTemplate:Unexpected error: <type 'exceptions.NameError'>
Traceback (most recent call last):
File "/home/shawn/.scripts/conkyEmail.py", line 421, in <module>
email.outputData()
File "/home/shawn/.scripts/conkyEmail.py", line 402, in outputData
print output.encode("utf-8")
AttributeError: 'NoneType' object has no attribute 'encode'
I don't think its reading the template.
Found the bug, I'll be releasing it soon, I'll update when done :)
-
Re: Conky SSL Email Python Script
UPDATE
Fixed a bug in the template functionality and also did a few other things, changes below:
- Updated error and info handling and logging
- Fixed bug with template based output
- Added --version option to output version of script and exit
The first post has been updated and the apt package is available
Cheers
-
Re: Conky SSL Email Python Script
sorry was away will test asap
ps great work on this thread and script!
-
Re: Conky SSL Email Python Script
After marking some old uni-messages as unread via thunderbird and running conkyEmail w/
--servertype=IMAP --servername=imap.uni.edu --username=xx --password=xx --mailinfo=3
and a stout of:
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
also a conky diplayed
1 New
1. my_sender: "my_subjet"
then i closed thunderbird, killed and restarted conky and i got
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
w/ conky displaying
8 New
1. my_sender1: "my_subjet1"
2. my_sender2: "my_subjet2"
3. my_sender3: "my_subjet3"
after refreshing thunderbird all messages were marked as read
this issue does not happen when i use a gmail account.
my yahoo account is spews some [AUTH] invalid user/password garbage. I tried to set yahoo in 'classic' and 'new Yahoo mail' mode; w/ and w/o ssl... to no avail. A yahoo-side pop issue?
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
lessfield
After marking some old uni-messages as unread via thunderbird and running conkyEmail w/
--servertype=IMAP --servername=imap.uni.edu --username=xx --password=xx --mailinfo=3
and a stout of:
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
also a conky diplayed
1 New
1. my_sender: "my_subjet"
then i closed thunderbird, killed and restarted conky and i got
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
ERROR: getEmailData:Unexpected error when converting recieve date to datetime:time data did not match format: data=0 Sep 2008 19:58:26 fmt=%d %b %Y %H:%M:%S
w/ conky displaying
8 New
1. my_sender1: "my_subjet1"
2. my_sender2: "my_subjet2"
3. my_sender3: "my_subjet3"
after refreshing thunderbird all messages were marked as read
this issue does not happen when i use a gmail account.
The date recieved data in the mail message should conform to the RFS standard, if it doesn't this error could happen...Looking at the datetime "0 Sep 2008 19:58:26" why is it "0" ;) there isn't a day in a month that is "0"! The errors don't display in conky and the messages are still listed right?
Also, I think your uni's IMAP server is not working as it should, it should work just as gmail does and isn't. IMAP messages should remain as unseen unless they are read in your client, once read you would then expect them not to show in conky.
Quote:
Originally Posted by
lessfield
my yahoo account is spews some [AUTH] invalid user/password garbage. I tried to set yahoo in 'classic' and 'new Yahoo mail' mode; w/ and w/o ssl... to no avail. A yahoo-side pop issue?
Yahoo has been an on and off affair for me, it is working fine right now for me using pop without ssl, using pop.mail.yahoo.com as the pop server. Remember the username doesn't include the @blah, it is just the text before the @. I assume you know this already ;)
-
Re: Conky SSL Email Python Script
Hi:)
I use the conkyemail script and it is great.
I have my own imap server (secure) and the script shows the number og unread messages. But I can not find out where to set the update interval (When it checks for new messages) I see the option --connectiontimeout, but I want it to check for new mail every 5 minutes.
hope someone can help?
-
Re: Conky SSL Email Python Script
Quote:
Originally Posted by
brodos1
Hi:)
I use the conkyemail script and it is great.
I have my own imap server (secure) and the script shows the number og unread messages. But I can not find out where to set the update interval (When it checks for new messages) I see the option --connectiontimeout, but I want it to check for new mail every 5 minutes.
hope someone can help?
The update interval is not set in the script, it is purely a conky setting
In your conkyrc you'll have something like this:
Code:
${execi 1000 conkyEmail ...settings...}
The 1000 is the number of seconds that define the interval for the exec call, just mess about with that.
Take a look at the conky website based documentation to see more details on this:
http://conky.sourceforge.net/documentation.html
Hope that helps