I posted some sample Perl code for using my Imail User Server
http://www.smartbusiness.com/imail/imusrsvr.asp#SamplePerlCode
in conjunction with ASSP.

Note that I restrict connecting IPs to this server at my firewall and
I would strongly encourage others to do that as well.

I'm just having great success using the imusrsvr with a modified
version of ASSP http://assp.sourceforge.net/  for my secondary mail
servers.

On ASSP version 1.0.12 I added the following code beginning at about
my line 1190 (yours might be different) in sub getline:

==========================================================================

} elsif($l=~/rcpt to:.*?($EmailAdrRe\@)($EmailDomainRe)/io) {
   ($u,$h)=($1,$2);
   # check to see if it is one of the backup mx domains
   if ($h =~ /^$regex_for_backup_mx_domains/i) {
      my $testmail = 'v-' . "$u$h";
      my $x = &get_ImailData('192.168.11.22', 2321, $testmail);
      if ($x == 0) {
         sendque($fh, $NoRelaying."\r\n");
         mlog($fh,"relay attempt blocked for (evil): $e");
         $Stats{norelays}++;
         return;
      }
   }

==========================================================================

If you wanted to just drop the connection you would do something like:

   mlog($fh,"connection dropped exceeded 550 errors (evil): $e");
   done($fh);

==========================================================================

ASSP is a really nice resource.  I encourage you to donate to it if
you are using it.

Terry Fritts



To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to