Hi, I'm testing dovecot 1.1.beta14 on two debian etch with
drbd+ocfs2[active/active], I use qmail+vpopmail(userdb) and three
front-end with openbsd 4.2 with dovecot 1.1.beta14 as proxy with passdb
sql through vpopmail database.
Is posible to add logs into vpopmail.vlog from proxys?, like "update
vlog blah blah..." or in other sql database?
I tried with post login scripting but I don't recibe any variable.
Please, sorry my poor english.
Regards,.
debian backend servers:
# 1.1.beta14: /etc/dovecot.conf
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot.log
protocols: imap pop3
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /usr/local/dovecot/var/run/dovecot/login
login_executable(default): /usr/local/dovecot/libexec/dovecot/imap-login
login_executable(imap): /usr/local/dovecot/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3-login
login_process_per_connection: no
mail_max_userip_connections: 2048
verbose_proctitle: yes
mail_debug: yes
mmap_disable: yes
mail_executable(default): /usr/local/dovecot/libexec/dovecot/imap
mail_executable(imap): /usr/local/dovecot/libexec/dovecot/imap
mail_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3):
mail_plugin_dir(default): /usr/local/dovecot/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/dovecot/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/dovecot/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: vpopmail
userdb:
driver: vpopmail
plugin:
quota: maildir
openbsd frontend servers:
# 1.1.beta14: /etc/dovecot.conf
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot.log
protocols: imaps pop3s
ssl_cert_file: /etc/ssl/dovecot.pem
verbose_ssl: yes
login_dir: /usr/local/dovecot/var/run/dovecot/login
login_executable(default): /usr/local/dovecot/libexec/dovecot/imap-login
login_executable(imap): /usr/local/dovecot/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3-login
login_user: _dovecot
verbose_proctitle: yes
mail_debug: yes
fsync_disable: yes
mail_drop_priv_before_exec: yes
mail_executable(default): /usr/local/dovecot/libexec/dovecot/imap
mail_executable(imap): /usr/local/dovecot/libexec/dovecot/imap
mail_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/dovecot/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/dovecot/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/dovecot/lib/dovecot/pop3
mail_log_max_lines_per_sec: 0
imap_client_workarounds(default): delay-newmail netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
user: nobody
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: sql
args: /etc/dovecot-sql.conf
userdb:
driver: static
args: uid=0 gid=0
plugin:
quota: maildir
mail_log_events: delete undelete expunge copy mailbox_delete
mailbox_rename
mail_log_fields: uid box msgid size
/etc/dovecot-sql.conf:
password_query = SELECT pw_clear_passwd AS password, pw_domain AS
domain, '192.168.224.2' AS host, 'Y' AS nologin, 'Y' AS
nodelay, 'Y' AS
proxy FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d'
limit 1
On Thu, 2008-01-24 at 23:38 -0200, diego wrote:> Hi, I'm testing dovecot 1.1.beta14 on two debian etch with > drbd+ocfs2[active/active], I use qmail+vpopmail(userdb) and three > front-end with openbsd 4.2 with dovecot 1.1.beta14 as proxy with passdb > sql through vpopmail database. > Is posible to add logs into vpopmail.vlog from proxys?, like "update > vlog blah blah..." or in other sql database?So the proxy verifies that the password is correct before forwarding the connection? And you want it to execute an SQL statement whenever user authenticates successfully?> I tried with post login scripting but I don't recibe any variable.Proxies don't log in, so that doesn't work. The only way I see for this to work is if you use a SQL function that verifies first if the authentication was successful (you have user-given password in %w), and after that does the log update. But if you're using MySQL I'm not sure if this will work. There have been some problems with MySQL functions before. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080131/f74a8cf2/attachment-0002.bin>
Yes, the proxy verifies if that password is correct before forward and I want to insert a record on sql table if is succesfuly or not. On one of proxy (/var/log/dovecot.log) I can see: dovecot: Feb 04 10:31:16 Info: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 resp=AGRpZWdvQGpnbS5nb3YuYXIAZnVjayFvZmYdovecot: Feb 04 10:31:16 Info: auth-worker(default): mysql: Connected to mysql-fe0 (vpopmail2) dovecot: Feb 04 10:31:16 Info: auth-worker(default): sql(diego at jdomain,127.0.0.1): query: SELECT pw_clear_passwd AS password, pw_domain AS domain, '192.168.224.1' AS host, 'Y' AS nologin, 'Y' AS nodelay, 'Y' AS proxy FROM vpopmail WHERE pw_name = 'diego' AND pw_domain = 'domain' limit 1 dovecot: Feb 04 10:31:16 Info: auth(default): client out: OK 1 user=diego at domain host=192.168.224.1 nologin proxy pass=passwd dovecot: Feb 04 10:31:16 Info: imap-login: proxy(diego at domain): started proxying to 192.168.224.1:143: user=<diego at domain>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Feb 04 10:31:18 Info: imap-login: proxy(diego at domain): disconnecting 127.0.0.1 I can retrieve any of this for put on sql database? Regards,. Timo Sirainen escribi?:> On Thu, 2008-01-24 at 23:38 -0200, diego wrote: >> Hi, I'm testing dovecot 1.1.beta14 on two debian etch with >> drbd+ocfs2[active/active], I use qmail+vpopmail(userdb) and three >> front-end with openbsd 4.2 with dovecot 1.1.beta14 as proxy with passdb >> sql through vpopmail database. >> Is posible to add logs into vpopmail.vlog from proxys?, like "update >> vlog blah blah..." or in other sql database? > > So the proxy verifies that the password is correct before forwarding the > connection? And you want it to execute an SQL statement whenever user > authenticates successfully? > >> I tried with post login scripting but I don't recibe any variable. > > Proxies don't log in, so that doesn't work. > > The only way I see for this to work is if you use a SQL function that > verifies first if the authentication was successful (you have user-given > password in %w), and after that does the log update. But if you're using > MySQL I'm not sure if this will work. There have been some problems with > MySQL functions before. >