[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Amavis should scan only mail for existent users (Exim)

Mike Mimic wrote:

I have installed an Amavis system for Exim
(amavis-exim). I have configured the Amavis
and Exim and now e-mails are scanned and correctly filtered.

But there is a problem. Exim now accpets e-mail
even for non-existent users. It than scans e-mails and
than it refuses them if there is no such localpart.

This is a problem as server does unnecessary work.

And querying Exim about existance of an e-mail address
(I use Mail::CheckUser Perl module for this) now
always returns true as Exim accepts everything.

I have also MySQL users on my system.

I added this to Transports section:

  driver = pipe
  command = "/usr/sbin/amavis <${sender_address}>
  prefix =
  suffix =
  check_string =
  escape_string =
  # for debugging change return_output to true
  return_output = false
  return_path_add = false
  user = amavis
  group = nogroup
  path = "/bin:/sbin:/usr/bin:/usr/sbin"
  current_directory = "/var/lib/amavis"

I added this to beginning of Directors section:

  condition = "${if eq
{$received_protocol}{scanned-ok} {0}{1}}"
  driver = smartuser
  transport = amavis
might do what you want. Means that amavis_director won't be checked during the verify phase.

Reply to: