I tried that too just a moment ago with a clean set of the file, and it seems to
succeed (running patch), but I get the following error when sending an e-mail to
a local majordomo list:
========
----- The following addresses had permanent fatal errors -----
"|/etc/local/mail/majordomo/wrapper resend
@/etc/local/mail/majordomo/lists/testlist.resend"
(reason: 255)
(expanded from: <testlist@mail>)
----- Transcript of session follows -----
Message delivered to mailing list <testlist@mail>
syntax error at /etc/local/mail/majordomo-1.94.5/majordomo.pl line 762, near
"else if"
Missing right curly or square bracket at
/etc/local/mail/majordomo-1.94.5/majordomo.pl line 845, at end of line
Compilation failed in require at /etc/local/mail/majordomo-1.94.5/resend line
97.
554 5.3.0 unknown mailer error 255
===========
If I go back to the original (unpatched) files, mail to the lists work again
(just without the ability to restrict to a domain.)
Steve
> Date: Mon, 08 Sep 2003 15:08:15 -0500
> From: Daniel Liston <dliston@sonny.org>
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b)
Gecko/20030906
> X-Accept-Language: en-us, en
> MIME-Version: 1.0
> To: Steve Rifkin <steve410@cs.jhu.edu>
> Cc: majordomo-users@greatcircle.com
> Subject: Re: Problems running majordomo.pl using restrict2domain-post.0 patch
> Content-Transfer-Encoding: 7bit
> X-SMTP-HELO: mail.sonny.com
> X-SMTP-MAIL-FROM: dliston@sonny.org
> X-SMTP-PEER-INFO: 24-116-58-25.cpe.cableone.net [24.116.58.25]
> X-Spam-Status: No, hits=-1.5 required=5.0
tests=EMAIL_ATTRIBUTION,IN_REP_TO,MAILTO_TO_SPAM_ADDR,QUOTED_EMAIL_TEXT,REFERENC
ES,SMTPD_IN_RCVD,SPAM_PHRASE_05_08,USER_AGENT,USER_AGENT_MOZILLA_UA,X_ACCEPT_LAN
G version=2.43
>
> Steve,
>
> Why didn't you just copy the restrict2domain-post.0 patch file to your
> /etc/local/mail/majordomo-1.94.5/ directory, then within that directory
> execute `patch < restrict2domain-post.0` ??
>
> If you need to be a little more cautious, or you do not have your
> original majordomo tarball for recovery, you can make backups first.
>
> cp -p majordomo.pl majordomo.pl.orig
> cp -p config_parse.pl config_parse.pl.orig
>
> Dan Liston
>
> Steve Rifkin wrote:
>
> > I've finally patched (thanks to Peter Dumpert and Deb for your help with
that)
> > my majordomo.pl and config_parse.pl files to contain the code for
> > restrict2domain-post.0 (so, that I can restrict all incoming mail to a list
to a
> > specific domain.)
> >
> > I made the changes to the two files by hand.
> >
> > When I try to send to a list now, I get an error:
> >
> > "syntax error at /etc/local/mail/majordomo-1.94.5/majordomo.pl line 763,
near
> > "else if"
> >
> > and I'm not sure why. I'm not a perl person, so I pretty much just copied
and
> > pasted the code (see below) into the appropriate place. Can anyone see
where my
> > error is? Line 763, as referenced in the error, is the "else if
> > (&main'addr_match($subscriber, $_," that you'll see in section below.
> >
> > Below is the segment of majordomo.pl that was changed by the patch.
> >
> > Thanks in advance. Steve Rifkin (steve410@cs.jhu.edu)
> >
> > ======= Section of code in question... look for "else if" ==========
> >
> > sub main'is_list_member {
> > local($subscriber, $listdir, $clean_list, $file) = @_;
> > local($matches) = 0;
> > local(*LIST);
> > local($_);
> >
> > print STDERR "is_list_member: enter\n" if $DEBUG;
> >
> > if ($file =~ /\@/) { # Is the resticted string an email?
> > $subdomain = $subscriber; # Is the resticted string a domain?
> > $subdomain =~ s/^[^\@]+// if $file =~ /^\@/;
> > if (&main'addr_match($subdomain, $file,
> > (&main'cf_ck_bool($clean_list,"mungedomain") ? 2 : undef))) {
> > $matches++;
> > }
> > return($matches);
> > }
> >
> > $file = "$listdir/$file" if defined $file && $file !~ m|^/|;
> > $file = "$listdir/$clean_list" unless defined $file;
> > print STDERR "is_list_member: checking $file for $subscriber\n"
> > if $DEBUG;
> > if (open(LIST, $file)) {
> > while (<LIST>) {
> > if ($_ =~ /^\@/ && $file =~ /^$clean_list-post$/) { # Is the
> > subscriber a domain
> > $poster = $_; # in the
> > listname-post file?
> > $subdomain = $subscriber;
> > $subdomain =~ s/^[^\@]+// if $file =~ /^\@/;
> > if (&main'addr_match($subdomain, $poster,
> > (&main'cf_ck_bool($clean_list,"mungedomain") ? 2 :
undef))) {
> > $matches++;
> > }
> > else if (&main'addr_match($subscriber, $_,
> > (&main'cf_ck_bool($clean_list,"mungedomain") ? 2 : undef))) {
> > $matches++;
> > last;
> > }
> > }
> > close(LIST);
> > }
> > else {
> > &main'bitch("Can't read $file: $!"); #'"";
> > }
> >
> > print STDERR "is_list_member: exit $matches\n" if $DEBUG;
> >
> > return($matches);
> > }
>
Follow-Ups:
|
|