TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Alan Ianson
from: Brother Rabbit
date: 2021-05-06 14:35:00
subject: Mail for unknown points

Hi, Alan!

05 май 21 22:46, Alan Ianson -> All:

 AI> I sometimes receive mail for unknown points off my own node. These
 AI> messages get routed back out since these points don't actually exist
 AI> in my setup.

 AI> Is there a way I can stop mail for these points that don't exist off my
 AI> own node from being routed and sent out?

sub filter()
{
  unless ( defined($area) ) {
     if ( istomypoint($toaddr) && !defined( $links{$fromaddr}{name} ) ) {
        kill=1;
        putMsgInArea('', '', $fromname, '', $fromaddr,
           'Unknown point addres', $date, $attr,
           "You sent a message to a non-existent address. ".
           "I am returning your message.\r\r".
           '=============================================================\r'.
           sprintf("From: %-32s",$fromname).
           sprintf("%-20s $date\r",$fromaddr).
           sprintf("To  : %-32s",$toname)."$toaddr\r".
           '=============================================================\r'.
           $text.
           '=============================================================\r'.
           "--- Perl on $hpt_version",1 );
        return;
     }
  }

}

sub istomypoint($)
{
    my ( $addrr ) = @_;
    for my $cfg_addr ( @{$config{addr}} ) {
        if( $addrr =~ /^$cfg_addr\.\d+$/ ) {
            return 1;
        }
    }
return 0;
}

NB: Not tested.

Have nice nights.
       Brother Rabbit.

--- Мат, конечно, не *крашает мою речь, но делает мои просьбы более понятными.
                                                                                                                     
* Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.