Great Circle Associates Majordomo-Users
(March 1995)

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

Subject: Re: Force an Address
From: plate @ dicomed . com (Doug Plate Sr.)
Date: Fri, 10 Mar 95 07:56 CST
To: pgiliber @ Strata . COM
Cc: majordomo-users @ greatcircle . com

>Can someone quickly tell me if I can force majordomo to ignore the addresses
>in which,subscribe and unsubscribe commands and always use the domainname no
>matter what.
>ie...a user does a which command and it shows up to majordomo as
>user@systemname...well this user gets no matches because we built the lists
>and want the lists entries to be

Here is a filter I implemented that puts local addresses into a
"canonical" form.  I did this because some people had two methods of using
mail (myself included), popmail and unix shell.  The mail from the unix account 
would just have the user name and not the site.   Put the call to "Canonize"
just after Majordomo has finished it's normal address parsing and the sub 
routine itself at the end of majordomo.  Hopefully you have some understanding
of perl and can follow this.

# Here is the context for the subroutine call:

# Now we try to figure out who to send the replies to.
# $reply_to also becomes the default target for subscribe/unsubscribe
$reply_to = &RetMailAddr(*hdrs);
$reply_to = &valid_addr($reply_to);
# add FQDN to local users
$reply_to = &Canonize($reply_to);

# And here is the subroutine
sub Canonize {
    local($in_addr) = shift;
    local ($out_addr);
# Leave bang paths alone
    if($in_addr =~ /.+\!.+/) { 
    $in_addr =~ /.*(@.*)/;
    local($site) = $1;
    $out_addr = $in_addr;
# My filter looks for no site name.  Yours could look for a site name with
# no 'dots' in it like: if ($site =~ /^\./){
    if ($site eq ""){
       $out_addr = "$in_addr@$whereami";
    $out_addr =~ s/\s*//g;

Doug Plate Sr.
 Doug Plate Sr.                                           <>

Indexed By Date Previous: Re: alternate config files on the command line
From: "John P. Rouillard" <>
Next: Re: Help!! Wrapper doesn't compile
From: (Edward Brown)
Indexed By Thread Previous: Force an Address
From: pgiliber@Strata.COM (Peter Giliberti)
Next: Problem with archive permissons
From: Mikhail Kuperblum <>

Search Internet Search