On Thursday 18 February 2016 12:48:42 Michael Grant wrote: > Then let me be more clear... > > I want to reject the message. I do not want the message arriving at > the recipient. However, the message that is passed to clamd, if this > is discovered to contain a virus, I want to save that into a file in a > directory so that I can come back later and look at it. > > Ignore anything about delivering it. That is not pertinent. For all > intents and purposes, the message with a virus is rejected at the SMTP > level before the SMTP connection goes away.
You simply can not do both. What you can do is quaranteen it for later inspection so here, I use a procmail recipe to run it thru clamscand, and if clamav has a tummy ache, procmail puts it in a mailfile on /var/spool/mail named virii. That triggers inotifywait which is watching that directory, and if the filename inotifywait reports is virii, then the bash script that called inotifywait in the first place ignores it. If its valid email however, it sends kmail a msg over dbus to go get the mail so I can read the rest of it. Getting the mail does not include a user named virii. All fed by fetchmail of course. I am lazy, so a lot of the email activity here is automated, reducing my job to reading what comes in, replying if I need to. Otherwise I just tap the + key until I am out of mail to be read. > On 18 February 2016 at 18:25, Dennis Peterson <denni...@inetnw.com> wrote: > > On 2/18/16 9:21 AM, Michael Grant wrote: > >> The reason I want to do this is that I want to reject virus > >> messages while > >> > >> >>the smtp connection is still alive, but after the fact, if there > >> >> was a false positive, I'd like to be able to send the message on > >> >> through > >> > >> anyway > >> > >> >>after the fact. > > > > You say here you would "want to reject virus messages... like to be > > able to send the message on through anyway after the fact". You > > can't have it both ways. Reject it or send it through or rephrase > > what you wish to do. > > > > dp > > > > _______________________________________________ > > Help us build a comprehensive ClamAV guide: > > https://github.com/vrtadmin/clamav-faq > > > > http://www.clamav.net/contact.html#ml > > _______________________________________________ > Help us build a comprehensive ClamAV guide: > https://github.com/vrtadmin/clamav-faq > > http://www.clamav.net/contact.html#ml Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Help us build a comprehensive ClamAV guide: https://github.com/vrtadmin/clamav-faq http://www.clamav.net/contact.html#ml