Great Circle Associates Majordomo-Workers
(November 1996)
 

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

Subject: Re: patch 1.94.1, try #2
From: Ajay Kochhar <kochhar @ ari . ari . net>
Date: Thu, 28 Nov 1996 18:13:58 -0500 (EST)
To: Jason L Tibbitts III <tibbs @ hpc . uh . edu>
Cc: majordomo-workers @ greatcircle . com
In-reply-to: <ufaiv6q82tb.fsf@sina.hpc.uh.edu>
Reply-to: Ajay Kochhar <kochhar @ ari . ari . net>



On 28 Nov 1996, Jason L Tibbitts III wrote:

> Before I comment, you must realize that I was only concerned with the
> single line of the patch that attempted to rewrite the To: header.  The
> rest of the virtual stuff, which involves making sure that Majordomo sticks
> the proper domain on its addresses, is definitely a good idea.

  Sure, it's the line that can cause the most problems.  
  
  Most of my message was to make sure everyone was on the same
  wavelength.
 
> AK> Sendmail is not rewriting the To: header which Majordomo sends to it
> AK> for delivery.
> 
> I never said that it was.
> 
> AK> The To: header only gets rewritten on some systems, *before* the
> AK> message is received by Majordomo.
> 
> I understand that.  This is very arguably an issue that needs to be solved
> at the MTA level, but anyway...

  That's fine, and, for our system, I'll be trying to figure that out soon
  too..
 
> AK> Those familiar with their MTA or lucky enough have their systems
> AK> configured to leave the header alone (and as such the incoming domain
> AK> is preserved in its original form and not translated into the
> AK> localhost's name).
> 
> If someone is doing a virtual domain setup, I have no sympathy for them if
> they can't be bothered to either learn their MTA or hire a consultant who
> can handle it.  Really, it's completely foolish.

  That wasn't quite my point.  I was merely pointing out that for some
  systems this virtual stuff may not be necessary at all.  Perhaps I 
  should have said so.  I agree that people should make an effort to 
  figure such things out by themselves (by whatever means), and the
  format of the To: header before Majordomo receives it is not a problem
  with Majordomo.  (None of this would work as intended, on a per-list
  basis, without virtual sendmail domains being setup anyway, so they
  would have to do that first.)

> Outside of the typos (square brackets around $locdom) this fails miserably:
 :
> $a =~ s/^to:(.*[,\s])\b$opt_l($locdom)?([,\s].*)$/To:$1 $opt_l\@$whereami $2/i ;
> $a =~ s/^cc:(.*[,\s])\b$opt_l($locdom)?([,\s].*)$/Cc:$1 $opt_l\@$whereami $2/i ;

  Oops on the square brackets, but change the $2 to a $3 and it will work
  a little better..

> 1 while $a =~ s/^to:(.*)\b$opt_l\b\@[-\w\d_\.]*$locdom(.*)$/To:$1$opt_l\@$whereami$2/i ; 
 :
> if they match, and the final hostname must not match (else you infloop).
> I'll work up a patch sometime today.

  There is probably more than one equivalent regular expression for the
  task.. but in the expression above what happens if \b matches on a "-"
  which occurs in an address such as "owner-listname@host.localdomain"?
  ..just a thought..  Here's one that I tested using the script you
  included in your message:

1 while $a =~ s/^to:(.*[,\s\<\(\[\"])$opt_l($locdom)?([,\s\>\(\]\"].*)$/To:$1$opt_l\@$whereami$3/i;

  which is intended to match addresses between angle- and square-brackets
  parans, and quotes.  Maybe a read through RFC822 would be educational.
  [Perhaps this header *is* best left alone!?]  I have mixed feelings
  about rewriting the addresses in comments too, but am not certain
  there's a simple way of getting around that, either.

-Ajay.





References:
Indexed By Date Previous: majordomo error.
From: "Miguel Montiel Vega." <mike@itesocci.gdl.iteso.mx>
Next: Weird behavior with To: header
From: "Shane P. McCarron" <ahby@themacs.com>
Indexed By Thread Previous: Re: patch 1.94.1, try #2
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Next: Happy Thanksgiving
From: rwneill@juno.com (Robert W. Neill, Jr.)

Google
 
Search Internet Search www.greatcircle.com