You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
Adds colored indicators for password expired, account disabled and vacation enabled accounts
This commit is contained in:
@@ -516,6 +516,16 @@ $CONF['show_undeliverable']='YES';
|
|||||||
$CONF['show_undeliverable_color']='tomato';
|
$CONF['show_undeliverable_color']='tomato';
|
||||||
// mails to these domains will never be flagged as undeliverable
|
// mails to these domains will never be flagged as undeliverable
|
||||||
$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext");
|
$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']='YES';
|
||||||
$CONF['show_popimap_color']='darkgrey';
|
$CONF['show_popimap_color']='darkgrey';
|
||||||
// you can assign special colors to some domains. To do this,
|
// you can assign special colors to some domains. To do this,
|
||||||
|
@@ -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 .= "<span style='background-color:" . $CONF['show_vacation_color'] .
|
||||||
|
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||||
|
} 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 .= "<span style='background-color:" . $CONF['show_disabled_color'] .
|
||||||
|
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||||
|
} 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 .= "<span style='background-color:" . $CONF['show_expired_color'] .
|
||||||
|
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||||
|
} else {
|
||||||
|
$stat_string .= $CONF['show_status_text'] . " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// POP/IMAP CHECK
|
// POP/IMAP CHECK
|
||||||
if ($CONF['show_popimap'] == 'YES') {
|
if ($CONF['show_popimap'] == 'YES') {
|
||||||
$stat_delimiter = "";
|
$stat_delimiter = "";
|
||||||
|
@@ -348,6 +348,10 @@ $PALANG['broadcast_mailboxes_only'] = 'Only send to mailboxes';
|
|||||||
$PALANG['broadcast_to_domains'] = 'Send to domains:';
|
$PALANG['broadcast_to_domains'] = 'Send to domains:';
|
||||||
|
|
||||||
$PALANG['pStatus_undeliverable'] = 'maybe UNDELIVERABLE ';
|
$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_custom'] = 'Delivers to ';
|
||||||
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
||||||
|
|
||||||
|
@@ -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_mailboxes_only'] = 'Only send to mailboxes'; # XXX
|
||||||
$PALANG['broadcast_to_domains'] = 'Send to domains:'; # XXX
|
$PALANG['broadcast_to_domains'] = 'Send to domains:'; # XXX
|
||||||
$PALANG['pStatus_undeliverable'] = 'Non délivrable ';
|
$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_custom'] = 'Délivré à ';
|
||||||
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
||||||
$PALANG['password_too_short'] = 'Mot de passe trop court. - %s caractères minimum';
|
$PALANG['password_too_short'] = 'Mot de passe trop court. - %s caractères minimum';
|
||||||
|
@@ -71,6 +71,16 @@
|
|||||||
{if $CONF.show_undeliverable===YES}
|
{if $CONF.show_undeliverable===YES}
|
||||||
<span style='background-color:{$CONF.show_undeliverable_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_undeliverable}
|
<span style='background-color:{$CONF.show_undeliverable_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_undeliverable}
|
||||||
{/if}
|
{/if}
|
||||||
|
{if $CONF.show_vacation===YES}
|
||||||
|
<span style='background-color:{$CONF.show_vacation_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_vacation}
|
||||||
|
{/if}
|
||||||
|
{if $CONF.show_disabled===YES}
|
||||||
|
<span style='background-color:{$CONF.show_disabled_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_disabled}
|
||||||
|
{/if}
|
||||||
|
{if $CONF.show_expired===YES}
|
||||||
|
<span style='background-color:{$CONF.show_expired_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_expired}
|
||||||
|
{/if}
|
||||||
|
|
||||||
{if $CONF.show_popimap===YES}
|
{if $CONF.show_popimap===YES}
|
||||||
<span style='background-color:{$CONF.show_popimap_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_popimap}
|
<span style='background-color:{$CONF.show_popimap_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_popimap}
|
||||||
{/if}
|
{/if}
|
||||||
|
Reference in New Issue
Block a user