attachment name rule fix

This commit is contained in:
SJ 2013-11-11 11:48:13 +01:00
parent dc3da74311
commit efbb6c3ea9
4 changed files with 12 additions and 3 deletions

View File

@ -32,7 +32,10 @@ int main(int argc, char **argv){
cfg = read_config(CONFIG_FILE); 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)){ if(readkey == 1 && read_key(&cfg)){
printf("%s\n", ERR_READING_KEY); printf("%s\n", ERR_READING_KEY);

View File

@ -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 archiving_rule add column `attachment_name` varchar(128) default null;
alter table retention_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`);

View File

@ -51,7 +51,7 @@ class ControllerPolicyArchiving extends Controller {
private function validate() { private function validate() {
if($this->request->post['from'] == '' && $this->request->post['to'] == '' && if($this->request->post['from'] == '' && $this->request->post['to'] == '' &&
$this->request->post['subject'] == '' && $this->request->post['size'] == '' && $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 $this->request->post['spam'] == -1
) { ) {
return false; return false;

View File

@ -54,7 +54,7 @@ class ControllerPolicyRetention extends Controller {
if($this->request->post['from'] == '' && $this->request->post['to'] == '' && if($this->request->post['from'] == '' && $this->request->post['to'] == '' &&
$this->request->post['subject'] == '' && $this->request->post['size'] == '' && $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 $this->request->post['spam'] == -1
) { ) {
if(ENABLE_SAAS == 1 && strlen($this->request->post['domain']) > 3) { return true; } if(ENABLE_SAAS == 1 && strlen($this->request->post['domain']) > 3) { return true; }