[Dovecot] SQL insert?

2010-11-29 Thread Oliver Berse
Hi,

I want to log some informations about a mail in a mysql database when the
mail is saved to inbox (for a groupware). I use Dovecot 1.2.16 and the log
message "msgid=: saved mail to inbox" is generated in deliver.c. I
find all the needed data in that file. But I'am not sure how to use the
functions in sql-api.h or sql-api-private.h to send a simple SQL insert
statement to the database. Can anyone give me a hint how to do this?

best regards,
Oliver


[Dovecot] pam authentication error

2010-11-23 Thread Oliver Berse
Hi all,

I compiled Dovecot 1.2.16 (on Debian 5/lenny) and followed the quick
configuration guide (wiki.dovecot.org/QuickConfiguration). I just need
plaintext authentication. After starting Dovecot I get "Last died with
error" and in var/log/mail.err:
Nov 23 15:06:55 debian dovecot: auth(default): Fatal: Support not compiled
in for passdb driver 'pam'
Nov 23 15:06:55 debian dovecot: dovecot: Fatal: Auth process died too
early - shutting down

In /etc/pam.d/dovecot:
authrequiredpam_unix.so
account requiredpam_unix.so

In /usr/local/etc/dovecot.conf:
passdb pam {
args = *
}

So, what may be wrong with my configuration?
Oliver


[Dovecot] Mail history function?

2010-11-17 Thread Oliver Berse
I'm a newbie at Dovecot. For a company groupware I need a kind of a
history function for mails to see which user sent which mail to whom / got
which mail from whom. So I have to get the message ID of in- and outgoing
mails (and write related data to a mysql database). My first idea was to
monitor the log file with a daemon and search for strings like
"deliver(x...@y.z): 2010-11-15 17:34:56 Info:
msgid=". I'm not sure
if this is the right approach. Does anyone know a better solution with
Dovecot?

thanks,
Oliver