ezmlm-idx

May 17, 2014 Roberto Puzzanghera3 comments

ezmlm is an easy-to-use, high-speed mailing list manager for qmail. ezmlm-idx is an extension of the original ezmlm software of D.J. Bernstein.

Since version 7.2.0 ezml-idx is able to to alter the From: address in messages from domains with strict SPF policies as announced here http://lists.untroubled.org/?list=ezmlm&cmd=showmsg&msgnum=14238. This will solve DMARC reject problems with users having yahoo or AOL addresses. Some changes were made in 7.2.1 and 7.2.2 to improve the process (read here http://lists.untroubled.org/?list=ezmlm&cmd=showmsg&msgnum=14256).

Compile:

wget http://ezmlm.untroubled.org/archive/7.2.2/ezmlm-idx-7.2.2.tar.gz
tar xzf ezmlm-idx-7.2.2.tar.gz
cd ezmlm-idx-7.2.2
chown -R root:root .
cd lang
ln -s en_US default
cd ..
make
make man

Test:

# ./ezmlm-test

getconfopt library:   OK
ezmlm-make:           OK
Using subdb plugin:   std
ezmlm-reject:         OK
ezmlm-[un|is]sub[n]:  OK
ezmlm-checksub:       OK
ezmlm-send:           OK
ezmlm-tstdig:         OK
ezmlm-weed:           OK
ezmlmrc contents:     OK
ezmlm-clean:          OK
ezmlm-store:          OK
ezmlm-return:         OK
ezmlm-warn (1/2):     OK
ezmlm-manage (1/2):   OK
ezmlm-request:        OK
ezmlm-split:          OK
ezmlm-gate:           OK
ezmlm-idx:            OK
ezmlm-get (index):    OK
ezmlm-get (get):      OK
ezmlm-get (thread):   OK
ezmlm-get (digest):   OK
ezmlm-manage (2/2):   OK
ezmlm-moderate:       OK
ezmlm-warn (2/2):     OK
ezmlm-archive:        OK
ezmlm-dispatch:       OK                                                                                                                    
dispatch editor:      OK                                                                                                                    
decode sender:        OK                                                                                                                    
Verifying message header and body contents...                                                                                               
flags:                OK                                                                                                                    
substitutions:        OK                                                                                                                    
messages:             OK                                                                                                                    
subscribe nop:        OK                                                                                                                    
unsubscribe nop:      OK                                                                                                                    
subscribe probe:      OK                                                                                                                    
unsubscribe probe:    OK
subscribe:            OK
unsubscribe:          OK
moderated subscribe:  OK
moderated unsub:      OK
subscribe by mod:     OK
unsubscribe by mod:   OK
copylines:            OK
ezmlm-send:           OK
ezmlm-send trailer:   OK
omitbottom (-manage): OK
omitbottom (-get):    OK
Cleaning up...

Install:

make install

Install mysql support

The main advantages are that you are using an address database system that can easily be accessed from any number of other programs via ODBC, perl, java, PHP, ... You can easily hook up ezmlm with your customer database, etc. ezmlm programs compiled with SQL support (and when available also those compiled with support for other SQL servers) are entirely backwards compatible. You can mix SQL dbs with normal ezmlm dbs, and convert lists between them.

Unfortunately the mysql support is not working here. When I create a list with mysql support via qmailadmin the database is not populated and I get an error like this in the qmail-send log:

@400000005364eb332209c884 delivery 2761: deferral: ezmlm-checksub:_fatal:_Could_not_load_plugin_/usr/local/lib/ezmlm/sub-10.0.0.3.so:_/usr/local/lib/ezmlm/sub-10.0.0.3.so:_cannot_open_shared_object_file:_No_such_file_or_directory/

10.0.0.3 is the IP of mysql host. The program is looking for sub-10.0.0.3.so instead of sub-mysql.so.

Anyway I post here howto setup mysql for ezmlm-idx for future reference

Create the database

# mysql -u root -p

CREATE USER 'ezmlm'@'[mailserver-IP]' IDENTIFIED BY '[ezmlm-password]';

GRANT USAGE ON * . * TO 'ezmlm'@'[mailserver-IP]' IDENTIFIED BY '[ezmlm-password]' WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

CREATE DATABASE IF NOT EXISTS `ezmlm` ;
GRANT ALL PRIVILEGES ON `ezmlm` . * TO 'ezmlm'@'[mailserver-IP]';

If you have mysql installed in a non standard path (default prefix is /usr), you may have to adjust some conf files, and also to patch the source. I have mysql under /usr/local/mysql and here is what I have modified:

# nano conf-cc
gcc -O -g -I/usr/local/mysql/include

# nano conf-ld
cc -g -rdynamic -B /usr/local/mysql/lib

At this point I faced two compilation breaks. The first issue was caused by the fact that I have mysql in /usr/local/mysql, but the second one may be a bug. This is the patch I applayed:

diff -ruN ezmlm-idx-7.2.0/sub-mysql.c ezmlm-idx-7.2.0-patched/sub-mysql.c
--- ezmlm-idx-7.2.0/sub-mysql.c 2014-05-03 00:07:29.000000000 +0200
+++ ezmlm-idx-7.2.0-patched/sub-mysql.c 2014-05-03 14:53:43.000000000 +0200
@@ -6,7 +6,7 @@
 #include "subdb.h"
 #include <sys/types.h>
 #include 
-#include <mysql/errmsg.h>
+#include 
 #include 
 
 static stralloc line = {0};
diff -ruN ezmlm-idx-7.2.0/sub_sql.c ezmlm-idx-7.2.0-patched/sub_sql.c
--- ezmlm-idx-7.2.0/sub_sql.c   2014-05-03 00:07:29.000000000 +0200
+++ ezmlm-idx-7.2.0-patched/sub_sql.c   2014-05-03 14:54:38.000000000 +0200
@@ -215,6 +215,7 @@
   struct datetime dt;
   char date[DATE822FMT];
   int nparams;
+  char strnum[FMT_ULONG];
 
   make_name(info,table?"_":0,table,0);
 /* SELECT (*) FROM list_slog WHERE fromline LIKE '%search%' OR address   */

Compile:

make mysql

Test:

# ./ezmlm-test -s mysql -u ezmlm -p [ezmlm-password] -h [mailserver-IP]

getconfopt library:   OK
ezmlm-make:           OK
Using subdb plugin:   mysql
ezmlm-reject:         OK
ezmlm-[un|is]sub[n]:  OK
ezmlm-checksub:       OK
ezmlm non-SQL:        OK
ezmlm SQL:            OK
ezmlm-send:           OK
ezmlm-tstdig:         OK
ezmlm-weed:           OK
ezmlmrc contents:     OK
ezmlm-clean:          OK
ezmlm-store:          OK
ezmlm-return:         OK
ezmlm-warn (1/2):     OK
ezmlm-manage (1/2):   OK
ezmlm-request:        OK
ezmlm-split:          OK
ezmlm-gate:           OK
ezmlm-idx:            OK
ezmlm-get (index):    OK
ezmlm-get (get):      OK
ezmlm-get (thread):   OK
ezmlm-get (digest):   OK
ezmlm-manage (2/2):   OK
ezmlm-moderate:       OK
ezmlm-warn (2/2):     OK
ezmlm-archive:        OK
ezmlm-dispatch:       OK
dispatch editor:      OK
decode sender:        OK
Verifying message header and body contents...
flags:                OK
substitutions:        OK
subscribe nop:        OK
unsubscribe nop:      OK
subscribe probe:      OK
unsubscribe probe:    OK
subscribe:            OK
unsubscribe:          OK
moderated subscribe:  OK
moderated unsub:      OK
subscribe by mod:     OK
unsubscribe by mod:   OK
copylines:            OK
ezmlm-send:           OK
ezmlm-send trailer:   OK
omitbottom (-manage): OK
omitbottom (-get):    OK
Cleaning up...

Now you are ready to install:

make install

Comments

FreeBSD 10.3 Install fail -help?

./ezmlm-test -s mysql -u ezmlm -p [ezmlm-password] -h [mailserver-IP]

getconfopt library:   OK
ezmlm-make:           OK
Using subdb plugin:   mysql
ezmlm-make: fatal: Could not load plugin /package/ezmlm-idx-7.2.2/sub-mysql.so: Cannot open "/package/ezmlm-idx-7.2.2/sub-mysql.so"
ezmlm-make failed to add subdb config info

Reply | Permalink

Hopefully someone else can be

Hopefully someone else can be of any help, as I can't do tests on freeBSD

Reply | Permalink

ezmlm strange error

Hi guyst,

new day, new strange error :-)

from /var/log/qmail/qmail/current:

delivery 152: deferral: ezmlm-send:_fatal:_error_fetching_DNS_record_for_mxtoolbox.com:_temporary_failure/

I have been receiving mail from mxtoolbox without problems for years, but they might have changed something; anyway, the recipient is a mailing list (all subscribers are local users), the mail is stuck in the queue and it is not delivered; I googled for this ezmlm-idx error with no luck, and I really do not understand why ezmlm-send should be doing a DNS lookup on the sender address...

thank you !

 

Reply | Permalink