Great Circle Associates Majordomo-Workers
(June 1999)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Suggestions for qmail code
From: rms39 @ columbia . edu (Russell Steinthal)
Date: Sun, 20 Jun 1999 13:05:25 -0400
To: Jason L Tibbitts III <tibbs @ math . uh . edu>
Cc: majordomo-workers @ greatcircle . com
In-reply-to: Your message of "20 Jun 1999 01:51:09 CDT." <ufaogibpdpe.fsf@epithumia.math.uh.edu>

On 20 Jun 1999 01:51:09 CDT, Jason L Tibbitts III wrote:

>>>>>> "RS" == Russell Steinthal <rms39@columbia.edu> writes:
>
>RS> 1. In mj_email's do_qmail routine, you hardcoded "majordomo" 
rather
>RS> than using $whoami as an optimization;
>
>Yes; this is relatively bad and I've wondered about how to change 
it.  The
>real problem is that $whoami is a config variable and thus 
changeable at
>virtually any time.  Unfortunately we can't actually extract its 
value in
>the qmail check code because we want to decide quickly if we should 
handle
>the message or not and starting up the whole system would take way 
too
>long.
>
>There are a couple of options, neither of which makes me really 
happy:
>
>1) Hardcode what was given for 'whoami' during the setup dialogue 
and hope
>   nobody changes it.
>
>2) Have the code write the current value of 'whoami' out to a file
>   somewhere that the qmail startup code users.
>
>I think #1 is probably sufficient.  What do you think?

It would certainly be a step forward (although even that should be 
prominently documented so that people who don't read the code are 
aware of it).  #2 is likely to be more foolproof, but I don't know 
how much code it would require.  (Another option is simply to include 
things like mj2 in the hardcoded list; I'm not sure how many people 
are actually using completely arbitrary values of whoami).

>A third option is to get away from the .qmail-default usage and 
revert to
>your code for setting up all of the dotfiles, but I don't think it's 
worth
>worrying about at this stage.

No, I wouldn't even consider this: the .qmail-default solution is 
orders of magnitude cleaner than mine was.

>Actually I think this is a bug in the file query function.  If I'm
>understanding correctly, you note that the code that asks where the
>.qmail-default file is will warn you that it doesn't exist because 
it's
>looking in the current directory.  Actually it's not supposed to be 
warning
>in the first place; I didn't pass the flag that asks it to do so.  
If you
>look in setup/query_util.pl for &ask_file, you'll probably see a few 
logic
>errors.  Does the patch at the end help?

[snip patch]

Umm... I'm sure I'm being an idiot somehow, but that patch refuses to 
apply for me (hunk 2, to be specific).  I just upgraded to the newest 
version of GNU patch, but still no luck.

-Russell

-- 
Russell Steinthal		Columbia Law School, Class of 2002
<rms39@columbia.edu>		Columbia College, Class of 1999
<steintr@nj.org>		UNIX System Administrator, nj.org

NOTE: My address steintr@avnet.org will stop working in approximately
two weeks...  Use one of the current alternatives listed above!






References:
Indexed By Date Previous: Re: Suggestions for qmail code
From: Jason L Tibbitts III <tibbs@math.uh.edu>
Next: Re: Suggestions for qmail code
From: Jason L Tibbitts III <tibbs@math.uh.edu>
Indexed By Thread Previous: Re: Suggestions for qmail code
From: Jason L Tibbitts III <tibbs@math.uh.edu>
Next: Re: Suggestions for qmail code
From: Jason L Tibbitts III <tibbs@math.uh.edu>

Google
 
Search Internet Search www.greatcircle.com