Great Circle Associates Majordomo-Users
(August 1996)
 

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

Subject: Re: advertise
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Wed, 28 Aug 1996 11:49:14 -0500 (CDT)
To: Renaut . Ryckaert @ cediti . be (Renaut Ryckaert)
Cc: majordomo-users @ greatcircle . com
In-reply-to: <199608281435.QAA06792@corto.cediti.be> from "Renaut Ryckaert" at Aug 28, 96 04:35:07 pm
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Renaut Ryckaert writes: ]
> 
> I'm running several mailing lists with majordomo 1.93 on Solaris 2.4.
> But I'm confused with the 'advertise' and the 'noadvertise' commands
> and the syntax of their parameters. Could someone give an example to
> hide a list from the world except one domain ?

advertise << END
/.+\@.*cediti\.be$/
END

noadvertise << END

END

These are (limited) Perl regular expressions. The example above would
limit the list's visibility via the 'lists' command to users/hosts in
the "cediti.be" domain. Only addresses matching the advertise regular
expression are allowed and, since noadvertise is blank, no subset of
allowed addresses is disallowed.

The '/' are required delimiters. A '.' matches any character and the
'+' modifier requires it to match 1 or more times. The '\' escapes
the following '@' character from being interpolated by Perl as a list
variable introducer, so '@' must match literally. The '*' modifier
requires the second '.' to match zero or more times (thus it's allowed
to match the "null string"). The string 'cediti\.be' must match
literally (the '\' escapes the '.' to make it literal, so the matched
string is 'cediti.be') and the '$' matches the end of the matched
string, thus nothing may follow 'cediti.be'.

A couple things to note about advertise/noadvertise: Subscribed
addresses are always allowed and the matching is case-dependent, i.e.
an address of user@cediti.be will match, but user@cediti.BE will not.
Also, there's a bug in 1.93 in file majordomo at lines 884 and 894 that
requires literal '@' and '$' to be escaped (as I've shown). Changing the
'qq(' on those two lines to 'q(' removes that requirement.

-- 
 Dave Wolfe    *Not a spokesman for Motorola*
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598


References:
  • advertise
    From: Renaut Ryckaert <Renaut.Ryckaert@cediti.be>
Indexed By Date Previous: 32 bit Windows Version of Majordomo
From: Tom Seiler <tseiler@viad.com>
Next: Re: Sun Netra installation
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Indexed By Thread Previous: advertise
From: Renaut Ryckaert <Renaut.Ryckaert@cediti.be>
Next: majordomo digest guide
From: Kevin Kelleher <kevink@concorde.com>

Google
 
Search Internet Search www.greatcircle.com