mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Change Message-ID regenerate logic (#1432)
Add additional configuration to hide x-mailer header (#1426)
This commit is contained in:
parent
74700afa6c
commit
879ffb3e37
2 changed files with 15 additions and 4 deletions
|
|
@ -5877,9 +5877,11 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
$sReferences = $this->GetActionParam('References', '');
|
$sReferences = $this->GetActionParam('References', '');
|
||||||
|
|
||||||
$oMessage = \MailSo\Mime\Message::NewInstance();
|
$oMessage = \MailSo\Mime\Message::NewInstance();
|
||||||
$oMessage->RegenerateMessageId();
|
|
||||||
|
|
||||||
$oMessage->SetXMailer('RainLoop/'.APP_VERSION);
|
if (!$this->Config()->Get('security', 'hide_x_mailer_header', false))
|
||||||
|
{
|
||||||
|
$oMessage->SetXMailer('RainLoop/'.APP_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
$oFromIdentity = $this->GetIdentityByID($oAccount, $sIdentityID);
|
$oFromIdentity = $this->GetIdentityByID($oAccount, $sIdentityID);
|
||||||
if ($oFromIdentity)
|
if ($oFromIdentity)
|
||||||
|
|
@ -5892,6 +5894,9 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
$oMessage->SetFrom(\MailSo\Mime\Email::Parse($oAccount->Email()));
|
$oMessage->SetFrom(\MailSo\Mime\Email::Parse($oAccount->Email()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oFrom = $oMessage->GetFrom();
|
||||||
|
$oMessage->RegenerateMessageId($oFrom ? $oFrom->GetDomain() : '');
|
||||||
|
|
||||||
if (!empty($sReplyTo))
|
if (!empty($sReplyTo))
|
||||||
{
|
{
|
||||||
$oReplyTo = \MailSo\Mime\EmailCollection::NewInstance($sReplyTo);
|
$oReplyTo = \MailSo\Mime\EmailCollection::NewInstance($sReplyTo);
|
||||||
|
|
@ -6063,12 +6068,17 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
}
|
}
|
||||||
|
|
||||||
$oMessage = \MailSo\Mime\Message::NewInstance();
|
$oMessage = \MailSo\Mime\Message::NewInstance();
|
||||||
$oMessage->RegenerateMessageId();
|
|
||||||
|
|
||||||
$oMessage->SetXMailer('RainLoop/'.APP_VERSION);
|
if (!$this->Config()->Get('security', 'hide_x_mailer_header', false))
|
||||||
|
{
|
||||||
|
$oMessage->SetXMailer('RainLoop/'.APP_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
$oMessage->SetFrom(\MailSo\Mime\Email::NewInstance($oIdentity->Email(), $oIdentity->Name()));
|
$oMessage->SetFrom(\MailSo\Mime\Email::NewInstance($oIdentity->Email(), $oIdentity->Name()));
|
||||||
|
|
||||||
|
$oFrom = $oMessage->GetFrom();
|
||||||
|
$oMessage->RegenerateMessageId($oFrom ? $oFrom->GetDomain() : '');
|
||||||
|
|
||||||
$sReplyTo = $oIdentity->ReplyTo();
|
$sReplyTo = $oIdentity->ReplyTo();
|
||||||
if (!empty($sReplyTo))
|
if (!empty($sReplyTo))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
||||||
'allow_admin_panel' => array(true, 'Access settings'),
|
'allow_admin_panel' => array(true, 'Access settings'),
|
||||||
'allow_two_factor_auth' => array(false),
|
'allow_two_factor_auth' => array(false),
|
||||||
'force_two_factor_auth' => array(false),
|
'force_two_factor_auth' => array(false),
|
||||||
|
'hide_x_mailer_header' => array(false),
|
||||||
'admin_panel_host' => array(''),
|
'admin_panel_host' => array(''),
|
||||||
'admin_panel_key' => array('admin'),
|
'admin_panel_key' => array('admin'),
|
||||||
'content_security_policy' => array(''),
|
'content_security_policy' => array(''),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue