diff --git a/conf/manager.conf.in b/conf/manager.conf.in index 58cd4705d29b2e5c78ec56b57c4fda73e245427c..3add16eda6693248a025cb8f8a8e2b4d6ad9b580 100644 --- a/conf/manager.conf.in +++ b/conf/manager.conf.in @@ -5,15 +5,9 @@ tokens_validity_period = 2 # Templates directory templates_dir = @templatesdir@ -# From field use by the account manager -notice_from = edugain-access-check.fqdn - # federation metadata local copy path federation_metadata_file = @sysconfdir@/edugain-md.xml -# Path to sendmail executable -sendmail_path = /usr/sbin/sendmail - [app] version = open Beta 1 url = https://my.fqdn/accountmanager @@ -23,6 +17,12 @@ support_email = support@my.fqdn file = /opt/testidp/IdPAccountManager/log/manager.log level = info +[notifier) +# path to sendmail executable +sendmail_path = /usr/sbin/sendmail +# from field use by the account manager +from = edugain-access-check.fqdn + [database] type = mysql host = localhost diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 7d6e146a9d27bec2c0bb60b564662ae055f64c6d..26d5fecc209d56cbc8b42cbf8c92afe75d831a1a 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -414,10 +414,10 @@ sub req_complete_challenge { ); } - my $sender = $self->{configuration}->{_}->{notice_from}; - my $recipient = $self->{in}->{email}; - my $sendmail = $self->{configuration}->{_}->{sendmail_path} || + my $sender = $self->{configuration}->{notifier}->{from}; + my $sendmail = $self->{configuration}->{notifier}->{sendmail_path} || '/usr/sbin/sendmail'; + my $recipient = $self->{in}->{email}; open(my $handle, '|-', "$sendmail -f $sender $recipient") or do { $self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO);