>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 user@domainname.com.
[...]
>Peter
>
Peter,
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 =~ /.+\!.+/) {
return($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;
$out_addr;
}
Regards,
Doug Plate Sr.
//////////////////////////////////////////////////////////////////////////////
Doug Plate Sr. <plate@dicomed.com>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
|