On 04/02/2014 05:52 PM, Rob Tanner wrote:

On Apr 2, 2014, at 10:17 AM, Nigel Kukard <[email protected] <mailto:[email protected]>> wrote:

On 04/02/2014 05:00 PM, Rob Tanner wrote:
On Apr 2, 2014, at 8:47 AM, Nigel Kukard <[email protected] <mailto:[email protected]>> wrote:

On 04/02/2014 02:47 PM, Rob Tanner wrote:
Hi,

I’ve installed cluebringer-v2.0.14 and MySql 5.1 on a linux box for testing before I move it onto my production servers. I connected it into postfix and brought both policyd and postfix up. When I attempted to send an email through my test server, I got the following error:

    [TRACKING] ERROR: Failed to select session tracking info:
    awitpt::db::dblayer::DBSelect(126): Error executing select:
    Unknown column 'UnixTimestamp' in 'field list’

This, of course, is a problem in the distro since the software is trying to access the session_tracking table and it expects the column UnixTimeStamp and it does not exists in the database. I went back to the database folder in the distro download, and none of the *.tsql files that are used to built the database on MySQL contained that column. So, I went int and manually changed the column name from Timestamp to UnixTimestamp, and that fixed the problem. The core.tsql file needs to be corrected in the download.

So now I don’t get any error and since I was manually testing, I set up a default outbound policy with a limit of 5 messages per day before and expected rejections after I exceeded that number. But no, it did not happen. I looked in the session_tracking table and there were no entries.

Any ideas about what’s going on on where I need to look to find the problem would be most appreciated.

Thanks,



Can you show me what you ran to create the schema file?


Per the INSTALL instructions in the distribution root, I went into the database directory (right below root) and ran the following:

for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql
do
       ./convert-tsql mysql $i
done > policyd.mysql

Then, in accordance with the instructions in the INSTALL document, I ran the following to upload the schema:

 mysql -u root -p policyd < policyd.mysql

And now that I’m thinking about it, there were no instructions to say that I needed to manually create the database, but since the above command failed because the database policyd didn’t exist, so I manually created it and then the upload ran without any errors.

Try    ./convert-tsql mysql51 $i   :)

That result in the error: ERROR: Invalid database type ‘mysql51'

Typing in just ./convert-tsql with parameters lists the valid database types:

Valid database types:
      mysql55 - For MySQL v5.5
      mysql4  - For MySQL v4
      mysql   - For MySQL v5
      pgsql   - For PostgreSQL
      sqlite  - For SQLite v3


But since I have the database schema installed on MySQL, my big concern in why the accounting limits are not working. I’m presuming that the session-tracking table is the beast that keeps count of the number of messages send (the Accounting module) and it’s never being written to. If that’s not where the dat is stored to limit the number of messages per day, please tell me where it is. The limits on the number outgoing messages per her per day is the one thing I need policyd to do for me.

You're right, it should be mysql , not mysql51. v2.1 uses mysql51 I believe.

I'm not able to reproduce the original error you reported though, can you verify that the schema was loaded correctly? failing that full debug logging may reveal more details

-N

_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org

Reply via email to