Red Hat Bugzilla – Bug 176767
edit root alias when installing the OS
Last modified: 2007-11-30 17:11:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
Description of problem:
Wouldn't make sense to edit /etc/aliases while installing the OS and ask
the operator to provide a real email as an alias?
It is a very common error to forget the root alias. As a result, the
email sent by housekeeping software (such as logwatch) is ignored, often
with unpleasant results.
This may or may not require to edit the relayhost variable in the MTA
(ask the operator to provide a default mail relay), I'm not sure
(depending on how "correct" or thorough the installer should be).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: the root alias in /etc/aliases is commented out
Expected Results: the root alias should point to a real email address chosen by the operator
It's probably best to let the operator enter an arbitrary email address instead of redirecting root to another account on the same system, since that account's email may or may not be read by a MUA
Thread on fedora-devel:
(In reply to comment #0)
> As a result, the
> email sent by housekeeping software (such as logwatch) is ignored, often
> with unpleasant results.
The problem actually is even worse IMHO -- in the network at my workplace the
MTA determinates automatically the in-house mail server and sends these mails to
its root user; that's often someone else. Our admin is annoyed by all the mail
already because he often doesn't even know who maintains the machines that send
IMHO the first user created during firstboot should get root's mails. Or it
should be questioned by firstboot who gets root mail.
As noted in the referenced email thread, I think its best not to let users put
in arbitrary email addresses to send to, because of possible routing loops and
other misadventures in email. Giving the option to deliver root mail to the user
created during firstboot is much safer. In fact, I even cobbled together a
little patch to implement said feature. Attachment coming shortly. :)
Created attachment 122698 [details]
Quick hack to implement option to deliver email to user created in firstboot
The patch staticly points to /etc/aliases, but could be easily modified to look
elsewhere for other MTAs, but all I see in rawhide core atm is sendmail and
postfix, which both use /etc/alises. If a root alias is already found, it tells
the user and doesn't apply any changes. If none is defined and the box is
checked, a 'root: username' line gets appended to /etc/aliases. Now that I look
at it though, it needs to postalias the file for postfix, can't remember if
anything needs doing for sendmail... But its a start, eh?
Created attachment 122703 [details]
Patch w/newaliases included
Looks like simply closing out the code changes on the line after
'output.close()' with an extra line
'functions.start_process("/usr/bin/newaliases")' will actually do the trick, as
the alternatives system should make newaliases do the right thing for both
sendmail and postfix.
*** This bug has been marked as a duplicate of 135592 ***