# .intro patch for Majordomo 1.94.5 # Joe R. Jah # 13 May 2001 # # This patch will fix a bug in majordomo dealing with .intro file. # The patched majordomo will send only the contents of .intro file # if one exists, without prepending the standard majordomo greeting. # # To apply the patch: # # - Save the patch to a file on your Majordomo server. # - Login as Majordomo user, (e.g. majordom.) # - In Majordomo home run the following command: # # patch < /path/to/majordomo.7 # --- majordomo-1.94.5/majordomo Thu Jan 13 09:29:31 2000 +++ majordomo Sun May 13 21:38:50 2001 @@ -1770,20 +1770,17 @@ 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"); - &set_mail_sender($whoami_owner); - - print MSG "Welcome to the $list mailing list!\n\n"; - - print MSG "Please save this message for future reference. Thank you.\n"; - - if ( $majordomo_request ) { - print MSG <<"EOM"; + # 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"); + &set_mail_sender($whoami_owner); + unless (&lopen(INFO, "", "$listdir/$list.intro")) { + print MSG "Welcome to the $list mailing list!\n\n"; + print MSG "Please save this message for future reference. Thank you.\n"; + if ( $majordomo_request ) { + print MSG <<"EOM"; If you ever want to remove yourself from this mailing list, send the following command in email to @@ -1793,16 +1790,14 @@ Or you can send mail to \<$whoami\> with the following EOM - -} else { -print MSG <<"EOM"; + } else { + print MSG <<"EOM"; If you ever want to remove yourself from this mailing list, you can send mail to \<$whoami\> with the following EOM -} - -print MSG <<"EOM"; + } + print MSG <<"EOM"; command in the body of your email message: unsubscribe $list @@ -1811,8 +1806,6 @@ unsubscribe $list $subscriber -EOM -print MSG <<"EOM"; If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to \ . @@ -1820,41 +1813,35 @@ to contact a human. EOM - - # send them the info for the list, if it's available - # the .intro file has information for subscribers only - if (&lopen(INFO, "", "$listdir/$list.intro")) { - while () { - print MSG $_; - } - &lclose(INFO); - } elsif (&lopen(INFO, "", "$listdir/$list.info")) { - print MSG <<"EOM"; - Here's the general information for the list you've subscribed to, - in case you don't already have it: + # send them the info for the list, if it's available + # the .intro file has information for subscribers only + if (&lopen(INFO, "", "$listdir/$list.info")) { + print MSG <<"EOM"; +Here's the general information for the list you've subscribed to, +in case you don't already have it: EOM -#'; - while () { - print MSG $_; + while () { + print MSG $_; + } + &lclose(INFO); + } + # close (and thereby send) the welcome message to the subscriber + close(MSG); + } else { + while () { + print MSG $_; + } + &lclose(INFO); } - &lclose(INFO); - } else { - print MSG "#### No info available for $list.\n"; } - - # 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); - } + 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