fix: env for black and whitelist

This commit is contained in:
paulwer 2024-05-19 06:59:37 +02:00
parent ef60992843
commit 22bc9425a2
2 changed files with 4 additions and 2 deletions

View File

@ -34,8 +34,8 @@ class InboundMailEngine
use GeneratesCounter, SavesDocuments; use GeneratesCounter, SavesDocuments;
private ?bool $isUnknownRecipent = null; private ?bool $isUnknownRecipent = null;
private array $globalBlacklist = []; private array $globalBlacklist = explode(",", config('global_inbound_blocklist'));
private array $globalWhitelist = []; // only for global validation, not for allowing to send something into the company, should be used to disabled blocking for mass-senders private array $globalWhitelist = explode(",", config('global_inbound_whitelist')); // only for global validation, not for allowing to send something into the company, should be used to disabled blocking for mass-senders
public function __construct() public function __construct()
{ {
} }

View File

@ -236,6 +236,8 @@ return [
'inbound_mailbox' => [ 'inbound_mailbox' => [
'expense_mailbox_endings' => env('EXPENSE_MAILBOX_ENDINGS', '@expense.invoicing.co'), 'expense_mailbox_endings' => env('EXPENSE_MAILBOX_ENDINGS', '@expense.invoicing.co'),
'inbound_webhook_key' => env('INBOUND_WEBHOOK_KEY', null), 'inbound_webhook_key' => env('INBOUND_WEBHOOK_KEY', null),
'global_inbound_blacklist' => env('GLOBAL_INBOUND_BLACKLIST', ''),
'global_inbound_whitelist' => env('GLOBAL_INBOUND_WHITELIST', ''),
'global_inbound_sender_block_mailcount' => env('GLOBAL_INBOUND_SENDER_BLOCK_MAILCOUNT', 1000), 'global_inbound_sender_block_mailcount' => env('GLOBAL_INBOUND_SENDER_BLOCK_MAILCOUNT', 1000),
'global_inbound_sender_permablock_mailcount' => env('GLOBAL_INBOUND_SENDER_PERMABLOCK_MAILCOUNT', 5000), 'global_inbound_sender_permablock_mailcount' => env('GLOBAL_INBOUND_SENDER_PERMABLOCK_MAILCOUNT', 5000),
'company_inbound_sender_block_unknown_reciepent' => env('COMPANY_INBOUND_SENDER_BLOCK_UNKNOWN_RECIEPENT', 50), 'company_inbound_sender_block_unknown_reciepent' => env('COMPANY_INBOUND_SENDER_BLOCK_UNKNOWN_RECIEPENT', 50),