diff --git a/config.inc.php b/config.inc.php index 625b0315..bd9fecc5 100644 --- a/config.inc.php +++ b/config.inc.php @@ -516,6 +516,16 @@ $CONF['show_undeliverable']='YES'; $CONF['show_undeliverable_color']='tomato'; // mails to these domains will never be flagged as undeliverable $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext"); +// show mailboxes with expired password +$CONF['show_expired']='YES'; +$CONF['show_expired_color']='orange'; +// show vacation enabled mailboxes +$CONF['show_vacation']='YES'; +$CONF['show_vacation_color']='turquoise'; +// show disabled accounts +$CONF['show_disabled']='YES'; +$CONF['show_disabled_color']='grey'; +// show POP/IMAP mailboxes $CONF['show_popimap']='YES'; $CONF['show_popimap_color']='darkgrey'; // you can assign special colors to some domains. To do this, diff --git a/functions.inc.php b/functions.inc.php index b57c87af..c753bfef 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -2201,6 +2201,39 @@ function gen_show_status($show_alias) { } } + // Vacation CHECK + if ( $CONF['show_vacation'] == 'YES' ) { + $stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['vacation'] ." WHERE email = '" . $show_alias . "' AND active = 1"); + if ($stat_result['rows'] == 1) { + $stat_string .= "" . $CONF['show_status_text'] . " "; + } else { + $stat_string .= $CONF['show_status_text'] . " "; + } + } + + // Disabled CHECK + if ( $CONF['show_disabled'] == 'YES' ) { + $stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['mailbox'] ." WHERE username = '" . $show_alias . "' AND active = 0"); + if ($stat_result['rows'] == 1) { + $stat_string .= "" . $CONF['show_status_text'] . " "; + } else { + $stat_string .= $CONF['show_status_text'] . " "; + } + } + + // Expired CHECK + if ( $CONF['show_expired'] == 'YES' ) { + $stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['mailbox'] ." WHERE username = '" . $show_alias . "' AND pw_expires_on <= now()"); + if ($stat_result['rows'] == 1) { + $stat_string .= "" . $CONF['show_status_text'] . " "; + } else { + $stat_string .= $CONF['show_status_text'] . " "; + } + } + // POP/IMAP CHECK if ($CONF['show_popimap'] == 'YES') { $stat_delimiter = ""; diff --git a/languages/en.lang b/languages/en.lang index 619f9aa5..99e22ef4 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -348,6 +348,10 @@ $PALANG['broadcast_mailboxes_only'] = 'Only send to mailboxes'; $PALANG['broadcast_to_domains'] = 'Send to domains:'; $PALANG['pStatus_undeliverable'] = 'maybe UNDELIVERABLE '; +$PALANG['pStatus_disabled'] = 'Account disabled '; +$PALANG['pStatus_expired'] = 'Password expired '; +$PALANG['pStatus_vacation'] = 'Vacation enabled '; + $PALANG['pStatus_custom'] = 'Delivers to '; $PALANG['pStatus_popimap'] = 'POP/IMAP '; diff --git a/languages/fr.lang b/languages/fr.lang index 7ae7aa85..942d051f 100644 --- a/languages/fr.lang +++ b/languages/fr.lang @@ -342,6 +342,9 @@ $PALANG['pBroadcast_error_empty'] = 'Les champs "Nom", "Sujet" et "Message" ne p $PALANG['broadcast_mailboxes_only'] = 'Only send to mailboxes'; # XXX $PALANG['broadcast_to_domains'] = 'Send to domains:'; # XXX $PALANG['pStatus_undeliverable'] = 'Non délivrable '; +$PALANG['pStatus_vacation'] = 'Répondeur activé '; +$PALANG['pStatus_disabled'] = 'Compte désactivé '; +$PALANG['pStatus_expired'] = 'Mot de passe expiré '; $PALANG['pStatus_custom'] = 'Délivré à '; $PALANG['pStatus_popimap'] = 'POP/IMAP '; $PALANG['password_too_short'] = 'Mot de passe trop court. - %s caractères minimum'; diff --git a/templates/list-virtual.tpl b/templates/list-virtual.tpl index 8218e738..e31da865 100644 --- a/templates/list-virtual.tpl +++ b/templates/list-virtual.tpl @@ -71,6 +71,16 @@ {if $CONF.show_undeliverable===YES}  {$CONF.show_status_text}={$PALANG.pStatus_undeliverable} {/if} + {if $CONF.show_vacation===YES} +  {$CONF.show_status_text}={$PALANG.pStatus_vacation} + {/if} + {if $CONF.show_disabled===YES} +  {$CONF.show_status_text}={$PALANG.pStatus_disabled} + {/if} + {if $CONF.show_expired===YES} +  {$CONF.show_status_text}={$PALANG.pStatus_expired} + {/if} + {if $CONF.show_popimap===YES}  {$CONF.show_status_text}={$PALANG.pStatus_popimap} {/if}