Skip to content
Snippets Groups Projects
Commit 50ba2904 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

make sendmail path configurable

parent bbd710eb
Branches
Tags
No related merge requests found
...@@ -75,3 +75,6 @@ federation_metadata_file_path = @sysconfdir@/edugain-md.xml ...@@ -75,3 +75,6 @@ federation_metadata_file_path = @sysconfdir@/edugain-md.xml
# Valid account profiles # Valid account profiles
account_profiles = fullset1, limitedset1, generic1, student1, student2, teacher1, teacher2, alumni1, librarywalkin1, employee1, researcher1 account_profiles = fullset1, limitedset1, generic1, student1, student2, teacher1, teacher2, alumni1, librarywalkin1, employee1, researcher1
# Path to sendmail executable
sendmail_path = /usr/sbin/sendmail
...@@ -364,8 +364,9 @@ sub req_generate_token { ...@@ -364,8 +364,9 @@ sub req_generate_token {
my $sender = $self->{configuration}->{notice_from}; my $sender = $self->{configuration}->{notice_from};
my $recipient = $self->{in}->{email_address}; my $recipient = $self->{in}->{email_address};
my $sendmail = $self->{configuration}->{sendmail_path};
open(my $handle, '|-', "/usr/sbin/sendmail -f $sender $recipient") or do { open(my $handle, '|-', "$sendmail -f $sender $recipient") or do {
push @{ $self->{out}->{errors} }, "mail_notification_error"; push @{ $self->{out}->{errors} }, "mail_notification_error";
$self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO); $self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO);
return undef; return undef;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment