Changeset 207

Show
Ignore:
Timestamp:
09/17/07 23:01:20 (16 months ago)
Author:
jonas
Message:

done fwd spam (#29)

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r206 r207  
    11CpVES 0.10 YYYY-MM-DD - Jonas Genannt - <jonas.genannt@brachium-system.net> 
    22        o Improved: sa_learn.pl no longer debug output 
     3        o Improved: move_spam does not display INBOX 
    34        o Added: display mailbox size per domain 
     5        o Added: forward spam to another mailbox (frontend + backend) (#29) 
    46        o Fixed: superadmin web_lang to short (#35) 
    57CpVES 0.09 2007-09-15 - Jonas Genannt - <jonas.genannt@brachium-system.net> 
  • trunk/includes/sites/user_spam.php

    r205 r207  
    7979        } 
    8080        //save move_spam  
    81         if ($_POST['move_spam']==0) { 
     81        if (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active']==1 && $_POST['move_spam']==1) { 
     82                $smarty->assign('error_msg', 'y'); 
     83                $smarty->assign('move_spam_active_and_spam_fwd', 1); 
     84        } 
     85        elseif ($_POST['move_spam']==0) { 
    8286                $sql=sprintf("UPDATE users SET move_spam=NULL WHERE id='%d'", 
    8387                        $db->escapeSimple($_SESSION['uid'])); 
     
    125129                update_email_options($_SESSION['uid'],'del_known_spam','0',0); 
    126130        } 
    127         if (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active']==1 ) { 
     131         
     132        if (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active']==1  && $_POST['move_spam']==1) { 
     133                $smarty->assign('error_msg', 'y'); 
     134                $smarty->assign('move_spam_active_and_spam_fwd', 1); 
     135        } 
     136        elseif (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active']==1 ) { 
    128137                if (Validate::email($_POST['spam_fwd_mail'])) { 
    129138                        update_email_options($_SESSION['uid'],'spam_fwd_active','1',0); 
  • trunk/system_scripts/create_mailfilters.pl

    r181 r207  
    206206                                        $del_known_spam_value); 
    207207                                } 
     208                                if (get_email_option($id,'spam_fwd_active','0') eq "1") { 
     209                                        $mailfilter = sprintf("%s\nexception {\nif (/^X-Spam-Flag: Yes/ || /^X-Bogosity: Spam, tests=bogofilter/)\n  to \"!%s\"\n}\n", 
     210                                                $mailfilter, 
     211                                                get_email_option($id,'spam_fwd_mail','')); 
     212                                } 
    208213                        } 
    209214                        if ( $type eq "autoresponder") { 
  • trunk/templates/error_messages.tpl

    r195 r207  
    8787{elseif $ml_email_there == 'y'} 
    8888{t}email address is already on the list!{/t} 
     89{elseif $move_spam_active_and_spam_fwd == 1} 
     90{t}move known spam and forward known spam is active!{/t}<br/> 
     91{t}You could either use move or forward option!{/t} 
    8992{/if} 
  • trunk/templates/user_spam.tpl

    r205 r207  
    6161                                <option value="{$row.name}" selected="selected">{$row.name_display}</option>  
    6262                                {/if} 
    63                         {else} 
     63                        {elseif $row.type!='inbox'} 
    6464                                {if $row.type == 'spam'} 
    6565                                <option style="font-weight:bold;" value="{$row.name}">{$row.name_display}</option>