[ postfixadmin-Bugs-2958684 ] $CONF['admin_email'] ignored in most cases
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2011-09-29 22:50:18
|
Bugs item #2958684, was opened at 2010-02-25 13:49 Message generated for change (Comment added) made by christian_boltz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2958684&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 1 Private: No Submitted By: Christian Boltz (christian_boltz) Assigned to: Nobody/Anonymous (nobody) Summary: $CONF['admin_email'] ignored in most cases Initial Comment: [13:42] <mrfrenzy> in the configfile it says // This will be used to send emails from to create mailboxes. [13:42] <mrfrenzy> $CONF['admin_email'] [13:42] <mrfrenzy> however, when I create mailboxes the welcome mail is sent with my username as sender [13:44] <cboltz> indeed. a quick grep shows that it is only used by broadcast-message.php [13:44] <cboltz> the question is which behaviour is better [13:44] <cboltz> a) always use the admin_email sender [13:44] <cboltz> b) drop admin_email and use the admin username [13:44] <cboltz> what would you prefer? ;-) [13:45] <mrfrenzy> it really isn't that important, aslong as the instructions in the config filer are correct [13:46] <mrfrenzy> however. I do think there might be reasons you don't want to tell the users what username your adminuser has [13:46] <cboltz> good argument ;-) [13:47] <cboltz> I'll paste the above lines in the bugtracker... [13:47] <mrfrenzy> I really love this irc based bugtracker submission engine :P ---------------------------------------------------------------------- >Comment By: Christian Boltz (christian_boltz) Date: 2011-09-30 00:50 Message: @tabmowtez: having an extra field per domain sounds over-engineered to me compared to the additional functionality it would bring. If you really want to avoid that people @domaina don't get welcome mails from admin@domainb, simply login as admin@domaina ;-) @lnxus: I'd guess the typical setup only has one superadmin, therefore your idea wouldn't change too much ;-) Besides that, I'd like to avoid additional complexity whenever possible. We already have enough config options and enough differences in behaviour between domain admin and superadmin. I decided to implement it as described long time ago (2010-03-02): $CONF['admin_email'] = '' -> use the mail address of the logged in admin $CONF['admin_email'] = "fo...@ex..." -> always use fo...@ex... I implemented this for sendmail.php and broadcast-message.php some time ago, and I just implemented it in create-mailbox.php (SVN trunk r1197) which means it is done everywhere. Well, all these files now call smtp_get_admin_email() in functions.inc.php. (I won't backport this change to 2.3.x because it would change the behaviour.) If you really need more options to set the mail sender, please speak up. You'll have better chances to get your wish fulfilled if you include a proposal how to do it without additional config options, database fields or confusion for people editing config.inc.php ;-) ---------------------------------------------------------------------- Comment By: Dale Blount (lnxus) Date: 2011-06-01 19:37 Message: I feel that super admin's loginname/email address should not be sent via email at all. Is it feasable to use $CONF['admin_email'] if logged in as a superadmin or use the domain admin's email if logged in as a domain admin? If not, $CONF['admin_email'] all the time for all purposes is fine by me. ---------------------------------------------------------------------- Comment By: Tabmow (tabmowtez) Date: 2010-03-02 23:06 Message: Well, it is a solution. I guess it depends on what sort of hosting situation we are trying to cater for. If people use postfixadmin to setup client domains, then it is feasible that people that create mailboxes in domain b don't want the welcome message to come from ad...@do.... One way is to have an extra field in the domain table called admin_email possibly? Obviously the $fFrom in create-mailbox.php would change but I see this as a full solution to cater for everyone. If that field is blank then it can resort back to $CONF['admin_email']. Alternatively you can make it a required field moving forward? Thoughts? ---------------------------------------------------------------------- Comment By: Christian Boltz (christian_boltz) Date: 2010-03-02 16:09 Message: Idea: $CONF['admin_email'] = '' -> use the mail address of the logged in admin $CONF['admin_email'] = "fo...@ex..." -> always use fo...@ex... What do you think about this solution? ---------------------------------------------------------------------- Comment By: Tabmow (tabmowtez) Date: 2010-03-02 05:52 Message: Quick change in create-mailbox.php should fix this. --- create-mailbox.php 2009-04-07 05:54:11.000000000 +1000 +++ /usr/local/www/postfixadmin/create-mailbox.php 2010-03-02 15:48:26.000000000 +1100 @@ -230,7 +230,7 @@ if ($fMail == "on") { $fTo = $fUsername; - $f>From = $SESSID_USERNAME; + $fFrom = $CONF['admin_email']; $fHeaders = "To: " . $fTo . "\n"; $fHeaders .= "From: " . $fFrom . "\n"; Might be possible to add another config option and being able to define an address as well? Possible a per domain address? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2958684&group_id=191583 |