Perl can do a much better job than this file: When starting ProtoWrap for SMTP, it will accept the attributes relayIpList, relayDomainList, blockIpList and blockAddrList as as references to lists . As part the mission for ProtoWrap to exist was to stop spam, the author decided to follow a traditional approach in firewalls: Everything that is not expressly permited is forbidden. Thus, ProtoWrap will accept only what is specified in this file. A basic equivalent configuration to the above example, starting a wrapper to a local MTA and listening to port 20025, would be:
$wrap = ProtoWrap::SMTP->new(
'listenPort' => 20025,
'destAddr' => '127.0.0.1',
'blockAddrList' => ['spammer@hotmail.com',
'advertisement.net'],
'blockIpList' => ['172.16.50.30','10.3'],
'blockBodyList' => ['^Subject: .*ILOVEYOU'],
'relayIpList' => ['127.0.0.1','192.168.1'],
'relayDomainList' => ['localhost.localdomain',
'localhost','mynetwork.net']
);