]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
emailauth: Added emailauth_sender config.
authorJoey Hess <joeyh@joeyh.name>
Fri, 2 Oct 2015 15:49:47 +0000 (11:49 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 2 Oct 2015 15:49:47 +0000 (11:49 -0400)
IkiWiki/Plugin/emailauth.pm
debian/changelog

index a589199d3d85a2cac98800657224f778734e3500..6674fe3d6b07b91ec9daf0d3276fa8936fc66378 100644 (file)
@@ -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,
index d61da928f0baad7da82eaa4e901ae913786f3b68..a605b517636f7fc0a91d82ec3d1d4ad45425d949 100644 (file)
@@ -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 <smcv@debian.org>  Mon, 15 Jun 2015 18:13:23 +0100
 
 ikiwiki (3.20150614) unstable; urgency=medium