Skip to content

Commit

Permalink
use custom daemonaddress
Browse files Browse the repository at this point in the history
fallback to read daemonaddressdomain from INI
  • Loading branch information
RvdHout authored and martinknafve committed Nov 2, 2019
1 parent 82d2686 commit 62066f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Expand Up @@ -139,6 +139,8 @@ namespace HM

max_no_of_external_fetch_threads_ = ReadIniSettingInteger_("Settings", "MaxNumberOfExternalFetchThreads", 15);
add_xauth_user_header_ = ReadIniSettingInteger_("Settings", "AddXAuthUserHeader", 0) == 1;

daemonaddress_domain_ = ReadIniSettingString_("Settings", "DaemonAddressDomain", "");

greylisting_enabled_during_record_expiration_ = ReadIniSettingInteger_("Settings", "GreylistingEnabledDuringRecordExpiration", 1) == 1;
greylisting_expiration_interval_ = ReadIniSettingInteger_("Settings", "GreylistingRecordExpirationInterval", 240);
Expand Down
Expand Up @@ -71,6 +71,7 @@ namespace HM
int GetDBConnectionAttemptsDelay() const;

bool GetAddXAuthUserHeader() {return add_xauth_user_header_; }
String GetDaemonAddressDomain() const { return daemonaddress_domain_; }
int GetMaxNumberOfExternalFetchThreads() {return max_no_of_external_fetch_threads_ ;}
bool GetGreylistingEnabledDuringRecordExpiration() {return greylisting_enabled_during_record_expiration_;}
int GetGreylistingExpirationInterval() {return greylisting_expiration_interval_; }
Expand Down Expand Up @@ -141,6 +142,7 @@ namespace HM
int no_of_dbconnection_attempts_;
int no_of_dbconnection_attempts_Delay;
bool add_xauth_user_header_;
String daemonaddress_domain_;
int max_no_of_external_fetch_threads_;

bool greylisting_enabled_during_record_expiration_;
Expand Down
Expand Up @@ -69,6 +69,11 @@ namespace HM
sHostName = Utilities::ComputerName();
}

if (!IniFileSettings::Instance()->GetDaemonAddressDomain().IsEmpty())
{
sHostName = IniFileSettings::Instance()->GetDaemonAddressDomain();
}

String sRetVal;
sRetVal.Format(_T("mailer-daemon@%s"), sHostName.c_str());

Expand Down

0 comments on commit 62066f6

Please sign in to comment.