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

[cobalt-users] raq3 catch-all alias problems (& solution)



Hi all,

I did a little investigation into the catch-all alias problems that have
been reported, and I found an issue with the raq3 (and maybe the raq2, but
I don't have one here to look at).

The unpredictible nature of the problem has to do with the order of aliases
in /etc/virtusertable.  When looking for the user assigned to a particular
alias sendmail will parse this file from top to bottom (well not this file
exactly, but the binary representation of it), stopping on the first match
that it finds.  This means that if the catch-all alias (i.e. @www.x.com)
appears above any user aliases (i.e. doug@xxxxxxxxx) the match will stop
there and send the mail to the catch-all address, and NOT to the user...

The problem is that the raq3 does not do any sorting of catch-all addresses
when it writes this file, and instead places them in random order,
intermixed with the user aliases.  This results in configurations that work
sometimes for some but do not work for others.  The fix for this is fairly
straightforward, and is attached to this message in the form of a patch.

The patch fixes another issue as well, this one having to do with the UI
and its acceptance of the catch-all aliases.  Since this feature (catch-all
aliases) never made it into the original raq3 engineering specification it
never made it into the test plan crafted by SQA, and as as result was never
tested....  If you add a user and give them a catch-all alias they will
appear correct in the UI, but will not be correct in the virtusertable. 
Instead they will have the alias doubled. i.e.

@www.x.com@xxxxxxxxx     username

this does not happen if you use the email settings screen for a user after
they have already been added.  The other issue is that the UI does not
restrict the catch-all addresses to the fully-qualified domain name of the
virtual site, i.e. only @www.x.com, not @x.com.

Unfortunately this patch didn't make it into the OS Update 2.0 (which BTW
is *finally* back up on the web server, it would seem that it was stuck on
a desk somewhere awaiting approval....)  Since it is posted again I
recommend you install it before you install this patch, otherwise the
update will overwrite these changes.  These will be included in the next OS
Update, which is in the works now, but may be awhile.

The patch is also available from my home directory on ftp.cobaltnet.com:
ftp://ftp.cobaltnet.com/pub/users/duncan/raq3/raq3-catchall.patch.bz2

The files modified by this patch are:
/usr/lib/perl5/site_perl/5.005/Cobalt/Email.pm
/usr/lib/perl5/site_perl/5.005/Cobalt/User.pm
/usr/admserv/cgi-bin/.cobalt/siteUserEmail/siteUserEmail.cgi

I have to make the disclaimer that this is unsupported, but I did some
testing and didn't notice any problems.  Plus, if you are careful with the
install procedure it is possible to returnn to the previous configuration. 
To install, upload this patch to your raq3, log in as root, and run the
following:

bunzip2 -dc /tmp/raq3-catchall.patch.bz2 | patch -p0 -b

replacing /tmp with the directory you saved the patch into.  The -b option
will save a copy of the original files (in their original directory with a
.orig extension), just in case an unforseen event were to occur.  This is
just an added precaution--it should not be necessary to use these because
if you find a problem you can revert the files back to their original state
with the following command:

bunzip2 -dc /tmp/raq3-catchall.patch.bz2 | patch -p0 -R

as always, since support isn't aware of this yet, please direct
problems/questions directly to  me...


-duncan

p.s. debbie (and others): the OS update 2.0 will fix the bug that is
causing your users to disappear from the UI, and the script that I sent out
last week can be used to regenerate the userlist from the state of the
system configuration files.  If you contact tech suport they can will care
of this for you, but the script is also available from my home directory on
the ftp site.

Attachment: raq3-catchall.patch.bz2
Description: Binary data