Geert Hendrickx wrote:
On Mon, Sep 25, 2006 at 12:55:31PM -0700, Dan Trainor wrote:
What I'm ultimately wanting to do is have Dovecot preform some action, or a trigger, when the user is successfully authenticated. Even more specifically, I'd like to run another SQL query to record a date/time for last authenticated login.
At least in PostgreSQL, you can define TRIGGERs on the SELECT's themselves. Of course you still don't know whether the login was successful, but this way you could log every login _attempt_ automatically.
Grrty
Hi, Geert -
I think that Timo Siarainen hit the nail in the head there with the mail_executable comment - but I can't find any documentation that says mail_executable is actually ran depending on if the authentication was successfull. I guess in order to know this, it would have to be assumed that the daemons (pop, imap, etc etc) are only ran after authentication is verified. I guess this makes sense, but I have not been able to find documentation regarding this matter.
I'm really interested in mail_executable, and think that it might work for my purposes. But I need to pass at least one piece of identifiable data to this command, which will then run my script, so that I can key my action with said user account, which is stored in SQL.
I found a script on the bottom of:
http://wiki.dovecot.org/PopBSMTPAndDovecot
...which is kindof the way I want this to work. However, I need to pass that one piece of identifiable data, i.e. a user@domain.tld variable, in order to play with SQL some more.
With that being said, anyone know how that might be posssible?
Thanks! -dant