Hi Bharath,

This is a wonderful tweak. I was also one for waiting the solution in the
list. Thank you for the detailed steps.

With Regards
Nabin Limbu


-----Original Message-----
From: Bharath Chari <[email protected]>
To: [email protected]
Date: Fri, 10 Feb 2012 10:41:22 +0530
Subject: [qmailtoaster] Log email Account creation date

> Here goes. It's a manual process for each domain, but it seems to work
> :)
> 
> Note : A separate log table and trigger has to be created for each 
> domain. This example is for a domain called example.com
> 
> Please execute the following commands on the vpopmail database from the
> MySQL command prompt. Do not use phpmyadmin.
> 
> 1) mysql -uroot -p vpopmail
> Enter your mysql root password here.
> 
> 2) Create a log table for the domain example.com (I am going to use the
> table name log_example_com). Replace with your actual domain name
> 
> 
> CREATE TABLE `log_example_com` (
>    `user_id` varchar(255) character set latin1 NOT NULL,
>    `creation_date` datetime NOT NULL
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
> Query OK, 0 rows affected (0.04 sec)
> 
> 
> 3) Create a trigger - the trigger name I have used is 
> example_com_trigger and the corresponding table for the domain 
> example.com is example_com
> 
> mysql> delimiter $$
> mysql> CREATE TRIGGER example_com_trigger
>      -> AFTER insert on example_com
>      -> FOR EACH ROW
>      -> BEGIN
>      -> insert into log_example_com values(new.pw_name,NOW());
>      -> END$$
> 
> mysql> delimiter ;
> (Resetting the delimiter is critical)
> 
> 4) Exit the mysql shell. On creating a new ID in the domain
> example.com, 
> you should get the ID and creation date/time in the table
> log_example_com.
> 
> Pak : Since you are the resident wikifying expert, can you please add
> it 
> to the wiki :)
> 
> Bharath
> 
> 
> 
> -----------------------------------------------------------------------
> ----------
> Qmailtoaster is sponsored by Vickers Consulting Group
> (www.vickersconsulting.com)
>     Vickers Consulting Group offers Qmailtoaster support and
> installations.
>       If you need professional help with your setup, contact them
> today!
> -----------------------------------------------------------------------
> ----------
>      Please visit qmailtoaster.com for the latest news, updates, and
> packages.
>      
>       To unsubscribe, e-mail:
> [email protected]
>      For additional commands, e-mail:
> [email protected]
> 
> 



---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
    Vickers Consulting Group offers Qmailtoaster support and installations.
      If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
     Please visit qmailtoaster.com for the latest news, updates, and packages.
     
      To unsubscribe, e-mail: [email protected]
     For additional commands, e-mail: [email protected]


Reply via email to