diff --git a/src/pilerget.c b/src/pilerget.c index 0d166fde..a41c94a8 100644 --- a/src/pilerget.c +++ b/src/pilerget.c @@ -32,7 +32,10 @@ int main(int argc, char **argv){ cfg = read_config(CONFIG_FILE); - if(argc >= 3) readkey = 0; + if(argc >= 3){ + readkey = 0; + cfg.encrypt_messages = 0; + } if(readkey == 1 && read_key(&cfg)){ printf("%s\n", ERR_READING_KEY); diff --git a/util/db-upgrade-0.1.24-vs-0.1.25.sql b/util/db-upgrade-0.1.24-vs-0.1.25.sql index d22de3b4..ea17edd0 100644 --- a/util/db-upgrade-0.1.24-vs-0.1.25.sql +++ b/util/db-upgrade-0.1.24-vs-0.1.25.sql @@ -7,3 +7,9 @@ create index metadata_idx9 on metadata(`sent`); alter table archiving_rule add column `attachment_name` varchar(128) default null; alter table retention_rule add column `attachment_name` varchar(128) default null; +alter table archiving_rule drop index `from`; +create unique index `entry` on archiving_rule (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`); + +alter table retention_rule drop index `entry`; +create unique index `entry` on retention_rule (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`); + diff --git a/webui/controller/policy/archiving.php b/webui/controller/policy/archiving.php index 43e7dc1a..e3fc3969 100644 --- a/webui/controller/policy/archiving.php +++ b/webui/controller/policy/archiving.php @@ -51,7 +51,7 @@ class ControllerPolicyArchiving extends Controller { private function validate() { if($this->request->post['from'] == '' && $this->request->post['to'] == '' && $this->request->post['subject'] == '' && $this->request->post['size'] == '' && - $this->request->post['attachment_type'] == '' && $this->request->post['attachment_size'] == '' && + $this->request->post['attachment_name'] == '' && $this->request->post['attachment_type'] == '' && $this->request->post['attachment_size'] == '' && $this->request->post['spam'] == -1 ) { return false; diff --git a/webui/controller/policy/retention.php b/webui/controller/policy/retention.php index f42d00ee..3fe092e8 100644 --- a/webui/controller/policy/retention.php +++ b/webui/controller/policy/retention.php @@ -54,7 +54,7 @@ class ControllerPolicyRetention extends Controller { if($this->request->post['from'] == '' && $this->request->post['to'] == '' && $this->request->post['subject'] == '' && $this->request->post['size'] == '' && - $this->request->post['attachment_type'] == '' && $this->request->post['attachment_size'] == '' && + $this->request->post['attachment_name'] == '' && $this->request->post['attachment_type'] == '' && $this->request->post['attachment_size'] == '' && $this->request->post['spam'] == -1 ) { if(ENABLE_SAAS == 1 && strlen($this->request->post['domain']) > 3) { return true; }