From 32923e732b846af791b58e7b2daed8585d1819f6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2015 11:49:47 -0400 Subject: [PATCH] emailauth: Added emailauth_sender config. --- IkiWiki/Plugin/emailauth.pm | 10 +++++++++- debian/changelog | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/emailauth.pm b/IkiWiki/Plugin/emailauth.pm index a589199d3..6674fe3d6 100644 --- a/IkiWiki/Plugin/emailauth.pm +++ b/IkiWiki/Plugin/emailauth.pm @@ -26,6 +26,12 @@ sub getsetup () { rebuild => 0, section => "auth", }, + emailauth_sender => { + type => "string", + description => "email address to send emailauth mails as (default: adminemail)", + safe => 1, + rebuild => 0, + }, } sub email_setup ($$) { @@ -80,10 +86,12 @@ sub email_auth ($$$$) { error($@) if $@; my $shorturl=$config{url}; $shorturl=~s/^https?:\/\///i; + my $emailauth_sender=$config{emailauth_sender}; + $emailauth_sender=$config{adminemail} unless defined $emailauth_sender; sendmail( To => $email, From => "$config{wikiname} admin <". - (defined $config{adminemail} ? $config{adminemail} : "") + (defined $emailauth_sender ? $emailauth_sender : "") .">", Subject => "$config{wikiname} login | $shorturl", Message => $template->output, diff --git a/debian/changelog b/debian/changelog index d61da928f..a605b5176 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ ikiwiki (3.20150615) UNRELEASED; urgency=medium * img test: Bail gracefully when ImageMagick is not present. * meta: Fix [[!meta name=foo]] by closing the open quote. + [ Joey Hess ] + * emailauth: Added emailauth_sender config. + -- Simon McVittie Mon, 15 Jun 2015 18:13:23 +0100 ikiwiki (3.20150614) unstable; urgency=medium -- 2.39.5