The following patches implement the 'welcome=yes/no' and
'announcements=yes/no' keywords for Majordomo 1.94.3. Both features have
been requested several times on the -users mailing list. In the past I had
described how our site implemented these for 1.93 using the new_keyword()
API function call, but since I am in the process of upgrading I figured I'd
do it this time as a real patch. I submit them for local implementation and
hopeful incorporation into 1.94.4. (Yes, I know these are new features
which are not typical for inclusion in a point release. But heck, they are
so simple its laughable...)
I would rather not discuss the "why in the world would you want to?" merits
of these additions. As I said, we use them and are happy, and others on the
lists have asked for them also.
--bill
WELCOME
-------
The 'welcome' keyword allows list owners to disable the sending of the
"welcome to the list" message to new subscribers. The sending of the
'intro' or 'info' file is also suppressed. The default value for this
keyword is "yes" to mimic standard Majordomo behavior. The setting =no may
be warranted when you want a "stealth" list that you don't want people to
be bothered with knowing they have been subscribed. We use this at our site
to keep lists of system and service users for later operational announcements.
ANNOUNCEMENTS
-------------
The 'announcements' keyword allows list owners to suppress the
informational "Joe User has been added to list <foo>. No action is required
on your part" messages. The default value for this keyword is "yes" to
mimic standard Majordomo behavior. The setting =no may be warranted when a
list is declared 'auto' and/or there is no big interest in tracking who
subs or unsubs. The comments for this variable include a recommendation
that this announcement feature remain ON in order to track list abuse.
Two patches; one for config_parse.pl and the other for majordomo:
*** /usr/lib/majordomo/src/majordomo-1.94.3/config_parse.pl Sun Apr 20
09:06:58 1997
--- config_parse.pl Wed Apr 30 17:29:25 1997
***************
*** 76,81 ****
--- 76,83 ----
# otherwise the value is the default value for the keyword.
# if the value starts with #!, the rest of the value is eval'ed
%known_keys = (
+ 'welcome', 'yes', # send welcome msg to new subscribers
+ 'announcements', 'yes', # send sub/unsub audits to list owner
'get_access', "open\001closed\001list\001list", # open, anyone can access
'index_access', "open\001closed\001list\001open", # closed,
nobody can
'who_access', "open\001closed\001list\001open", # list, only
list can access.
***************
*** 145,150 ****
--- 147,162 ----
# An associative array of comments for all of the keys
# The text is wrapped and filled on output.
%comments = (
+ 'welcome',
+ "If set to yes, a welcome message (and optional 'intro' file) will be
+ sent to the newly subscribed user.",
+
+ 'announcements',
+ "If set to yes, comings and goings to the list will be sent to the list
+ owner. These SUBSCRIBE/UNSUBSCRIBE event announcements are informational
+ only (no action is required), although it is highly recommended that they
+ be monitored to watch for list abuse.",
+
'get_access',
"One of three values: open, list, closed. Open allows anyone
access to this command and closed completely disables the
***************
*** 404,409 ****
--- 416,423 ----
# match commands to their subsystem, by default only 4 subsystems
# exist, majordomo, resend, digest and config.
%subsystem = (
+ 'welcome', 'majordomo',
+ 'announcements', 'majordomo',
'get_access', 'majordomo',
'index_access', 'majordomo',
'info_access', 'majordomo',
***************
*** 458,463 ****
--- 472,479 ----
# the parse function will be called to parse the value string for
# the keyword
%parse_function = (
+ 'welcome', 'grab_bool',
+ 'announcements', 'grab_bool',
'get_access', 'grab_enum',
'index_access', 'grab_enum',
'info_access', 'grab_enum',
*** /usr/lib/majordomo/src/majordomo-1.94.3/majordomo Sun Apr 20 09:11:49 1997
--- majordomo Mon Apr 28 18:58:25 1997
***************
*** 471,481 ****
--- 471,483 ----
print REPLY "Succeeded.\n";
}
&log("unsubscribe $clean_list $subscriber");
+ if ( &cf_ck_bool($list,"announcements")) {
&sendmail(BYE, "$clean_list-approval\@$whereami",
"UNSUBSCRIBE $clean_list $subscriber");
print BYE "$subscriber has unsubscribed from $clean_list.\n";
print BYE "No action is required on your part.\n";
close(BYE);
+ }
}
elsif ($match_count == 0) {
print REPLY "**** No matches found for '$subscriber'\n";
***************
*** 1852,1857 ****
--- 1854,1862 ----
local($list) = shift;
local($subscriber) = join(" ", @_);
+ # welcome/intro message controlled by 'welcome=yes/no'
+ if ( &cf_ck_bool($list,"welcome")) {
+
# Set up the sendmail process to welcome the new subscriber
&set_mail_sender($config_opts{$list,"sender"} . "\@" . $whereami);
&sendmail(MSG, $subscriber, "Welcome to $list");
***************
*** 1925,1935 ****
# close (and thereby send) the welcome message to the subscriber
close(MSG);
! # tell the list owner of the new subscriber
&sendmail(NOTICE, "$list-approval\@$whereami", "SUBSCRIBE $list
$subscriber");
print NOTICE "$subscriber has been added to $list.\n";
print NOTICE "No action is required on your part.\n";
close(NOTICE);
}
# complain about a user screwup, and note that the user needs help appended
--- 1930,1944 ----
# close (and thereby send) the welcome message to the subscriber
close(MSG);
! }
!
! # tell the list owner of the new subscriber (optional:
announcements=yes/no)
! if ( &cf_ck_bool($list,"announcements")) {
&sendmail(NOTICE, "$list-approval\@$whereami", "SUBSCRIBE $list
$subscriber");
print NOTICE "$subscriber has been added to $list.\n";
print NOTICE "No action is required on your part.\n";
close(NOTICE);
+ }
}
# complain about a user screwup, and note that the user needs help appended
|
|