Notification: Extending "My Mail" plugin (4 Viewers)

reagan+carter

Portal Pro
September 6, 2006
221
2
Nantes, FR
ok, here's a preview of the WIP. It should be fully compatible with SVN revision #12033. No binaries included, just the source (a bit stripped down, I removed the experimental parts).

Here's what is lacking right now:
-You can't select messages from the main interface yet, just open them. This means that there is no message filtering/searching/tagging in this version. I'm looking for a way to make it user friendly but it appears that I will have to use a playlist similar to MyMusic to handle the selected files. I couldn't find a proper GUI object that could fit my needs.
-You can't display HTML content embedded in mails. Again a limitation of the GUI. I'm quite pessimistic about the future of this feature.
-You can't play videos/sounds/pictures included in a mail yet. This feature has been recently removed because I'm currently looking for a way to do that without having to store the attachments on disk beforehand. I've read somewhere that rtv is trying to modify some code in order to read everything from memory.
-No notification to user yet. The main GUI is not notified of changes in Provider contents too. It will be done last. Someone seems to work on something similar, system-wide (if I understood correctly).
-There is no comment at all in the GUI-related code. No API description yet: still susceptible to change, nor any help file.

Otherwise (and if I recall correctly) the POP3 Provider should be fully functional.

BEWARE not to delete important mails from server after configuring your POP3 accounts.
 

reagan+carter

Portal Pro
September 6, 2006
221
2
Nantes, FR
+ en masse selection of messages
- a few bugs

Is anyone brave enough to compile a standalone plugin and let the world try it out? Personally, I gave up: too many dependencies to handle :(
 

reagan+carter

Portal Pro
September 6, 2006
221
2
Nantes, FR
+ Can display HTML content (experimental, the focus is not released after viewing the HTML message and as a result keyboard presses are lost: if someone wnats to take a look at it, the corresponding code is in GUIHTMLReader.cs)
- GUI bug fixes

you need to reconfigure your accounts the first time you want to use this version
 

bigj

Portal Pro
January 10, 2005
245
1
Hey R+C,

Any chance of getting one of the devs to check this into SVN?
That would expose it to many more people - I for one am keen to try it, but I've not been in a position to build it...

Cheers,
BigJ.
 

bigj

Portal Pro
January 10, 2005
245
1
Thanks R&C - partial success - the plugin appeared in config and I was able to easily setup new mailox. The mp interface worked well too. But mail retrieval failed. The logs showed some db errors and authorisation failure. I tried the same using another pop3 broswer (poppeeper) and that worked fine.

cheers
Jason. logs follow.

2006-12-10 16:41:35.625000 [ERROR][MPMain]: SQL:MessagingDatabase.db3 cmd:sqlite3_prepare16:pvm=null err:ERROR detailed:table account already exists query:CREATE TABLE account (idAccount integer PRIMARY KEY,enabled integer,provider text,name text,autoUpdate integer,updateFreq integer,attachmentsFolder text,config text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(autoUpdate in (0,-1)))
2006-12-10 16:41:35.625000 [ERROR][MPMain]: DatabaseUtility exception err:confused:QL:MessagingDatabase.db3 cmd:sqlite3_prepare16:pvm=null err:ERROR detailed:table account already exists query:CREATE TABLE account (idAccount integer PRIMARY KEY,enabled integer,provider text,name text,autoUpdate integer,updateFreq integer,attachmentsFolder text,config text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(autoUpdate in (0,-1))) stack: at SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
at SQLite.NET.SQLiteClient.Execute(String query)
at MediaPortal.Database.DatabaseUtility.AddTable(SQLiteClient dbHandle, String strTable, String strSQL) sql:CREATE TABLE account (idAccount integer PRIMARY KEY,enabled integer,provider text,name text,autoUpdate integer,updateFreq integer,attachmentsFolder text,config text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(autoUpdate in (0,-1)))
2006-12-10 16:41:35.625000 [ERROR][MPMain]: SQL:MessagingDatabase.db3 cmd:sqlite3_prepare16:pvm=null err:ERROR detailed:table message already exists query:CREATE TABLE message (idAccount integer,idMessage text,enabled integer,unread integer,size integer,flag integer,tag string,header blob,body blob,UNC text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(unread in (0,-1)),FOREIGN KEY (idAccount) REFERENCES account(idAccount),PRIMARY KEY (idAccount, idMessage))
2006-12-10 16:41:35.625000 [ERROR][MPMain]: DatabaseUtility exception err:confused:QL:MessagingDatabase.db3 cmd:sqlite3_prepare16:pvm=null err:ERROR detailed:table message already exists query:CREATE TABLE message (idAccount integer,idMessage text,enabled integer,unread integer,size integer,flag integer,tag string,header blob,body blob,UNC text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(unread in (0,-1)),FOREIGN KEY (idAccount) REFERENCES account(idAccount),PRIMARY KEY (idAccount, idMessage)) stack: at SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
at SQLite.NET.SQLiteClient.Execute(String query)
at MediaPortal.Database.DatabaseUtility.AddTable(SQLiteClient dbHandle, String strTable, String strSQL) sql:CREATE TABLE message (idAccount integer,idMessage text,enabled integer,unread integer,size integer,flag integer,tag string,header blob,body blob,UNC text,CONSTRAINT boolean_behaviour CHECK(enabled in (0,-1)),CONSTRAINT boolean_behaviour2 CHECK(unread in (0,-1)),FOREIGN KEY (idAccount) REFERENCES account(idAccount),PRIMARY KEY (idAccount, idMessage))
2006-12-10 16:41:43.031250 [ERROR][MPMain]: Control has invalid animation type
2006-12-10 16:41:43.046875 [ERROR][MPMain]: Control has invalid animation type
2006-12-10 16:41:51.937500 [ERROR][6]: ProviderPOP3 : OnUpdate failed while connecting and fetching content for Provider Jason's Email: Server returned:-ERR authorization failed
2006-12-10 16:41:51.953125 [ERROR][6]: Provider: OnUpdate( Jason's Email ) failed
 

reagan+carter

Portal Pro
September 6, 2006
221
2
Nantes, FR
thanks a lot for testing it out!

Nothing to care about with most of the errors:

'table account already exists' or 'table message already exists' simply means that the table already exists and won't be re-created on-the-fly at startup, I could have dropped these errors silently but I didn't.

But these ones are far more interesting:
2006-12-10 16:41:51.937500 [ERROR][6]: ProviderPOP3 : OnUpdate failed while connecting and fetching content for Provider Jason's Email: Server returned:-ERR authorization failed
2006-12-10 16:41:51.953125 [ERROR][6]: Provider: OnUpdate( Jason's Email ) failed

The authentication to your mailbox has failed. The most obvious reason is a password/login couple mismatch. Then a problem with the authentication methods implemented (not compliant with standards?).
If you've chosen 'APOP or none' in the Setup window then it first tries to check if your provider actually accepts APOP authentication and in this case proceeds to an APOP transaction, otherwise a simple unprotected USER/PASS (no authentication) is issued.
If you ticked 'SASL' then it will first try DIGEST-SASL if applicable, then CRAM-MD5 and finally if CRAM-MD5 is unsupported throws an error.

So first try to check if you didn't make a mistake typing your password/login (I'm sure you've already cross-checked your login parameters, but...)then if your server actually accepts either APOP or DIGEST-MD5 or CRAM-MD5. Other authentication methods such as NTLM are currently unsupported. In any other case, that must be a problem with my authentication methods, I was only able to try them out with GMail and some public Cyrus POP3 servers.

keep me posted

P.S. if the problem is on my side please give me the name of your POP3 service provider and if it gives away free accounts, I will check with them, directly.
 

bigj

Portal Pro
January 10, 2005
245
1
I tried all permutations of the authetnication+encryption but to be honest I'd not expect anything too funky from my provider. I did check user+pw too.
It's www.zoom.co.uk - I have an very old PAYG account which I just use to carry my pop3 mail i.e. I never actually dial in - it looks reasonably easy to set up a new account but I don't know if you need an initial dial up to get activated....
 

reagan+carter

Portal Pro
September 6, 2006
221
2
Nantes, FR
ok. I've created an account at zoom.co.uk and started experimenting a bit with it.
First note: the server doesn't support SASL. The odd thing is that it advertises its compatibility with APOP but it doesn't work (as per RFC1939, the RFC that defines how APOP works). I've tried to manually connect, via telnet, to pop3.zoom.co.uk and authenticate using APOP (following the RFC1939 religiously) but it doesn't work either. I've retried the APOP mechanism currently implemented against three other different servers and it works like a charm. I'm a bit confused.

A workaround would be to FIRST try to use the USER/PASS mechanism and THEN APOP if and only if it requires it. Not the other way round. I think it's the way poppeeper works. No info for Thunderbird. I will think about it.

Is it the only mailbox that doesn't work?

---

N.B. modus operandi for APOP
c:\telnet pop3.zoom.co.uk 110

Then the server issues this kind of line:
Code:
+OK <21481.1165781674@read13.mail.uk.easynet.net>
Grab the text inclosed in between <>, included
Append your password at the end of the string, without any space
e.g.
Code:
<21481.1165781674@read13.mail.uk.easynet.net>MY_PASSWORD
Hash this string with MD5 (use the inclosed program)
Transform the result into an hexadecimal ASCII string (use the inclosed program)
Type the following command, at the server prompt, in the telnet session currently open
Code:
APOP MY_USERNAME THE_HASHED_AND_HEXED_SECRET
where MY_USERNAME is the POP3 username (login) and THE_HASHED_AND_HEXED_SECRET is the transformed string produced above

pop3.zoom.co.uk inevitably answers "-ERR authorization failed"
 

Users who are viewing this thread

Top Bottom