On 04 Nov 2024, Wilfred van Velzen said the following...
Wv> DS> So if I read your comment you would like to accept a ping from ping
Wv> DS> but not reply with ping as from
Wv> Yes, that last restriction is (very) important, otherwise PONG messages
Wv> could "bounce" back and forth indefinitly...
my $myname = 'Ping Robot'; # From: name in PONG reply. Cannot be 'PING'
[...]
# Do not set $myname to 'PING'
if ( uc($myname) eq "PING" ) { die "ERROR: \$myname cannot be PING"; }
# Check if message is netmail & addressed to PING (case insensitive)
if ( length($area) == 0 && uc($toname) eq "PING" ) {
[...]
I think this would do that.
It would accept a netmail addressed to "Ping" and also from "Ping".
If someone tried setting $myname to "Ping" the script would exit with an error.
The reply would be from "Ping Robot" to "Ping" which (if the remote system
has a ping robot) would trigger a response from that system, e.g: From: Ping Robot & To: Ping Robot.
Jay
... A bee with a knife will give you a buzz cut
--- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
* Origin: Northern Realms (1:229/664)
|