HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   Move Spam Emails to Junk directory by default? Spamfilter = Normal by default? (http://www.howtoforge.com/forums/showthread.php?t=50839)

radim_h 7th January 2011 18:13

Move Spam Emails to Junk directory by default? Spamfilter = Normal by default?
 
Hello,

is there any option to have
mailfiter "Move Spam Emails to Junk directory"
set by default for each mailbox?

Regular BFU will never turn any kind of mail filter on, and then people are complainign that they are getting spams into inbox

i Tried to change
move_junk=y as default in table mail_user , but its not enough..
for new user Move Spam Emails.. is checked in in ISPC, but sieve script is not on place..
i have to uncheck this option in ISPC and then check it back if i want to right /var/vmail/domain/user/.sieve script on place

--------------

It will be beautifull have also the choice
Mail Domain => Spamfilter => Normal
Mailbox => Spamfilter => Normal

selected by default with all new email domains and all new mailboxes..

Something as default "Email Domain/Mailbox" template....



i'm using Ubuntu 10.04LTS + Dovecot

radim_h 10th January 2011 17:15

Sorry
That part with NORMAL policy was explained to me by Till here http://www.howtoforge.com/forums/sho...392#post243392

Just summary:
edit: /usr/local/ispconfig/interface/web/mail/mail_domain_edit.php
after existing line 166 - $policy_select = "<option value='0'>".$app->tform->wordbook["no_policy"]."</option>";
add line:
if($this->id == 0) $tmp_user["policy_id"] = 5;

edit: /usr/local/ispconfig/interface/web/mail/mail_user_edit.php
after existing line 95 - $policy_select = "<option value='0'>".$app->tform->lng("no_policy")."</option>";
add line:
if($this->id == 0) $tmp_user["policy_id"] = 5;


=====
But i still cannot find, where to turn "Move Spam Emails to Junk directory" ON by default ???

Shifu 17th January 2012 23:14

I'm also looking for a way to set the move_junk field on by default.

I tried by editing: /usr/local/ispconfig/interface/web/mail/form/mail_user.tform.php:261

Setting default to 'y'.

PHP Code:

        'move_junk' => array (
            
'datatype'    => 'VARCHAR',
            
'formtype'    => 'CHECKBOX',
            
'default'    => 'y',
            
'value'        => array(=> 'y',=> 'n')
        ), 

It's simply doesn't work for that field. If i change other CHECKBOX fields on the same page from No to Yes it works. Thats pretty confusing.

Thanks,
Alex

radim_h 17th January 2012 23:22

Sorry , i did double post by mistake, did'nt remember i have asked in this forum some time ago...
There is the second one
http://www.howtoforge.com/forums/showthread.php?t=55801

Shifu 17th January 2012 23:25

Oh, that was too new to find with Google :-). I will participate in the other thread


All times are GMT +2. The time now is 12:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.