0

I try to release an email out of the quarantine with Amavis-new using:

sudo /usr/sbin/amavisd-release MAIL_ID SECRET_ID

where MAIL_ID and SECRET_ID are ids found in the database table 'quarantine'.

I get the following error in bash:

Can't connect to UNIX socket /var/lib/amavis/amavisd.sock: No such file or directory at /usr/sbin/amavisd-release line 271.

The contents of /etc/amavis/conf.d/25-amavis_helpers is:

$unix_socketname = undef; #disable to unix socket

$interface_policy{'SOCK'} = 'AM.PDP-SOCK';
$policy_bank{'AM.PDP-SOCK'} = {
  protocol => 'AM.PDP',
  auth_required_release => 0, # don't require secret-id for release
};


# apply policy bank AM.PDP-INET to some inet tcp socket, e.g. tcp port 9998:
$inet_socket_port = [10024,9998];
$interface_policy{'9998'} = 'AM.PDP-INET';

$policy_bank{'AM.PDP-INET'} = {
  protocol => 'AM.PDP',  # select Amavis policy delegation protocol
  inet_acl => [qw( 127.0.0.1 [::1] )],  # restrict access to these IP addresses
  auth_required_release => 0,  # don't require secret_id for amavisd-release
};

Amavis-new automatically uses the UNIX socket. The UNIX socket is disabled in /etc/amavis/conf.d/25-amavis_helpers. Is it possible to use the inet tcp socket in /usr/sbin/amavisd-release?

Coanda
  • 141
  • 3

1 Answers1

0

I found a solution. I copied the script /usr/sbin/amavisd-release to another folder and changed the following lines from

### USER CONFIGURABLE:

  $log_level = 1;
# $socketname = '127.0.0.1:9998';
# $socketname = '[::1]:9998';
  $socketname = '/var/lib/amavis/amavisd.sock';

### END OF USER CONFIGURABLE

to

### USER CONFIGURABLE:

  $log_level = 1;
  $socketname = '127.0.0.1:9998';
# $socketname = '[::1]:9998';
# $socketname = '/var/lib/amavis/amavisd.sock';

### END OF USER CONFIGURABLE
Coanda
  • 141
  • 3