Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: dev

[Bug 139] Dynamically loadable lookup modules

 

 

exim dev RSS feed   Index | Next | Previous | View Threaded


serge-exim at srv0

Nov 3, 2009, 8:54 AM

Post #1 of 5 (606 views)
Permalink
[Bug 139] Dynamically loadable lookup modules

------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=139




--- Comment #23 from serge <serge-exim [at] srv0> 2009-11-03 16:54:53 ---
Created an attachment (id=336)
--> (http://bugs.exim.org/attachment.cgi?id=336)
Patch 4.70RC2 dynamically loadable lookup module


Updated patch for 4.70 RC2
Updated to 4.70 RC2

Changes:
* removed LOOKUP_DKIM support. The new DKIM it's not just a lookup.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


serge-exim at srv0

Nov 5, 2009, 12:51 PM

Post #2 of 5 (557 views)
Permalink
[Bug 139] Dynamically loadable lookup modules [In reply to]

------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=139




--- Comment #24 from Serge Demonchaux <serge-exim [at] srv0> 2009-11-05 20:51:26 ---
Created an attachment (id=339)
--> (http://bugs.exim.org/attachment.cgi?id=339)
cleaned gcc warnings


* removed dummy() function in src/globals.c (not needed).
* cleaned error: pointer targets in assignment differ in signedness
( char * ==> unsigned char* ).
* using log_write() function to send warnings in LOG_MAIN (src/drtables.c).

Tested with: ===Exim-4.70 RC2=========
* On GNU/Linux Caos NSA release 1.0.25 (Cato) 2009.09.28
* gcc (GCC) 4.3.3
* Arch: i386 and x86_64
* Modules: cdb.so, dsndb.so, mysql.so, pqsql.so and sqlite.so
* Build with:
- EXTRALIBS="-ldl -pie"
- CFLAGS="-fPIE -Wall %{?cflags:%{cflags}}%{!?cflags:$RPM_OPT_FLAGS}"
- LOOKUP_CDB=2
- LOOKUP_DNSDB=2
- LOOKUP_MYSQL=2
- LOOKUP_PGSQL=2
- LOOKUP_MYSQL_INCLUDE="-I%{_includedir}/mysql"
- LOOKUP_MYSQL_LIBS="-L%{_libdir}/mysql -lmysqlclient"
- LOOKUP_PGSQL_INCLUDE="-I%{_includedir}/pgsql"
- LOOKUP_PGSQL_LIBS="-lpq"


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


johannes at sipsolutions

Nov 5, 2009, 1:51 PM

Post #3 of 5 (555 views)
Permalink
[Bug 139] Dynamically loadable lookup modules [In reply to]

------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=139




--- Comment #25 from Johannes Berg <johannes [at] sipsolutions> 2009-11-05 21:50:59 ---
Very cool, thanks for the updates! Maybe we can put this in just after 4.70 for
4.71 :)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


list at srv0

Nov 5, 2009, 2:13 PM

Post #4 of 5 (557 views)
Permalink
Re: [Bug 139] Dynamically loadable lookup modules [In reply to]

Le Thursday 05 November 2009 22:51:00 Johannes Berg, vous avez écrit :
> ------- You are receiving this mail because: -------
> You are the QA contact for the bug.
>
> http://bugs.exim.org/show_bug.cgi?id=139
>
>
>
>
> --- Comment #25 from Johannes Berg <johannes [at] sipsolutions> 2009-11-05
> 21:50:59 --- Very cool, thanks for the updates! Maybe we can put this in
> just after 4.70 for 4.71 :)
>
>
> --
I quite like it :-)

+1


Enter New Vote here →
* <http://bugs.exim.org/votes.cgi?action=show_user&bug_id=139#vote_139>
--

In Microsoft products, failure is not an option. It is a standard feature.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


serge-exim at srv0

Nov 6, 2009, 4:34 AM

Post #5 of 5 (547 views)
Permalink
[Bug 139] Dynamically loadable lookup modules [In reply to]

------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=139

Serge Demonchaux <serge-exim [at] srv0> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |serge-exim [at] srv0




--- Comment #26 from Serge Demonchaux <serge-exim [at] srv0> 2009-11-06 12:34:45 ---
(In reply to comment #19)
> Created an attachment (id=239)
--> (http://bugs.exim.org/attachment.cgi?id=239) [details]
> updated patch for 4.69
>
> Updated to 4.69
>
> We should probably do with adding the list of loaded lookups to 'exim -bV'
> output somehow. And it would be nice if we could avoid using RTLD_NOW.
>

The cosmetic path called in show_whats_supported() function to
display list of loadable lookup modules possible.


-----------<start>---------
--- exim-4.70.lookup/src/exim.c 2009-11-06 13:18:19 +0100
+++ exim-4.70.lookup2/src/exim.c 2009-11-06 13:19:02 +0100
@@ -976,6 +976,34 @@
#endif
fprintf(f, "\n");

+/* List of loadable lookup modules possible.
+ NOTE: this is not an real list of dl, to this point
+ in time the module was not yet tested!
+ */
+#ifdef LOOKUP_MODULE_DIR
+ DIR *dd;
+ struct dirent *ent;
+
+ dd = opendir(LOOKUP_MODULE_DIR);
+ if (dd != NULL) {
+ fprintf(f, "Lookups (as-module):");
+ while ((ent = readdir(dd)) != NULL) {
+ char *name = ent->d_name;
+ int len = (int)strlen(name);
+ /* The length of a name is be greater or equal than
+ length of 'cdb' module and the module must end as '.so'.
+ */
+ if ( len >= 3 + 3 && strncmp(name + (len-3), ".so", 3) == 0 ) {
+ /* Remove '.so' at the end of module name.
+ */
+ name[len-3] = '\0';
+ fprintf(f, " %s", name);
+ };
+ };
+ };
+ fprintf(f, "\n");
+#endif
+
fprintf(f, "Authenticators:");
#ifdef AUTH_CRAM_MD5
fprintf(f, " cram_md5");
-----------<end>---------


% /usr/sbin/exim -bV
Exim version 4.70 #1 built 06-Nov-2009 12:32:58
Copyright (c) University of Cambridge 2006
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
Support for: crypteq iconv() Expand_dlfunc OpenSSL move_frozen_messages
Experimental_SPF
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz passwd
Lookups (as-module): mysql dnsdb
Authenticators: cram_md5 plaintext
Routers: accept dnslookup manualroute queryprogram redirect
Transports: appendfile/maildir autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 4
OpenSSL compile-time version: OpenSSL 0.9.7m 23 Feb 2007
OpenSSL runtime version: OpenSSL 0.9.7m 23 Feb 2007
Configuration file is /etc/exim/exim.conf


Regards,

--Serge


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

exim dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.