Changeset 205
- Timestamp:
- 09/16/07 16:25:43 (16 months ago)
- Location:
- trunk
- Files:
-
- 16 modified
-
ChangeLog (modified) (1 diff)
-
includes/check_access.php (modified) (1 diff)
-
includes/config.inc.default.php (modified) (2 diffs)
-
includes/func.inc.php (modified) (1 diff)
-
includes/sites/domain_view.php (modified) (1 diff)
-
includes/sites/email_view.php (modified) (5 diffs)
-
includes/sites/login.php (modified) (2 diffs)
-
includes/sites/main.php (modified) (2 diffs)
-
includes/sites/user_spam.php (modified) (2 diffs)
-
sql_upgrades (modified) (1 diff)
-
system_scripts/sa_learn.pl (modified) (1 diff)
-
templates/domain_view.tpl (modified) (16 diffs)
-
templates/email_view.tpl (modified) (2 diffs)
-
templates/index_admin.tpl (modified) (1 diff)
-
templates/index_sadmin.tpl (modified) (2 diffs)
-
templates/user_spam.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r203 r205 1 CpVES 0.10 YYYY-MM-DD - Jonas Genannt - <jonas.genannt@brachium-system.net> 2 o Improved: sa_learn.pl no longer debug output 3 o Added: display mailbox size per domain 1 4 CpVES 0.09 2007-09-15 - Jonas Genannt - <jonas.genannt@brachium-system.net> 2 5 o Improved: runScripts.sh create_fetchmail.pl should not run on trigger -
trunk/includes/check_access.php
r169 r205 30 30 if (isset($_SESSION['p_fetchmail'])) $smarty->assign('p_fetchmail',$_SESSION['p_fetchmail']); 31 31 if (isset($_SESSION['p_autores_xheader'])) $smarty->assign('p_autores_xheader',$_SESSION['p_autores_xheader']); 32 if (isset($_SESSION['p_spam_fwd'])) $smarty->assign('p_spam_fwd',$_SESSION['p_spam_fwd']); 32 33 33 34 -
trunk/includes/config.inc.default.php
r203 r205 49 49 50 50 //IMAP Server: 51 $config['imap_server'] = " swetlana.brachium-system.net";51 $config['imap_server'] = "mail.brachium-system.net"; 52 52 53 53 //Company Name: … … 84 84 "autoresponder_send", "email_options","fetchmail", 85 85 "mailarchive","mailfilter","spamassassin","spamassassin_learn","autoresponder_xheader"); 86 $config['cpves_version']="0. 09";86 $config['cpves_version']="0.10-SVN"; 87 87 require_once(ROOT . '/includes/func.inc.php'); 88 88 ?> -
trunk/includes/func.inc.php
r203 r205 207 207 $do="p_mlists"; 208 208 break; 209 case 'spam_fwd': 210 $do="p_spam_fwd"; 211 break; 209 212 default: 210 213 return false; -
trunk/includes/sites/domain_view.php
r196 r205 200 200 $result=&$db->query($sql); 201 201 $data=$result->fetchrow(DB_FETCHMODE_ASSOC); 202 203 202 $smarty->assign('dnsname', $data['dnsname']); 204 $smarty->assign('p_imap', $data['p_imap']); 205 $smarty->assign('p_pop3', $data['p_pop3']); 206 $smarty->assign('p_webmail', $data['p_webmail']); 207 $smarty->assign('p_spamassassin', $data['p_spamassassin']); 208 $smarty->assign('p_sa_learn', $data['p_sa_learn']); 209 $smarty->assign('p_spam_del', $data['p_spam_del']); 210 $smarty->assign('p_mailarchive', $data['p_mailarchive']); 211 $smarty->assign('p_bogofilter', $data['p_bogofilter']); 212 $smarty->assign('p_sa_wb_listing', $data['p_sa_wb_listing']); 213 $smarty->assign('p_fetchmail', $data['p_fetchmail']); 214 $smarty->assign('p_webinterface', $data['p_webinterface']); 215 $smarty->assign('p_autores_xheader', $data['p_autores_xheader']); 216 $smarty->assign('p_check_polw', $data['p_check_polw']); 217 $smarty->assign('p_check_grey', $data['p_check_grey']); 218 $smarty->assign('p_mlists', $data['p_mlists']); 219 203 $smarty->assign('domain', $data); 220 204 $smarty->assign('max_emails', $data['max_email']); 221 205 $smarty->assign('max_fwd', $data['max_forward']); 222 $smarty->assign('dnote', $data['dnote']); 223 206 224 207 $smarty->assign('emails', get_forem_domain($_GET['did'],'users', $db)); 225 208 $smarty->assign('forwardings', get_forem_domain($_GET['did'],'forwardings', $db)); -
trunk/includes/sites/email_view.php
r193 r205 49 49 $smarty->assign('if_check_polw', $data['p_check_polw']); 50 50 $smarty->assign('if_check_grey', $data['p_check_grey']); 51 $smarty->assign('if_spam_fwd', $data['p_spam_fwd']); 51 52 $sql=sprintf("SELECT passwd,cpasswd,email FROM users WHERE id='%s'", 52 53 $db->escapeSimple($_GET['id'])); … … 467 468 { 468 469 $spam_del=0; 470 } 471 if (isset($_POST['spam_fwd']) && $_POST['spam_fwd'] =="enable" && check_domain_feature($_GET['did'],'p_spam_fwd')) { 472 $spam_fwd=1; 473 } 474 else 475 { 476 $spam_fwd=0; 469 477 } 470 478 if (isset($_POST['sa_learn']) && $_POST['sa_learn'] =="enable" && check_domain_feature($_GET['did'],'p_sa_learn')) { … … 542 550 if (!$error) 543 551 { 544 $sql=sprintf("UPDATE users SET passwd='%s', full_name='%s',p_imap='%d', p_pop3='%d',p_webmail='%d', cpasswd='%s', p_forwarding='%s',p_spamassassin='%s',p_mailarchive='%d',p_bogofilter='%d',p_spam_del='%d',p_sa_learn='%d',p_fetchmail='%d',p_webinterface='%d',p_autores_xheader='%d',p_check_polw='%d',p_check_grey='%d' WHERE id='%d' ",552 $sql=sprintf("UPDATE users SET passwd='%s', full_name='%s',p_imap='%d', p_pop3='%d',p_webmail='%d', cpasswd='%s', p_forwarding='%s',p_spamassassin='%s',p_mailarchive='%d',p_bogofilter='%d',p_spam_del='%d',p_sa_learn='%d',p_fetchmail='%d',p_webinterface='%d',p_autores_xheader='%d',p_check_polw='%d',p_check_grey='%d',p_spam_fwd='%d' WHERE id='%d' ", 545 553 $db->escapeSimple($cleartext), 546 554 $db->escapeSimple($_POST['full_name']), … … 560 568 $db->escapeSimple($check_polw), 561 569 $db->escapeSimple($check_grey), 570 $db->escapeSimple($spam_fwd), 562 571 $db->escapeSimple($_GET['id'])) ; 563 572 $result=&$db->query($sql); … … 591 600 $smarty->assign('if_check_polw_value',$edata['p_check_polw']); 592 601 $smarty->assign('if_check_grey_value',$edata['p_check_grey']); 602 $smarty->assign('if_spam_fwd_value',$edata['p_spam_fwd']); 593 603 if ( !empty($edata['move_spam']) && $edata['move_spam']!=NULL) { 594 604 $smarty->assign('sa_move_spam',$edata['move_spam'] ); -
trunk/includes/sites/login.php
r175 r205 31 31 $_SESSION['p_fetchmail']='0'; 32 32 $_SESSION['p_autores_xheader']='0'; 33 $_SESSION['p_spam_fwd']='0'; 33 34 34 35 if (isset($_POST['email']) && isset($_POST['password']) && isset($_POST['login']) ) … … 79 80 $_SESSION['p_fetchmail']=check_du_fetaure($_SESSION['uid'],$daten['domainid'],'p_fetchmail'); 80 81 $_SESSION['p_autores_xheader']=check_du_fetaure($_SESSION['uid'],$daten['domainid'],'p_autores_xheader'); 82 $_SESSION['p_spam_fwd']=check_du_fetaure($_SESSION['uid'],$daten['domainid'],'p_spam_fwd'); 81 83 $_SESSION['forwarding']=$daten['p_forwarding']; 82 84 $_SESSION['p_mailfilter']=$data_domain['p_mailfilter']; -
trunk/includes/sites/main.php
r203 r205 73 73 $vaction=0; 74 74 } 75 //display size of all mailboxes 76 $sql=sprintf("SELECT SUM( mb_size ) AS sum FROM `users`WHERE domainid='%d'", 77 $db->escapeSimple($row['id'])); 78 $res_mb_size=&$db->query($sql); 79 $data_mb_size=$res_mb_size->fetchrow(DB_FETCHMODE_ASSOC); 75 80 array_push($table_data, array( 76 81 'dnsname' => $row['dnsname'], … … 82 87 'dnote' => $row['dnote'], 83 88 'vacation' => $vaction, 84 'vacation_infos' => $vaction_infos 89 'vacation_infos' => $vaction_infos, 90 'mb_size' => $data_mb_size['sum'] 85 91 ) 86 92 ); -
trunk/includes/sites/user_spam.php
r145 r205 125 125 update_email_options($_SESSION['uid'],'del_known_spam','0',0); 126 126 } 127 if (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active']==1 ) { 128 if (Validate::email($_POST['spam_fwd_mail'])) { 129 update_email_options($_SESSION['uid'],'spam_fwd_active','1',0); 130 update_email_options($_SESSION['uid'],'spam_fwd_mail',$_POST['spam_fwd_mail'],0); 131 } 132 else { 133 $smarty->assign('error_msg', 'y'); 134 $smarty->assign('if_error_forwardaddr_valid', 'y'); 135 update_email_options($_SESSION['uid'],'spam_fwd_active','0',0); 136 } 137 } 138 else { 139 update_email_options($_SESSION['uid'],'spam_fwd_active','0',0); 140 } 127 141 128 142 … … 173 187 $del_known_spam=get_email_options($_SESSION['uid'],"del_known_spam",0); 174 188 $del_known_spam_value=get_email_options($_SESSION['uid'],"del_known_spam_value",'10.0'); 189 $spam_fwd_active=get_email_options($_SESSION['uid'], "spam_fwd_active",0); 190 $spam_fwd_mail=get_email_options($_SESSION['uid'], 'spam_fwd_mail', ''); 191 $smarty->assign('spam_fwd_mail', $spam_fwd_mail); 192 $smarty->assign('spam_fwd_active', $spam_fwd_active); 175 193 $smarty->assign('bogofilter_active', $bogofilter); 176 194 $smarty->assign('spamassassin_active', $spamassassin); -
trunk/sql_upgrades
r196 r205 168 168 169 169 ALTER TABLE `domains` ADD `p_mlists` TINYINT NOT NULL DEFAULT '0'; 170 171 172 Version 0.09 to 0.10 173 ALTER TABLE `domains` ADD `p_spam_fwd` TINYINT( 1 ) NOT NULL DEFAULT '0'; 174 ALTER TABLE `users` ADD `p_spam_fwd` TINYINT( 1 ) NOT NULL DEFAULT '0'; -
trunk/system_scripts/sa_learn.pl
r148 r205 107 107 $bo_cmd = $find . " $path " . $find_opts . 108 108 " | " . $bogofilter . $bo_type; 109 print $bo_cmd . "\n\n";110 109 system($bo_cmd); 111 110 system("chown -R ". $config{'vmail_user'} . " " . $config{'bogofilter_database'} ); -
trunk/templates/domain_view.tpl
r196 r205 141 141 <td></td> 142 142 <td style="text-align:right;"> 143 {if $ p_imap == 0 }143 {if $domain.p_imap == 0 } 144 144 <a href="?module=domain_view&did={$did}&fstate=1&f=imap"> 145 145 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate IMAP.{/t}" /></a> … … 153 153 <td></td> 154 154 <td style="text-align:right;"> 155 {if $ p_pop3 == 0 }155 {if $domain.p_pop3 == 0 } 156 156 <a href="?module=domain_view&did={$did}&fstate=1&f=pop3"> 157 157 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate POP3.{/t}" /></a> … … 165 165 <td></td> 166 166 <td style="text-align:right;"> 167 {if $ p_webmail == 0 }167 {if $domain.p_webmail == 0 } 168 168 <a href="?module=domain_view&did={$did}&fstate=1&f=webmail"> 169 169 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate webmail.{/t}" /></a> … … 178 178 <td></td> 179 179 <td style="text-align:right;"> 180 {if $ p_mlists == 0 }180 {if $domain.p_mlists == 0 } 181 181 <a href="?module=domain_view&did={$did}&fstate=1&f=mlists"> 182 182 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate mailinglists.{/t}" /></a> … … 192 192 <td></td> 193 193 <td style="text-align:right;"> 194 {if $ p_check_polw == 0 }194 {if $domain.p_check_polw == 0 } 195 195 <a href="?module=domain_view&did={$did}&fstate=1&f=check_polw"> 196 196 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate policyd-weight.{/t}" /></a> … … 206 206 <td></td> 207 207 <td style="text-align:right;"> 208 {if $ p_check_grey == 0 }208 {if $domain.p_check_grey == 0 } 209 209 <a href="?module=domain_view&did={$did}&fstate=1&f=check_grey"> 210 210 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate greylisting.{/t}" /></a> … … 219 219 <td></td> 220 220 <td style="text-align:right;"> 221 {if $ p_webinterface == 0 }221 {if $domain.p_webinterface == 0 } 222 222 <a href="?module=domain_view&did={$did}&fstate=1&f=webinterface"> 223 223 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate CpVES webinterface.{/t}" /></a> … … 231 231 <td></td> 232 232 <td style="text-align:right;"> 233 {if $ p_autores_xheader == 0 }233 {if $domain.p_autores_xheader == 0 } 234 234 <a href="?module=domain_view&did={$did}&fstate=1&f=autores_xheader"> 235 235 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate vacation X-Header feature.{/t}" /></a> … … 243 243 <td></td> 244 244 <td style="text-align:right;"> 245 {if $ p_fetchmail == 0 }245 {if $domain.p_fetchmail == 0 } 246 246 <a href="?module=domain_view&did={$did}&fstate=1&f=fetchmail"> 247 247 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate fetchmail{/t}:" /></a> … … 255 255 <td></td> 256 256 <td style="text-align:right;"> 257 {if $ p_spamassassin == 0 }257 {if $domain.p_spamassassin == 0 } 258 258 <a href="?module=domain_view&did={$did}&fstate=1&f=spamassassin"> 259 259 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate spamassassin.{/t}" /></a> … … 267 267 <td></td> 268 268 <td style="text-align:right;"> 269 {if $ p_sa_learn == 0 }269 {if $domain.p_sa_learn == 0 } 270 270 <a href="?module=domain_view&did={$did}&fstate=1&f=sa_learn"> 271 271 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate ham/spam learning.{/t}" /></a> … … 280 280 <td></td> 281 281 <td style="text-align:right;"> 282 {if $ p_spam_del == 0 }282 {if $domain.p_spam_del == 0 } 283 283 <a href="?module=domain_view&did={$did}&fstate=1&f=spam_del"> 284 284 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate delete spam.{/t}" /></a> … … 290 290 291 291 <tr> 292 <td>{t}foward spam to another address{/t}:</td> 293 <td></td> 294 <td style="text-align:right;"> 295 {if $domain.p_spam_fwd == 0 } 296 <a href="?module=domain_view&did={$did}&fstate=1&f=spam_fwd"> 297 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate forward spam.{/t}" /></a> 298 {else} 299 <a href="?module=domain_view&did={$did}&fstate=0&f=spam_fwd"> 300 <img src="img/icons/button_ok.png" style="border:0px;" title="{t}deactivate forward spam.{/t}" /></a> 301 {/if}</td> 302 </tr> 303 304 <tr> 292 305 <td>{t}bogofilter{/t}:</td> 293 306 <td></td> 294 307 <td style="text-align:right;"> 295 {if $ p_bogofilter == 0 }308 {if $domain.p_bogofilter == 0 } 296 309 <a href="?module=domain_view&did={$did}&fstate=1&f=bogofilter"> 297 310 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate bogofilter.{/t}" /></a> … … 306 319 <td></td> 307 320 <td style="text-align:right;"> 308 {if $ p_mailarchive == 0 }321 {if $domain.p_mailarchive == 0 } 309 322 <a href="?module=domain_view&did={$did}&fstate=1&f=mailarchive"> 310 323 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate archivemail.{/t}" /></a> … … 318 331 <td></td> 319 332 <td style="text-align:right;"> 320 {if $ p_sa_wb_listing == 0 }333 {if $domain.p_sa_wb_listing == 0 } 321 334 <a href="?module=domain_view&did={$did}&fstate=1&f=sa_wb_listing"> 322 335 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate whitelisting.{/t}" /></a> … … 372 385 <td colspan="4"> 373 386 <form action="?module=domain_view&did={$did}" method="post"> 374 <input name="dnote" maxlength="30" value="{$d note}" type="text"/></form>387 <input name="dnote" maxlength="30" value="{$domain.dnote}" type="text"/></form> 375 388 </td> 376 389 </tr> 377 390 {/if} 378 391 379 {if ($if_spamassassin == 1 || ( $if_superadmin == '1' && $ p_spamassassin == 1)) && $p_sa_wb_listing == 1 }392 {if ($if_spamassassin == 1 || ( $if_superadmin == '1' && $domain.p_spamassassin == 1)) && $domain.p_sa_wb_listing == 1 } 380 393 <tr> 381 394 <td colspan="4" class="domain_view"><h3>{t}spamfilter - whitelisting{/t}:</h3></td> -
trunk/templates/email_view.tpl
r193 r205 156 156 {/if} 157 157 {if $if_spam_del == 1 } 158 <tr> 158 159 <td>{t}delete spam{/t}:</td> 159 160 <td><select name="spam_del"> … … 165 166 {/if} 166 167 </select></td> 168 </tr> 169 {/if} 170 {if $if_spam_fwd == 1 } 171 <tr> 172 <td>{t}forward spam to another address{/t}:</td> 173 <td><select name="spam_fwd"> 174 <option value="enable">{t}yes{/t}</option> 175 {if $if_spam_fwd_value == 0} 176 <option value="disable" selected="selected">{t}no{/t}</option> 177 {else} 178 <option value="disable">{t}no{/t}</option> 179 {/if} 180 </select></td> 181 </tr> 167 182 {/if} 168 183 {if $if_bogofilter == '1' } -
trunk/templates/index_admin.tpl
r152 r205 1 1 <table> 2 <tr> 3 <td>{t}domainname{/t}</td> 4 <td>{t}emailaddresses{/t}</td> 5 <td>{t}forwardings{/t}</td> 6 7 </tr> 8 {section name=row loop=$table_data} 9 <tr bgcolor="{cycle values="$color1,$color2"}"> 10 <td style="padding-left:3px;"> 11 <a href="?module=domain_view&did={$table_data[row].id}">{$table_data[row].dnsname}</a></td> 12 <td style="text-align:right;">{$table_data[row].count_email}</td> 13 <td style="text-align:right;">{$table_data[row].count_forward}</td> 14 </tr> 15 16 {/section} 2 <tr> 3 <td>{t}domainname{/t}</td> 4 <td>{t}emailaddresses{/t}</td> 5 <td>{t}forwardings{/t}</td> 6 {if $config.display_mb_size == 1 } 7 <td>{t}size{/t}</td> 8 {/if} 9 </tr> 10 {section name=row loop=$table_data} 11 <tr bgcolor="{cycle values="$color1,$color2"}"> 12 <td style="padding-left:3px;"> 13 <a href="?module=domain_view&did={$table_data[row].id}">{$table_data[row].dnsname}</a></td> 14 <td style="text-align:right;">{$table_data[row].count_email}</td> 15 <td style="text-align:right;">{$table_data[row].count_forward}</td> 16 {if $config.display_mb_size == 1 } 17 <td>{$row.mb_size} MB</td> 18 {/if} 19 </tr> 20 {/section} 17 21 </table> -
trunk/templates/index_sadmin.tpl
r180 r205 4 4 <td>{t}emailaddresses{/t}</td> 5 5 <td>{t}fowardings{/t}</td> 6 {if $config.display_mb_size == 1 } 7 <td>{t}size{/t}</td> 8 {/if} 6 9 <td>{t}activate/deactivate{/t}</td> 7 10 <td>{t}delete{/t}</td> … … 21 24 <td>{$row.count_email}</td> 22 25 <td>{$row.count_forward}</td> 26 {if $config.display_mb_size == 1 } 27 <td>{$row.mb_size} MB</td> 28 {/if} 23 29 <td> 24 30 {if $row.access == "1" } -
trunk/templates/user_spam.tpl
r186 r205 74 74 </td> 75 75 <tr> 76 {if $p_spam_fwd == 1} 77 <tr> 78 <td valign="top">{t}forward known spam{/t}:</td> 79 <td>{if $spam_fwd_active == 0}<input type="radio" name="spam_fwd_active" value="0" checked="checked"/>{t}no{/t} <input type="radio" name="spam_fwd_active" value="1"/>{t}yes{/t}{else}<input type="radio" name="spam_fwd_active" value="0" />{t}no{/t} <input type="radio" name="spam_fwd_active" checked="checked" value="1"/>{t}yes{/t}{/if}<br/> 80 <input type="text" name="spam_fwd_mail" value="{$spam_fwd_mail}"/> 81 </td> 82 </tr> 83 {/if} 76 84 {if $p_spam_del == 1} 77 85 <tr>
