Mailing List Archive

qlist and secure lists
I was just going over Russ' script for securing a mailing list:

|grep "^[#&]$SENDER$" ".qmail-$EXT" || (echo "You are not authorized to
send mail to this list."; exit 1)
&address
&address
...


Then I wanted to use qmail to handle subscriptions, BUT qmail seems
to dislike this arrangement because qlist sets the x bit and qmail
rejects the pipe *because* the x bit is set. Fun, huh?

Here's the question. Is it acceptable to chmod u-x the file in the
.qmail-listname-request file? Would this work? Can anyone think of
any drawbacks?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> TEAM-OS2
Online Searchable Campground Listings http://www.camping-usa.com
==========================================================================
Re: qlist and secure lists [ In reply to ]
Jeff T. Carneal writes:
> On 22 Feb 1997, Russell Nelson wrote:
>
> > > Here's the question. Is it acceptable to chmod u-x the file in the
> > > .qmail-listname-request file? Would this work? Can anyone think of
> > > any drawbacks?
>
> I ran into this same problem today...
>
> > Sure. You're destroying the security increase caused by disallowing
> > commands in the .qmail-listname file. What you should do is either
>
> I'm curious as to how it destroys the security. I'm not questiong you (as
> I'm pretty new to qmail), but I'm curious and would appreciate an
> explanation.

Sure. qlist refuses to write anything but a forward line to a .qmail
file. That's one security measure. Another security measure is
setting the mode of the file to u+x. When qmail-alias interprets a
file with user-execute permissions, it defers the mail if it finds
anything other than a forward line in the file. A +list line turns on
the same feature. There is no -list line for obvious reasons.

Why have two security measures to achieve the same effect (no remote
additions of program or file writes)? Same reason you have locks AND
guards. Sometimes locks fail.

> > use my qlist patch (on http://www.qmail.org), or else accomplish the
> > same thing by inserting a +list command, like this:
> >
> > |grep "^[#&]$SENDER$" ".qmail-$EXT" || (echo "You are not authorized to send mail to this list."; exit 1)
> > +list
> > &address
> > &address

BTW, my patch to qlist causes it to look for, or append if missing, a
+list line in the .qmail file before adding a forward line. The idea
is to achieve the same security effect as adding u+x permissions to
the file.

--
-russ <nelson@crynwr.com> http://www.crynwr.com/~nelson
Crynwr Software sells network driver support | PGP ok
521 Pleasant Valley Rd. | +1 315 268 1925 voice | Peace, Justice, Freedom:
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | pick two (only mostly true)