Hello

1st:

When I compiled and run dbmail-util, I got:
$ dbmail-util -a
Segmentation fault

Bad thing...

I compare it with revision 1987, changes:

 /** default directory and extension for pidfiles */
-#define DEFAULT_PID_DIR "/var/run/"
+#define DEFAULT_PID_DIR "/var/run/dbmail/"
 #define DEFAULT_PID_EXT ".pid"
 /** default configuration file */
-#define DEFAULT_CONFIG_FILE "/etc/dbmail.conf"
+#define DEFAULT_CONFIG_FILE "/etc/dbmail/dbmail.conf"

Of couse, I  haven't /var/run/dbmail/ and /etc/dbmail/

May be, there must be some checks?


2nd thing:

$ dbmail-lmtpd
pidfile.c, pidfile_create: File [/var/run/dbmail-lmtpd.pid] exists and process 
id [27363] is running.

in this situation, 27363 - pid of _new_ process.

May be there must be applied such patch:
pidfile.c:

        if (oldpid != 0) {
                trace(TRACE_FATAL, "%s, %s: File [%s] exists and process id 
[%d] is running.",
-                        __FILE__, __func__, pidFile, (int)pid);
+                        __FILE__, __func__, pidFile, (int)oldpid);


3rd:

Part of log:
dbmail-message.c,dbmail_message_cache_subjectfield: no subject field value 
[23536]
pipe.c, insert_messages: temporary msgidnr is [49552]
pipe.c, insert_messages: calling sort_and_deliver for useridnr [2]
misc.c, find_bounded: Found nothing between '+' and '@'
dbmysql.c,db_query: executing query [SELECT name from dbmail_sievescripts 
where owner_idnr = 2 and active = 1]
serverchild.c,active_child_sig_handler: got signal [Segmentation fault]
serverchild.c,active_child_sig_handler: cannot ignore this. Terminating

In this situation I have 2 scripts in table, but all of them have active=0
If I have one of them active, then all ok.
If I have no scripts at all - Segmentation fault

Now, I am doing this in db.c (in db_get_sievescript_active):

        n = db_num_rows();
        if (n > 0) {
                *scriptname = dm_strdup(db_get_result(0, 0));
+                n=DM_SUCCESS;
+        } else {
+                n=DM_EQUERY;
        }

        db_free_result();
-        return DM_SUCCESS;
+        return n;
}

and it's OK

(sorry, but I am not professional C-programmer)

-- 
Oleg Lapshin

Reply via email to