]> git.mjollnir.org Git - s9y.git/commitdiff
New config option "blogMail" that specifies the used From: address.
authorgarvinhicking <garvinhicking>
Thu, 28 Jul 2005 14:51:57 +0000 (14:51 +0000)
committergarvinhicking <garvinhicking>
Thu, 28 Jul 2005 14:51:57 +0000 (14:51 +0000)
Used because MTAs may often reject mailadresse if the original mail
address from commenting users was used.

26 files changed:
docs/NEWS
include/functions.inc.php
include/tpl/config_local.inc.php
lang/serendipity_lang_bg.inc.php
lang/serendipity_lang_cn.inc.php
lang/serendipity_lang_cs.inc.php
lang/serendipity_lang_cz.inc.php
lang/serendipity_lang_da.inc.php
lang/serendipity_lang_de.inc.php
lang/serendipity_lang_en.inc.php
lang/serendipity_lang_es.inc.php
lang/serendipity_lang_fa.inc.php
lang/serendipity_lang_fi.inc.php
lang/serendipity_lang_fr.inc.php
lang/serendipity_lang_is.inc.php
lang/serendipity_lang_it.inc.php
lang/serendipity_lang_ja.inc.php
lang/serendipity_lang_ko.inc.php
lang/serendipity_lang_nl.inc.php
lang/serendipity_lang_no.inc.php
lang/serendipity_lang_pt.inc.php
lang/serendipity_lang_ro.inc.php
lang/serendipity_lang_ru.inc.php
lang/serendipity_lang_tn.inc.php
lang/serendipity_lang_tw.inc.php
lang/serendipity_lang_zh.inc.php

index 94919fa974fbf4e69f0024ace5a0f1ff7010ca82..3af3f520e053b8235365ba4fc50a457e189fb456 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -16,7 +16,12 @@ Version 0.8.3 ()
 
    * Make categories sidebar plugin show categories' description, not the
      name on mouse over (garvinhicking)
-        
+
+   * Added new config option "blogMail" that specifies the blog's used
+     From: E-Mail address. If not given, falls back to not specifying
+     From: field and using mailserver default ("wwwrun", "nobody", ...)
+     (garvinhicking)
+
    * Fix possible exploit that sends comments to the blog owner and others
      with arbitrary mailheaders and a link to invalid entries. Thanks to
      Sebastian Raible! (garvinhicking)
index 73f2df6b5354c45ffab7d2d3442f61059b3b1dbb..c4d532ef19623f4da07c18df5d1c240b01912289 100644 (file)
@@ -160,11 +160,11 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL
         trigger_error(__FUNCTION__ . ': $headers must be either an array or null', E_USER_ERROR);
     }
 
-    if ( is_null($fromName) ) {
+    if ( is_null($fromName) || empty($fromName)) {
         $fromName = $serendipity['blogTitle'];
     }
     
-    if ( is_null($fromMail) ) {
+    if ( is_null($fromMail) || empty($fromMail)) {
         $fromMail = $to;
     }
     
@@ -190,7 +190,10 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL
 
 
     /* Always add these headers */
-    $headers[] = 'From: "'. $fromName .'" <'. $fromMail .'>';
+    if (!empty($serendipity['blogMail'])) {
+        $headers[] = 'From: "'. $fromName .'" <'. $serendipity['blogMail'] .'>';
+    }
+    $headers[] = 'Reply-To: "'. $fromName .'" <'. $fromMail .'>';
     $headers[] = 'X-Mailer: Serendipity/'. $serendipity['version'];
     $headers[] = 'X-Engine: PHP/'. phpversion();
     $headers[] = 'Message-ID: <'. md5(microtime() . uniqid(time())) .'@'. $_SERVER['HTTP_HOST'] .'>';
index 2e90fa6e594cd157ae3ff9099f2fa4ed2dec209f..429dbd6c630d4b81259dacfc8778d7c8b1ba86b0 100644 (file)
                                           'userlevel'   => USERLEVEL_CHIEF,
                                           'flags'       => array('simpleInstall')),
 
+                                    array('var'         => 'blogMail',
+                                          'title'       => INSTALL_BLOG_EMAIL,
+                                          'description' => INSTALL_BLOG_EMAIL_DESC,
+                                          'type'        => 'string',
+                                          'default'     => ''),
+
                                     array('var'         => 'lang',
                                           'title'       => INSTALL_LANG,
                                           'description' => INSTALL_LANG_DESC,
index 81d6f9e002678020d6dcd0b23a253f3b5837df23..e3a91daa728a72c5bb543522a4bdef0358d3bd7e 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 1c53d564bf35e189776187218d6b3bdfabf9d8e6..0886c632e0cf163f6b0a80cd5f8010e9b6c7c158 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index d515e85f3181af09f89fcae6d03b38b5e2381b63..d70aeeb3ece46a76af4f190778ec66765e47b15c 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Odkaz na server'); 
 @define('DELETE_HOTLINK_FILE', 'Vymazán odkazovaný soubor <b>%s</b>'); 
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 3cfdfe6c6c617269ac04c63dd32bb35832390378..05b702764eeee2e4c575a2e85cee597611a804e8 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Odkaz na server'); 
 @define('DELETE_HOTLINK_FILE', 'Vymazán odkazovaný soubor <b>%s</b>'); 
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index f6613281fd555a84e7a7891dfb3fccb159fef0fa..ff256e9d614249b8af5fcfec95ec3b2b4047b358 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink til server');
 @define('DELETE_HOTLINK_FILE', 'Slet den hotlinked fil ved navn <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Vis E-Mail adresser?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 40fd49405742ada8a59d9963a534b4e1fa8f88bd..416c1d086e1ef710a7959fc0f382688ed2cf8ec8 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Nur zum Quellserver linken');
 @define('DELETE_HOTLINK_FILE', 'Link zu Datei namens <b>%s</b> löschen?');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'E-Mail Adressen einbinden?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index e31c1d0f728804c84f08f39832355554a2807a45..4225dfb86bca449be14cdf22ffefbaf4cfbf56b0 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index a8cf920e522a21557accf7dfe2480a59482308e5..628ea8a19a53e293762c975d65314adb736ccff9 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Enlazar externamente al servidor');
 @define('DELETE_HOTLINK_FILE', 'Borrado el recurso enlazado externamente con el nombre <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 12d2db9433bed94ab09d44925a387495106859d5..0c08ba2a8480d3fc2d3e1acd2f6a9c74f328ad92 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'لینک دادن به سرور');
 @define('DELETE_HOTLINK_FILE', 'لینک فایل <b>%s</b> حذف شد');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'آیا آدرس ایمیل ها دیده شود؟');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index c168ff4dedb3c3e37e83e28e972bd236253f905f..3c90761a407276240d808017755029fb6109372c 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 8161e4c2b617a23e7a7de1eeb0ec2681f8bd39c0..29b6b758571d9ba28dae11d9c35883e102ff00d4 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Lien vers le serveur');
 @define('DELETE_HOTLINK_FILE', 'Supression du fichier lié nommé <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Montrer l\'adresse E-Mail?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 96f639717a8bd426707412ae65ee5fc37f919855..c67ed14a3536c02e5b03b998689560a359791bad 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlinka á þjón');
 @define('DELETE_HOTLINK_FILE', 'Eyddi hotlinkaðri skrá, nefnd <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Sýna netföng?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index f91f2f7c5ed713b41fa7c7f5f6fc9f303c21f148..9b506b8753afbecbcb63a42969a9ebeca5caaaa1 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 99e841d4eda5140d077b67ac97846feeb35b7182..a0ddf271a4edfd3cc10dd06f434376852427da53 100644 (file)
@@ -666,3 +666,5 @@ Serendipity のアップグレードステージを無視しました。正し
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', '電子メールアドレスを表示しますか?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index d7f9e2af1693a865cf425e82060385d24aeec5a0..0c815efd77fdb0b9e6c28e79efeeb3f7593f9f09 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index cd76b80238af073090fd15278fbb9d95baa3b841..0ade876466876f67a7db3a3dc8a3458320d7db05 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index c54336531c86503e5ea363886244d38f3c248d36..51651ace91a96fb75140142010de65cccc1017b0 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 46a64799c9e682f145a961a1d493729aecb2db73..ee2667f5e5a769497190be9a6b49ee6fcdf0d5a2 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index f8ad4b4f4e19b824f1ecb154d9eb710c7265f53c..e64d9c56a6afc937831dba69b8984bb0a5499f6b 100644 (file)
 @define('DELETE_HOTLINK_FILE', 'Am şters fişierul legat direct cu numele <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Arată adresele de email?');
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index cd188ba01914642b45f5881f6ba540811ac7cba8..65d1b741eeb21cf7c84a2ca018eafc5b66942a6c 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 57ba8ad5dee83ec63452ee2436b396567d5e0ff2..c87ca46d1f57ae0c6082ac2634126e6d8cfdf67c 100644 (file)
 @define('FETCH_METHOD_HOTLINK', '盜連到主機');
 @define('DELETE_HOTLINK_FILE', '刪除盜連的檔案 <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', '顯示電子郵件嗎?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index d3bc6cdeea6bb1db7ced79666d1bb31df42047d9..5262df43c612d26a389762061e18e504114e0418 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'µs³s¨ì¥D¾÷');
 @define('DELETE_HOTLINK_FILE', '§R°£µs³sªºÀÉ®× <b>%s</b>');
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Åã¥Ü¹q¤l¶l¥ó¶Ü?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
index 14bd5840b34610dc58a75fb83a9a74c067e9a898..07da4a622530bc03bb6b9d5e44632b1784607f7e 100644 (file)
 @define('FETCH_METHOD_HOTLINK', 'Hotlink to server'); // Translate
 @define('DELETE_HOTLINK_FILE', 'Deleted the hotlinked file entitled <b>%s</b>'); // Translate
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
+@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
+@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');