use Cubist\Net\Util;
use Cubist\Util\Files\Files;
use Cubist\Util\Str;
+
// __('!! Équipe')
class TeamEmails extends CubistMagicAbstractModel
{
$this->addField('ip_whitelist', Table::class, __('Liste blanche IP'), ['tab' => __('Listes blanches et noires'), 'entity_singular' => __('une IP'), 'columns' => ['ip' => __('IP ou nom d\'hôte')], 'translatable' => false, 'hint' => __('IP qui sont sur la liste blanche (fail2ban, my_networks)')]);
$this->addField('postgrey_whitelist', Code::class, __('Liste blanche postgrey'), ['translatable' => false, 'tab' => __('Listes blanches et noires'), 'language' => 'properties', 'hint' => __('Serveurs ignorés par le Grey listing')]);
$this->addField('spam_whitelist', Table::class, __('Liste blanche SPAM'), ['tab' => __('Listes blanches et noires'), 'entity_singular' => __('un e-mail'), 'columns' => ['email' => __('E-mail')], 'translatable' => false, 'hint' => __('Les e-mails provenant de ces expéditeurs ne sont jamais considérés comme des spam (expressions régulières possibles)')]);
+ $this->addField('auth_whitelist', Table::class, __('Liste blanche DMARC/DKIM'), ['tab' => __('Listes blanches et noires'), 'entity_singular' => __('un domaine'), 'columns' => ['domain' => __('Domaine')], 'translatable' => false, 'hint' => __('Les e-mails provenant de ces domaines ne sont pas vérifiés par DMARC et DKIM')]);
$this->addField('spam_blacklist', Table::class, __('Liste noire SPAM'), ['tab' => __('Listes blanches et noires'), 'entity_singular' => __('un e-mail'), 'columns' => ['email' => __('E-mail')], 'translatable' => false, 'hint' => __('Ces e-mails sont toujours considérés comme des spam (expressions régulières possibles)')]);
}
$spam_wl[] = 'whitelist_from ' . $item['email'];
}
+
$accounts = [];
foreach ($mailboxes as $k => $m) {
if (!isset($m['password'])) {
// Postgrey whitelist
file_put_contents(storage_path('emailconfig/whitelist_clients.local'), str_replace("\r\n", "\n", $this->postgrey_whitelist));
+ // OpenDMARC
+ file_put_contents(storage_path('emailconfig/opendmarc_whitelist'), json_decode($this->auth_whitelist, true));
+
// IP Whitelist
$my_networks = [];
foreach ($ip as $item) {