amavisd-new-2.8.0-pre6 (preview)

Mark Martinec Mark.Martinec+amavis at ijs.si
Sun Apr 29 12:53:26 CEST 2012


> $enable_zmq = 1; # ZMQ: amavis-status, amavis-services, amavis-mv

amavis-mc ( Master of Ceremonies :) that is, not amavis-mv.
It is conceptually equivalent to a Postfix 'master' process;
just takes care of keeping its subordinate tasks alive
(amavis-service) and shutting them down on its exit.
Should be started/stopped at boot/shutdown time.

A new ZMQ-based SNMP agent is not yet finished, only
one of its components is (running under amavis-services).
So if one needs a SNMP access to counters, currently the
old bdb-based agent is still needed until I finish the task.

Btw, both can be enabled at the same time:
  $enable_db = 1;
  $enable_zmq = 1;


A few more words on the organization of message flows.

The amavis-mc is just a job-starter/stopper for amavis-service.

The amavis-service runs in three instances, each with a different
command line argument which selects its function. It is just a
convenient common wrapper for (currently) three functionally
independent tasks, each running as its own process:

* amavis-service msg-forwarder
------------------------------
is just a message forwarding hub. It opens one zmq socket:
  my $inner_sock_specs = "ipc://$MYHOME/amavisd-zmq.sock";
reads all messages (mostly from amavisd child processes)
and copies/broadcasts them to a more public zmq socket:
  my $outer_sock_specs = "tcp://127.0.0.1:23232";
where clients like amavis-status and childproc-minder
and snmp-aggregator read from it;

* amavis-service childproc-minder
---------------------------------
is a component overviewing sanity of amavisd child processes.
This is one component of functionality that was formerly
implemented by amavisd-nanny. It reads messages from
$outer_sock_specs, keeps evidence of new and exiting
amavisd child processes, kills processes stuck for too
long, and every 10 seconds reports their state to the
$inner_sock_specs for the benefit of other tasks,
like a late-starting amavisd-status utility, so that it
can catch up with the current state.

- amavis-service snmp-aggregator
---------------------------------
It reads messages from $outer_sock_specs, keeps evidence
of SNMP counters and variables. A component of the
not-yet-finished snmp agent. It periodically broadcasts
the state of counters to:
  my $snmp_sock_specs  = "tcp://127.0.0.1:23233";


amavisd child processes report their state and SNMP counters
to the inner socket, configured in amavisd.conf by:
  $enable_zmq = 1;  # enable use of ZeroMQ (SNMP and nanny)
  @zmq_sockets = ( "ipc://$MYHOME/amavisd-zmq.sock" ); # is a default


Mark


More information about the amavis-users mailing list