Jesse Norell wrote:

---

[DBMAIL]
host=localhost
sqlsocket=/var/run/mysqld/mysqld.sock
user=dbmail
pass=dbmailpass
db=dbmail
[EMAIL PROTECTED]

 You do still have TRACE_LEVEL in [DBMAIL], for clarity?

Yep.

 Nope, dbmail-util, sorry.

OK. dbmail-util -a gives:

---

Opening connection to database...
Opening connection to authentication...
Ok. Connected.

Checking DBMAIL messageblocks integrity...
Ok. Found [0] unconnected messageblks.

Checking DBMAIL message integrity...
Ok. Found [0] unconnected messages.

Checking DBMAIL mailbox integrity...
Ok. Found [0] unconnected mailboxes.
Checking DBMAIL for NULL messages... Ok. Found [0] NULL messages. Checking DBMAIL for NULL physmessages...
Ok. Found [0] physmessages without messageblocks.
Checking DBMAIL for incorrect is_header flags...
Ok. Found [0] incorrect is_header flags.
Counting messages with PURGE status...
Ok. Found [0] messages with PURGE status.
Counting messages with DELETE status...
Ok. Found [0] messages with DELETE status.

Vacuum and optimize not performed.

Maintenance done. No errors found.

---

and my syslog output is:

---

Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [host] Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): found value [localhost] Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [db]
Nov  9 09:44:17 [dbmail/maintenance] GetConfigValue(): found value [dbmail]
Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [user]
Nov  9 09:44:17 [dbmail/maintenance] GetConfigValue(): found value [dbmail]
Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [pass] Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): found value [dbmailpass] Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [sqlport]
Nov  9 09:44:17 [dbmail/maintenance] GetConfigValue(): item not found
Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): searching value for config item [sqlsocket] Nov 9 09:44:17 [dbmail/maintenance] GetConfigValue(): found value [/var/run/mysqld/mysqld.sock] Nov 9 09:44:17 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_physmessage LIMIT 1 OFFSET 0] Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT mb.messageblk_idnr FROM dbmail_messageblks mb LEFT JOIN dbmail_physmessage pm ON
mb.physmessage_id = pm.id WHERE pm.id IS NULL]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_messageblks: no lost messageblocks Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT msg.message_idnr FROM dbmail_messages msg LEFT JOIN dbmail_mailboxes mbx ON msg.
mailbox_idnr=mbx.mailbox_idnr WHERE mbx.mailbox_idnr IS NULL]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_messages: no lost messages Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT mbx.mailbox_idnr FROM dbmail_mailboxes mbx LEFT JOIN dbmail_users usr ON mbx.own
er_idnr=usr.user_idnr WHERE usr.user_idnr is NULL]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_mailboxes: no lost mailboxes Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT msg.message_idnr FROM dbmail_messages msg LEFT JOIN dbmail_physmessage pm ON msg
.physmessage_id = pm.id WHERE pm.id is NULL]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_null_messages: no null messages Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT pm.id FROM dbmail_physmessage pm LEFT JOIN dbmail_messageblks mbk ON pm.id = mbk
.physmessage_id WHERE mbk.physmessage_id is NULL]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_null_physmessages: no null physmessages Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT MIN(messageblk_idnr), MAX(is_header) FROM dbmail_messageblks GROUP BY physmessag
e_id HAVING MAX(is_header)=0]
Nov 9 09:44:18 [dbmail/maintenance] db.c,db_icheck_isheader: no messageblocks Nov 9 09:44:18 [dbmail/maintenance] db.c,db_purge_count: executing query [SELECT message_idnr FROM dbmail_messages WHERE status='3'] Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT message_idnr FROM dbmail_messages WHERE status='3'] Nov 9 09:44:18 [dbmail/maintenance] db.c,db_deleted_count: executing query [SELECT message_idnr FROM dbmail_messages WHERE status='2'] Nov 9 09:44:18 [dbmail/maintenance] dbmysql.c,db_query: executing query [SELECT message_idnr FROM dbmail_messages WHERE status='2']

---

It's picking values ( eg my socket /var/run/mysqld/mysqld.sock ) from the config file. It also uses the username / password to connect successfully to the database.

---

divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail-procmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
MASQUERADE_AS(`nusconsulting.com.au')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
FEATURE(`local_procmail')dnl
define(`LOCAL_MAILER_PATH', `/usr/sbin/dbmail-smtp')dnl
define(`LOCAL_MAILER_ARGS', `dbmail-smtp -d $u')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

---

 Your procmail setup doesn't happen to deliver to dbmail itsself, does
it?  Look for a dbmail-smtp -f there, if so.

I've removed that procmail line and rebuild my sendmail.cf and restarted sendmail. No change. I had procmail stuff there because we use it on our main server, and I copied & pasted my sendmail.mc from there. But anyway, it's gone now.

 Check that you're not chroot'd, as Paul suggested.

It's not chroot'd.

 Also, does
dbmail-util give a similar error, or does it run?

Yep.

 If it does run,
does dbmail-smtp run from the command line?
Kinda. I tried:

dbmail-smtp -d [EMAIL PROTECTED]

Then I entered a single line of text:
test

and hit CTRL and D.

In the syslog, I got:

---

Nov  9 09:57:59 [su(pam_unix)] session opened for user root by (uid=1000)
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [host]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [localhost]
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [db]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [dbmail]
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [user]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [dbmail]
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [pass]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [dbmailpass]
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [sqlport]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): item not found
Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [sqlsocket] Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [/var/run/mysqld/mysqld.sock] Nov 9 09:58:27 [dbmail/smtp] GetConfigValue(): searching value for config item [trace_level]
Nov  9 09:58:27 [dbmail/smtp] GetConfigValue(): found value [5]
Nov 9 09:58:27 [dbmail/smtp] dbmysql.c,db_query: executing query [SELECT 1=1 FROM dbmail_physmessage LIMIT 1 OFFSET 0] Nov 9 09:58:29 [dbmail/smtp] header.c,consume_header_line: end of header found
Nov  9 09:58:29 [dbmail/smtp] header.c,get_rfc_size: remaining_len = 0
Nov  9 09:58:29 [dbmail/smtp] mime_readheader(): entering mime loop
Nov  9 09:58:29 [dbmail/smtp] mime_readheader(): mimeloop finished_
Nov 9 09:58:29 [dbmail/smtp] mime_readheader(): no valid mime headers found_ Nov 9 09:58:29 [dbmail/smtp] main(): mime_readheader failed to read a header list
Nov  9 09:58:29 [dbmail/smtp] main(): freeing dsnuser list
Nov  9 09:58:29 [dbmail/smtp] dsn.c, dsnuser_free: dsnuser freed
Nov  9 09:58:29 [dbmail/smtp] main(): freeing all other lists
Nov  9 09:58:29 [dbmail/smtp] main(): freeing memory blocks
Nov  9 09:58:29 [dbmail/smtp] main(): they're all free. we're done.
Nov  9 09:58:29 [dbmail/smtp] main(): exit code is [75].

---

Maybe I didn't execute the command correctly, but it at least found the config file.

Next? :)
Sorry to be a hassle...

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

Reply via email to