mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Fax Server: Add ability to authorize domains for Email-to-Fax.
This commit is contained in:
@@ -3214,8 +3214,8 @@ $text['description-email_outbound_subject_tag']['ru-ru'] = "Установите
|
||||
$text['description-email_outbound_subject_tag']['sv-se'] = "Ange E-post ämne för utgående fax.";
|
||||
$text['description-email_outbound_subject_tag']['uk-ua'] = "";
|
||||
|
||||
$text['description-email_outbound_authorized_senders']['en-us'] = "Define the email address(es) allowed to send faxes through this server.";
|
||||
$text['description-email_outbound_authorized_senders']['en-gb'] = "Define the email address(es) allowed to send faxes through this server.";
|
||||
$text['description-email_outbound_authorized_senders']['en-us'] = "Define the email address(es) and/or domains allowed to send faxes through this server.";
|
||||
$text['description-email_outbound_authorized_senders']['en-gb'] = "Define the email address(es) and/or domains allowed to send faxes through this server.";
|
||||
$text['description-email_outbound_authorized_senders']['ar-eg'] = "";
|
||||
$text['description-email_outbound_authorized_senders']['de-at'] = "Geben Sie die Email Addresse(n) an, von welchen Faxe gesendet werden dürfen."; //copied from de-de
|
||||
$text['description-email_outbound_authorized_senders']['de-ch'] = "Geben Sie die Email Addresse(n) an, von welchen Faxe gesendet werden dürfen."; //copied from de-de
|
||||
|
||||
@@ -278,7 +278,9 @@
|
||||
//prep authorized senders
|
||||
if (sizeof($fax_email_outbound_authorized_senders) > 0) {
|
||||
foreach ($fax_email_outbound_authorized_senders as $sender_num => $sender) {
|
||||
if ($sender == '' || !valid_email($sender)) { unset($fax_email_outbound_authorized_senders[$sender_num]); }
|
||||
if ($sender == '' || (substr_count($sender, '@') == 1 && !valid_email($sender)) || substr_count($sender, '.') == 0) {
|
||||
unset($fax_email_outbound_authorized_senders[$sender_num]);
|
||||
}
|
||||
}
|
||||
$fax_email_outbound_authorized_senders = strtolower(implode(',', $fax_email_outbound_authorized_senders));
|
||||
}
|
||||
|
||||
@@ -170,9 +170,9 @@ if (is_array($result) && @sizeof($result) != 0) {
|
||||
$metadata[0]['from'] = strtolower($tmp[0]['mailbox']."@".$tmp[0]['host']);
|
||||
|
||||
//check sender
|
||||
$sender_authorized = false;
|
||||
if (in_array($metadata[0]['from'],$authorized_senders)) { $sender_authorized = true; }
|
||||
|
||||
$sender_email = $metadata[0]['from'];
|
||||
$sender_domain = explode('@', $sender_email)[1];
|
||||
$sender_authorized = in_array($sender_email, $authorized_senders) || in_array($sender_domain, $authorized_senders) ? true : false;
|
||||
if ($sender_authorized) {
|
||||
|
||||
//add multi-lingual support
|
||||
|
||||
Reference in New Issue
Block a user