mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 21:51:59 +01:00
fixed a bug in the counter sql statement
This commit is contained in:
parent
14b9d0fe86
commit
57b0c1d650
43
README
43
README
@ -2,10 +2,44 @@ piler is an open source email archival application.
|
||||
|
||||
Features:
|
||||
|
||||
- ...
|
||||
- built-in smtp server
|
||||
- clamd support
|
||||
- archival rules
|
||||
- retention rules
|
||||
- legal hold
|
||||
- message and attachment deduplication
|
||||
- message compression
|
||||
- message encryption
|
||||
- digital fingerprinting and verification
|
||||
|
||||
- full text search
|
||||
- simple and advanced search
|
||||
- save search criteria
|
||||
- tagging emails
|
||||
- view, export, restore emails
|
||||
|
||||
- bulk import/export messages
|
||||
|
||||
- access control
|
||||
|
||||
- AD / LDAP authentication
|
||||
|
||||
- i18n
|
||||
- customisable theme
|
||||
|
||||
- audit logs
|
||||
- search in audit logs
|
||||
|
||||
- online status info
|
||||
|
||||
- recognised formats: PST, EML, Maildir, mailbox
|
||||
|
||||
|
||||
locales debian alatt: dpkg-reconfigure locales
|
||||
|
||||
|
||||
|
||||
|
||||
locales under debian: dpkg-reconfigure locales
|
||||
|
||||
|
||||
init:
|
||||
@ -16,3 +50,8 @@ init:
|
||||
indexer delta1 --rotate
|
||||
indexer --merge main1 delta1 --rotate --merge-dst-range deleted 0 0
|
||||
|
||||
|
||||
|
||||
Enron dataset: http://www.cs.cmu.edu/~enron/
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ struct __counters loadCounters(struct session_data *sdata, struct __config *cfg)
|
||||
|
||||
bzero(&counters, sizeof(counters));
|
||||
|
||||
snprintf(buf, SMALLBUFSIZE-1, "SELECT rcvd, virus, duplicate, ignore FROM %s", SQL_COUNTER_TABLE);
|
||||
snprintf(buf, SMALLBUFSIZE-1, "SELECT `rcvd`, `virus`, `duplicate`, `ignore` FROM `%s`", SQL_COUNTER_TABLE);
|
||||
|
||||
#ifdef NEED_MYSQL
|
||||
MYSQL_RES *res;
|
||||
@ -79,8 +79,8 @@ void update_counters(struct session_data *sdata, struct __data *data, struct __c
|
||||
if(sdata->now - mc > cfg->memcached_to_db_interval && c.c_rcvd > 0 && c.c_rcvd >= rcvd){
|
||||
snprintf(buf, SMALLBUFSIZE-1, "%ld", sdata->now); memcached_set(&(data->memc), MEMCACHED_COUNTERS_LAST_UPDATE, strlen(MEMCACHED_COUNTERS_LAST_UPDATE), buf, strlen(buf), 0, 0);
|
||||
|
||||
snprintf(buf, SMALLBUFSIZE-1, "UPDATE `%s` SET rcvd=%llu, virus=%llu, duplicate=%llu, ignore=%llu", SQL_COUNTER_TABLE, c.c_rcvd, c.c_virus, c.c_duplicate, c.c_ignore);
|
||||
|
||||
snprintf(buf, SMALLBUFSIZE-1, "UPDATE `%s` SET `rcvd`=%llu, `virus`=%llu, `duplicate`=%llu, `ignore`=%llu", SQL_COUNTER_TABLE, c.c_rcvd, c.c_virus, c.c_duplicate, c.c_ignore);
|
||||
|
||||
//if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: update counters: %s", sdata->ttmpfile, buf);
|
||||
|
||||
goto EXEC_SQL;
|
||||
@ -103,7 +103,7 @@ void update_counters(struct session_data *sdata, struct __data *data, struct __c
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
snprintf(buf, SMALLBUFSIZE-1, "UPDATE `%s` SET rcvd=rcvd+%llu, virus=virus+%llu, duplicate=duplicate+%llu, ignore=ignore+%llu", SQL_COUNTER_TABLE, counters->c_rcvd, counters->c_virus, counters->c_duplicate, counters->c_ignore);
|
||||
snprintf(buf, SMALLBUFSIZE-1, "UPDATE `%s` SET `rcvd`=`rcvd`+%llu, `virus`=`virus`+%llu, `duplicate`=`duplicate`+%llu, `ignore`=`ignore`+%llu", SQL_COUNTER_TABLE, counters->c_rcvd, counters->c_virus, counters->c_duplicate, counters->c_ignore);
|
||||
|
||||
//if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: update counters: %s", sdata->ttmpfile, buf);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user