[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Who uses /etc/email-addresses?

On Tue, Feb 03, 2004 at 02:39:32AM +0100, Jan Minar wrote:
| On Mon, Feb 02, 2004 at 03:07:28PM -0500, Derrick 'dman' Hudson wrote:
| > On Sun, Feb 01, 2004 at 04:21:07AM +0100, Jan Minar wrote:
| > | On Fri, Jan 30, 2004 at 03:12:04PM -0800, Nano Nano wrote:
| > | > Who uses /etc/email-addresses?
| > | 
| > | reportbug(1) does, for example.
| > 
| > reportbug does not.
| It would behoove you, Derrick, to measure twice before you type.  The
| tracks of the bugs...
| #224223: reportbug: Crash when /etc/email-addresses is not readable

Very interesting.  I wholly did not expect reportbug to be so tied to
certain platforms and configurations.  I do know that reportbug uses
/usr/sbin/sendmail to send the mail (ie it delegates to your MTA), and
that exim uses /etc/email-addresses, and thus it would -appear- that
reportbug used it when a mail is sent.  In fact, I don't even have
that file on my system because I don't use it.

| ... speak for themselves.  If you were bold enough, you could dive into
| the sources, and see for yourself.

reporbug version 2.39,
beginning at line 166

def find_rewritten(username):
    for filename in ['/etc/email-addresses']:
        if os.path.exists(filename):
                fp = file(filename)
            except IOError:

| An apology is awaited, with my eyebrows raised.

So it does indeed use that file, iff it exists.  I was wrong about
that.  I guess it is trying to be "extra smart" in constructing the
From: header.  (I guess, because I didn't read the rest of the
source).  I would actually call that a defect, because the code
-assumes- that file, if readable, is relevant but in actuality the
exim config may not even consult that file or may consult a different
file altogether.  This sort of blind assumption has some resemblance
to certain other platforms :-/.

I do stand corrected - reportbug does -sometimes- use that file.

This thread demonstrates two of the benefits of open source -- first
an errant declaration (mine, above) is corrected by the community and
second can be clearly demonstrated by actually looking at the source.


PS. A fitting verse, in my .sig, for this thread, is it not? 
    It was randomly choosen by signify(1) with no guidance from me.

The Lord detests all the proud of heart.
Be sure of this: They will not go unpunished.
        Proverbs 16:7
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: signature.asc
Description: Digital signature

Reply to: