AMAVIS & Content Scan from a JAVA/Jee Web Application

A. Schulze sca at andreasschulze.de
Thu Nov 5 10:19:56 CET 2015


Krishnakumar Nair:

> Is there any libraries available to connect to AMAVISD running in a
> machine[Unix] in network, from a Java Application running in Unix/Windows
> machine, for content scan using TCP ?
>
> We are searching for alternatives similar to libclamav.jar etc.

Is your application is able to send the content as E-Mail to an SMTP-Server?

amavisd could be used as "normal" SMTP-server.
you have to configure amavis to send all messages to a next hop smtp-server
that discard any message, for example postfix smtp-sink.
But maybe also amavis could do this job itself...

Define your content policy and configure amavisd to reject unwanted content.
amavisd.conf:
   $final_virus_destiny      = D_REJECT;
   $final_banned_destiny     = D_REJECT;
   $final_unchecked_destiny  = D_REJECT;
   $final_spam_destiny       = D_REJECT;
   $final_bad_header_destiny = D_REJECT;
have also look at %final_destiny_maps_by_ccat.

now, if your application send the content to the SMTP-Server and amavis
/accept/ the message, the content pass the configured policy otherwise not.

Andreas



More information about the amavis-users mailing list