Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ANNOUNCE: mailbox plugin 0.1.0 for IMAP/POP3 accounts



Hi all,

first of all I want to thank the people which sent me some feedback on their success or failure to compile/start/use the plugin.

As the mailbox-plugin uses the c-client library and as different linux distributors build their packages in different ways and I am not able to test all these combinations at home, I depend on your valuable feedback and your help to update the README and the Makefile to make the installation of the plugin more straightforward.

After having exchanged some private mails with some users I want to summarize the most common pitfalls (with some solutions and some requests for help :)

Tomorrow I will place the following text on the web-server at

<http://sites.inka.de/seca/vdr/problems.txt>

and update it at regular intervals. Later on I will incorporate these hints in the README / Makefile and/or a separate file.

Of course I won't bother the VDR-Mailinglist with this complete text again.

To make it as easy as possible to build/run the plugin on various distributions I would like to add as many as possible distribution dependent hints to the README. Therefore I kindly ask you to drop me a short personal mail (to <alex at seca.inka.de>) with the following information:

- Linux distribution and version number on the VDR PC
- c-client package name or compiled from source
- used settings for IMAPINCDIR and IMAPLFLAGS
- parameters used in MailBox-string to connect to the imap-server
(e.g. right now, I know at least of one user who successfully
connects with '.../imap/ssl/novalidate-cert')
- name and version of the imap-server

Contents:

1. Compilation
1.1 error because "linkage.c" is missing
(at least SuSE 8.1, 8.0 and Gentoo 1.4)

2. Starting vdr with the plugin
2.1 unresolved external "crypt"
(at least Mandrake 9.1)

3. Misc

-----

All file-names are relative to the directory of the plugin: $VDRDIR/PLUGINS/src/mailbox

1. Compilation
==============
1.1 error because "linkage.c" is missing
----------------------------------------
(at least SuSE 8.1, 8.0 and Gentoo 1.4)
(OK: SuSE 8.2, Debian 3.0)

The compiler complains about a missing file "linkage.c" while compiling AxMail/src/AxMailBoxMgr.cpp.

Possible workaround is below.

Explanation/Background:
-----------------------
The c-client-library uses internally so called 'drivers' to access the mailboxes. These drivers must be initialized/registered before the first access to a mailbox.

Therefore an application which uses the c-client-library must call the appropriate functions at the beginning / before the first mailbox access. To make it easy for the application developer the author of c-client delivers a source-file "linkage.c" with the necessary function calls which should be included in the source of the client-application at a place where these commands are executed before mail access.

Unfortunately the package maintainers of some versions of some linux distributions didn't include the file "linkage.c" in the include-directory of the c-client-package. Ok, thats understandable as it's quite unusual to have a *.c-file in an include directory.

Nevertheles I used '#include "linkage.c"' as the author states in the documentation:

----- snip -----
void mail_link (DRIVER *driver);
driver pointer to the driver to be added

This function adds the specified driver to the list of mailbox
drivers. Initially there are no drivers lunk, so all programs which
intend to use c-client need to have at least one call to this function.

A function which uses IMAP4 would have a statement such as:
mail_link (&imapdriver); /* link in IMAP driver */
early in the program's initialization. Normally, this is done by the
statement
#include "linkage.c"
which will include the "system standard driver linkage" defined when
c-client was built. By using linkage.c instead of explicit mail_link()
calls, you are guaranteed that you will have a consistant linkage among
all software built on this system.
----- snip -----
(Full text at:
<http://www.washington.edu/imap/documentation/internal.txt.html>)

So I followed the documentation exactly, but unfortunately the linkage.c isn't contained in all distributions.

Workaround:
-----------
If you don't have a file linkage.c on your pc you could try the following:

Create a file named 'linkage.c' in the subdirectory AxMail/src/
and put the following lines into that file:

----- snip -----
mail_link (&mboxdriver); /* link in the mbox driver */
mail_link (&imapdriver); /* link in the imap driver */
mail_link (&nntpdriver); /* link in the nntp driver */
mail_link (&pop3driver); /* link in the pop3 driver */
mail_link (&mhdriver); /* link in the mh driver */
mail_link (&mxdriver); /* link in the mx driver */
mail_link (&mbxdriver); /* link in the mbx driver */
mail_link (&tenexdriver); /* link in the tenex driver */
mail_link (&mtxdriver); /* link in the mtx driver */
mail_link (&mmdfdriver); /* link in the mmdf driver */
mail_link (&unixdriver); /* link in the unix driver */
mail_link (&newsdriver); /* link in the news driver */
mail_link (&philedriver); /* link in the phile driver */
mail_link (&dummydriver); /* link in the dummy driver */
auth_link (&auth_md5); /* link in the md5 authenticator */
auth_link (&auth_pla); /* link in the pla authenticator */
auth_link (&auth_log); /* link in the log authenticator */
ssl_onceonlyinit ();
mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);
----- snip -----

This are the contents of the file linkage.c on my develoment system.

Alternatively you could replace the line

#include "linkage.c"

(around line 70) in AxMail/src/MailBoxMgr.cpp with the above lines.

Note: I would expect that the following two lines

mail_link (&imapdriver); /* link in the imap driver */
mail_link (&pop3driver); /* link in the pop3 driver */

could be enough. At least on my system the plugin works as expected with these two lines. If you don't use plain-text-passwords, try adding the last five lines from above too.

*Please*: Send me a short mail if you have the mentioned problem and if this workaround solves the problem for you. I need some information about your system (see questions above) and which lines from above made the plugin work for you.

I'm sorry for the inconveniences - I don't think that this workaround is really the best solution. At this point, I'm still not sure how to solve this problem in future versions of the plugin.

2. Starting vdr with the plugin
===============================
2.1 unresolved external "crypt"
-------------------------------
Please add '-lcrypt' to your IMAPLFLAGS (and write me a short mail if that solves the problem.

3. Misc
=======
If you get a message like "Can't get status of mailbox..." please check that your settings for the mail account are correct. Please ensure also, that you have braces around the Mailbox-String and that the spelling of all parameters (like '/imap/notls/norsh') is correct.

(to be continued...)

have fun,
Alex




--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index