Compare commits

..

No commits in common. "rawhide" and "f35" have entirely different histories.

7 changed files with 159 additions and 258 deletions

6
.gitignore vendored
View file

@ -1,8 +1,2 @@
/amavis-v2.12.0.tar.bz2 /amavis-v2.12.0.tar.bz2
/amavis-v2.12.1.tar.bz2 /amavis-v2.12.1.tar.bz2
/amavis-v2.12.2.tar.bz2
/amavis-b5619240f3dbbf008549d6688ffd78148c0c6a9d.tar.bz2
/amavis-35407e96537e1e42bc01961eb428fa389c24c15f.tar.bz2
/amavis-v2.13.0.tar.bz2
/amavis-v2.13.1.tar.bz2
/amavis-v2.14.0.tar.bz2

View file

@ -1,41 +1,39 @@
From 760c0848cf0e0c13b33bcd0823ea5a310587d8a1 Mon Sep 17 00:00:00 2001 From 46469a787fbc6c588c581d191dc695d6adf33d3f Mon Sep 17 00:00:00 2001
From: Juan Orti Alcaine <jorti@pm.me> From: Juan Orti Alcaine <jortialc@redhat.com>
Date: Thu, 17 Jul 2025 21:02:32 +0200 Date: Fri, 1 Jan 2021 13:30:16 +0100
Subject: [PATCH] Fedora configuration modifications Subject: [PATCH] Fedora configuration modifications
--- ---
bin/amavis-mc | 6 ++-- amavis-mc | 6 ++--
bin/amavisd-agent | 2 +- amavisd-agent | 2 +-
bin/amavisd-nanny | 2 +- amavisd-nanny | 2 +-
bin/amavisd-release | 4 +-- amavisd-signer | 4 +--
bin/amavisd-signer | 4 +-- amavisd.conf | 98 ++++++++++++++++++++++++++------------------------
bin/amavisd-submit | 6 ++-- 5 files changed, 59 insertions(+), 53 deletions(-)
conf/amavisd.conf | 79 ++++++++++++++++++++++++---------------------
7 files changed, 55 insertions(+), 48 deletions(-)
diff --git a/bin/amavis-mc b/bin/amavis-mc diff --git a/amavis-mc b/amavis-mc
index 1c913e0..46e2013 100755 index 88d9701..5e7e0e7 100755
--- a/bin/amavis-mc --- a/amavis-mc
+++ b/bin/amavis-mc +++ b/amavis-mc
@@ -73,10 +73,10 @@ use vars qw(@path @services $daemon_user @daemon_groups $pid_file $log_level @@ -70,10 +70,10 @@ use vars qw(@path @services $daemon_user $daemon_group $pid_file $log_level
### USER CONFIGURABLE: ### USER CONFIGURABLE:
-$daemon_user = 'vscan'; -$daemon_user = 'vscan';
-@daemon_groups = 'vscan'; -$daemon_group = 'vscan';
+$daemon_user = 'amavis'; +$daemon_user = 'amavis';
+@daemon_groups = 'amavis'; +$daemon_group = 'amavis';
-$pid_file = '/var/amavis/amavis-mc.pid'; -$pid_file = '/var/amavis/amavis-mc.pid';
+$pid_file = '/run/amavisd/amavis-mc.pid'; +$pid_file = '/run/amavisd/amavis-mc.pid';
$log_level = 0; $log_level = 0;
$syslog_ident = 'amavis-mc'; $syslog_ident = 'amavis-mc';
diff --git a/bin/amavisd-agent b/bin/amavisd-agent diff --git a/amavisd-agent b/amavisd-agent
index bbefbb3..fe44697 100755 index 1ebe2bb..b8271a3 100755
--- a/bin/amavisd-agent --- a/amavisd-agent
+++ b/bin/amavisd-agent +++ b/amavisd-agent
@@ -54,7 +54,7 @@ use BerkeleyDB; @@ -53,7 +53,7 @@ use BerkeleyDB;
my($dbfile) = 'snmp.db'; my($dbfile) = 'snmp.db';
my($db_home) = # DB databases directory my($db_home) = # DB databases directory
@ -44,11 +42,11 @@ index bbefbb3..fe44697 100755
my($wakeuptime) = 10; # -w, sleep time in seconds, may be fractional my($wakeuptime) = 10; # -w, sleep time in seconds, may be fractional
my($repeatcount); # -c, repeat count (when defined) my($repeatcount); # -c, repeat count (when defined)
diff --git a/bin/amavisd-nanny b/bin/amavisd-nanny diff --git a/amavisd-nanny b/amavisd-nanny
index f9d7f6d..ffc9d54 100755 index 80b84dc..164549f 100755
--- a/bin/amavisd-nanny --- a/amavisd-nanny
+++ b/bin/amavisd-nanny +++ b/amavisd-nanny
@@ -62,7 +62,7 @@ my($activettl) = 10*60; # stuck active children are sent a SIGTERM @@ -61,7 +61,7 @@ my($activettl) = 10*60; # stuck active children are sent a SIGTERM
my($dbfile) = 'nanny.db'; my($dbfile) = 'nanny.db';
my($db_home) = # DB databases directory my($db_home) = # DB databases directory
@ -57,80 +55,33 @@ index f9d7f6d..ffc9d54 100755
my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional my($wakeuptime) = 2; # -w, sleep time in seconds, may be fractional
my($repeatcount); # -c, repeat count (when defined) my($repeatcount); # -c, repeat count (when defined)
diff --git a/bin/amavisd-release b/bin/amavisd-release diff --git a/amavisd-signer b/amavisd-signer
index 597c663..88ef695 100755 index f154646..3042b7c 100755
--- a/bin/amavisd-release --- a/amavisd-signer
+++ b/bin/amavisd-release +++ b/amavisd-signer
@@ -50,7 +50,7 @@ @@ -86,8 +86,8 @@ $VERSION = 1.001; # 20100730
# To be placed in amavisd.conf:
# $interface_policy{'SOCK'} = 'AM.PDP';
# $policy_bank{'AM.PDP'} = { protocol=>'AM.PDP' };
-# $unix_socketname = '/var/amavis/amavisd.sock';
+# $unix_socketname = '/run/amavisd/amavisd.sock';
# or:
# $interface_policy{'9998'} = 'AM.PDP';
# $policy_bank{'AM.PDP'} = { protocol=>'AM.PDP' };
@@ -88,7 +88,7 @@ BEGIN {
$log_level = 1;
# $socketname = '127.0.0.1:9998';
# $socketname = '[::1]:9998';
- $socketname = '/var/amavis/amavisd.sock';
+ $socketname = '/run/amavisd/amavisd.sock';
### END OF USER CONFIGURABLE
}
diff --git a/bin/amavisd-signer b/bin/amavisd-signer
index 680513c..6f537f4 100755
--- a/bin/amavisd-signer
+++ b/bin/amavisd-signer
@@ -88,8 +88,8 @@ $VERSION = 1.001; # 20100730
# Please adjust the following settings as necessary: # Please adjust the following settings as necessary:
# #
-$daemon_user = 'vscan'; -$daemon_user = 'vscan';
-@daemon_groups = 'vscan'; -$daemon_group = 'vscan';
+$daemon_user = 'amavis'; +$daemon_user = 'amavis';
+@daemon_groups = 'amavis'; +$daemon_group = 'amavis';
# $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef # $daemon_chroot_dir = '/var/amavis'; # chroot directory or undef
# $daemonize = 1; # $daemonize = 1;
diff --git a/bin/amavisd-submit b/bin/amavisd-submit diff --git a/amavisd.conf b/amavisd.conf
index 7e8cedb..5eefdd7 100755 index bb562e6..615a75a 100644
--- a/bin/amavisd-submit --- a/amavisd.conf
+++ b/bin/amavisd-submit +++ b/amavisd.conf
@@ -53,7 +53,7 @@
# To be placed in amavisd.conf:
# $interface_policy{'SOCK'} = 'AM.PDP';
# $policy_bank{'AM.PDP'} = { protocol=>'AM.PDP' };
-# $unix_socketname = '/var/amavis/amavisd.sock';
+# $unix_socketname = '/run/amavisd/amavisd.sock';
use warnings;
use warnings FATAL => 'utf8';
@@ -73,9 +73,9 @@ BEGIN {
### USER CONFIGURABLE:
$log_level = 0;
- $tempbase = '/var/amavis/tmp'; # where to create a temp directory with a msg
+ $tempbase = '/run/amavisd/tmp'; # where to create a temp directory with a msg
- $socketname = '/var/amavis/amavisd.sock';
+ $socketname = '/run/amavisd/amavisd.sock';
# $socketname = '127.0.0.1:9998';
# $socketname = '[::1]:9998';
diff --git a/conf/amavisd.conf b/conf/amavisd.conf
index a612b49..d3acb42 100644
--- a/conf/amavisd.conf
+++ b/conf/amavisd.conf
@@ -17,25 +17,25 @@ use strict; @@ -17,25 +17,25 @@ use strict;
# truncation in /proc/<pid>/stat and ps -e output # truncation in /proc/<pid>/stat and ps -e output
$max_servers = 2; # num of pre-forked children (2..30 is common), -m $max_servers = 2; # num of pre-forked children (2..30 is common), -m
-$daemon_user = 'vscan'; # (no default; customary: vscan or amavis), -u -$daemon_user = 'vscan'; # (no default; customary: vscan or amavis), -u
-@daemon_groups = 'vscan'; # (leave empty to use $daemon_user's supplementary groups), -g -$daemon_group = 'vscan'; # (no default; customary: vscan or amavis), -g
+$daemon_user = 'amavis'; # (no default; customary: vscan or amavis), -u +$daemon_user = 'amavis'; # (no default; customary: vscan or amavis), -u
+@daemon_groups = 'amavis'; # (leave empty to use $daemon_user's supplementary groups), -g +$daemon_group = 'amavis'; # (no default; customary: vscan or amavis), -g
$mydomain = 'example.com'; # a convenient default for other settings $mydomain = 'example.com'; # a convenient default for other settings
@ -139,7 +90,7 @@ index a612b49..d3acb42 100644
$TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T $TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc. $ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc.
-$QUARANTINEDIR = '/var/virusmails'; # -Q -$QUARANTINEDIR = '/var/virusmails'; # -Q
+$QUARANTINEDIR = undef; # -Q +$QUARANTINEDIR = undef; # -Q
# $quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine # $quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine
# $release_format = 'resend'; # 'attach', 'plain', 'resend' # $release_format = 'resend'; # 'attach', 'plain', 'resend'
# $report_format = 'arf'; # 'attach', 'plain', 'resend', 'arf' # $report_format = 'arf'; # 'attach', 'plain', 'resend', 'arf'
@ -147,7 +98,7 @@ index a612b49..d3acb42 100644
# $daemon_chroot_dir = $MYHOME; # chroot directory or undef, -R # $daemon_chroot_dir = $MYHOME; # chroot directory or undef, -R
-# $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D -# $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
+$db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D +$db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S # $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S
-# $lock_file = "$MYHOME/var/amavisd.lock"; # -L -# $lock_file = "$MYHOME/var/amavisd.lock"; # -L
-# $pid_file = "$MYHOME/var/amavisd.pid"; # -P -# $pid_file = "$MYHOME/var/amavisd.pid"; # -P
@ -209,7 +160,7 @@ index a612b49..d3acb42 100644
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps = ('virus'); @addr_extension_virus_maps = ('virus');
@@ -167,13 +170,16 @@ $defang_by_ccat{CC_UNCHECKED.",3"} = 1; # ambiguous content (e.g. multipart boun @@ -154,13 +157,16 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error
# $myhostname = 'host.example.com'; # must be a fully-qualified domain name! # $myhostname = 'host.example.com'; # must be a fully-qualified domain name!
@ -232,7 +183,7 @@ index a612b49..d3acb42 100644
# $bad_header_quarantine_method = undef; # $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl
@@ -342,8 +348,8 @@ $banned_filename_re = new_RE( @@ -329,8 +335,8 @@ $banned_filename_re = new_RE(
['lzma', \&do_uncompress, ['lzma', \&do_uncompress,
['lzmadec', 'xz -dc --format=lzma', ['lzmadec', 'xz -dc --format=lzma',
'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ], 'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ],
@ -241,9 +192,9 @@ index a612b49..d3acb42 100644
+# ['lrz', \&do_uncompress, +# ['lrz', \&do_uncompress,
+# ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ], +# ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ],
['lzo', \&do_uncompress, 'lzop -d'], ['lzo', \&do_uncompress, 'lzop -d'],
['lzip', \&do_uncompress, ['lzip -d'] ],
['lz4', \&do_uncompress, ['lz4c -d'] ], ['lz4', \&do_uncompress, ['lz4c -d'] ],
@@ -356,9 +362,9 @@ $banned_filename_re = new_RE( ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ],
@@ -342,9 +348,9 @@ $banned_filename_re = new_RE(
['arj', \&do_unarj, ['unarj', 'arj'] ], ['arj', \&do_unarj, ['unarj', 'arj'] ],
['arc', \&do_arc, ['nomarch', 'arc'] ], ['arc', \&do_arc, ['nomarch', 'arc'] ],
['zoo', \&do_zoo, ['zoo', 'unzoo'] ], ['zoo', \&do_zoo, ['zoo', 'unzoo'] ],
@ -255,26 +206,59 @@ index a612b49..d3acb42 100644
['tnef', \&do_tnef], ['tnef', \&do_tnef],
# ['lha', \&do_lha, 'lha'], # not safe, use 7z instead # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead
# ['sit', \&do_unstuff, 'unstuff'], # not safe # ['sit', \&do_unstuff, 'unstuff'], # not safe
@@ -396,7 +402,8 @@ $banned_filename_re = new_RE( @@ -363,13 +369,13 @@ $banned_filename_re = new_RE(
# * By dropping the --fdpass option, this command is easily adapted for
# use with a network socket (clamd running elsewhere).
#
- ['ClamAV-clamdscan', 'clamdscan', "--fdpass --stdout --no-summary {}",
+ ['ClamAV-clamdscan', 'clamdscan',
+ "--config-file=/etc/clamd.d/amavisd.conf --fdpass --stdout --no-summary {}",
[0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) # ### http://www.sophos.com/
@@ -406,7 +413,7 @@ $banned_filename_re = new_RE(
# ### http://www.sophos.com/ (EOL 31 March 2022)
# ['Sophos-SSSP', # SAV Dynamic Interface # ['Sophos-SSSP', # SAV Dynamic Interface
-# \&ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'], -# \&ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
+# \&ask_daemon, ["{}", 'sssp:/run/savdi/sssp.sock'], +# \&ask_daemon, ["{}", 'sssp:/run/savdi/sssp.sock'],
# # or: ["{}", 'sssp:[127.0.0.1]:4010'], # # or: ["{}", 'sssp:[127.0.0.1]:4010'],
# qr/^DONE OK\b/m, qr/^VIRUS\b/m, qr/^VIRUS\s*(\S*)/m ], # qr/^DONE OK\b/m, qr/^VIRUS\b/m, qr/^VIRUS\s*(\S*)/m ],
@@ -452,7 +459,7 @@ $banned_filename_re = new_RE( # ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
-# \&ask_daemon, ["{}/\n", 'sophie:/var/run/sophie'],
+# \&ask_daemon, ["{}/\n", 'sophie:/run/sophie'],
# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
@@ -382,16 +388,16 @@ $banned_filename_re = new_RE(
# qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
-# ### http://www.clamav.net/
-# ['ClamAV-clamd',
-# \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"],
-# qr/\bOK$/m, qr/\bFOUND$/m,
-# qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
-# # NOTE: run clamd under the same user as amavisd - or run it under its own
-# # uid such as clamav, add user clamav to the amavis group, and then add
-# # AllowSupplementaryGroups to clamd.conf;
-# # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
-# # this entry; when running chrooted one may prefer a socket under $MYHOME.
+ ### http://www.clamav.net/
+ ['ClamAV-clamd',
+ \&ask_daemon, ["CONTSCAN {}\n", "/run/clamd.amavisd/clamd.sock"],
+ qr/\bOK$/m, qr/\bFOUND$/m,
+ qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
+ # NOTE: run clamd under the same user as amavisd - or run it under its own
+ # uid such as clamav, add user clamav to the amavis group, and then add
+ # AllowSupplementaryGroups to clamd.conf;
+ # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
+ # this entry; when running chrooted one may prefer a socket under $MYHOME.
# ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
@@ -405,7 +411,7 @@ $banned_filename_re = new_RE(
# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
-# \&ask_daemon, ["{}/\n", 'trophie:/var/run/trophie'],
+# \&ask_daemon, ["{}/\n", 'trophie:/run/trophie'],
# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m,
# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
@@ -442,7 +448,7 @@ $banned_filename_re = new_RE(
# pack('N',0). # content size # pack('N',0). # content size
# pack('N',0), # pack('N',0),
# '/var/drweb/run/drwebd.sock', # '/var/drweb/run/drwebd.sock',
@ -283,7 +267,7 @@ index a612b49..d3acb42 100644
# # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default # # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default
# # '127.0.0.1:3000', # or over an inet socket # # '127.0.0.1:3000', # or over an inet socket
# ], # ],
@@ -467,7 +474,7 @@ $banned_filename_re = new_RE( @@ -457,7 +463,7 @@ $banned_filename_re = new_RE(
['KasperskyLab AVP - aveclient', ['KasperskyLab AVP - aveclient',
['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient', ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
'/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'], '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
@ -292,7 +276,7 @@ index a612b49..d3acb42 100644
[0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m, [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m,
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m, qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
], ],
@@ -576,12 +583,12 @@ $banned_filename_re = new_RE( @@ -560,12 +566,12 @@ $banned_filename_re = new_RE(
# ### http://www.avast.com/ # ### http://www.avast.com/
# ['avast! Antivirus daemon', # ['avast! Antivirus daemon',
# \&ask_daemon, # greets with 220, terminate with QUIT # \&ask_daemon, # greets with 220, terminate with QUIT
@ -307,7 +291,7 @@ index a612b49..d3acb42 100644
# qr/\t\[L\]\t([^[ \t\015\012]+)/m ], # qr/\t\[L\]\t([^[ \t\015\012]+)/m ],
['CAI InoculateIT', 'inocucmd', # retired product ['CAI InoculateIT', 'inocucmd', # retired product
@@ -717,8 +724,8 @@ $banned_filename_re = new_RE( @@ -701,8 +707,8 @@ $banned_filename_re = new_RE(
# ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'], # ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
# '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ], # '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ],
@ -318,21 +302,15 @@ index a612b49..d3acb42 100644
### http://www.ikarus-software.com/ ### http://www.ikarus-software.com/
['Ikarus AntiVirus for Linux', 'ikarus', ['Ikarus AntiVirus for Linux', 'ikarus',
@@ -822,12 +829,12 @@ $banned_filename_re = new_RE( @@ -763,7 +769,7 @@ $banned_filename_re = new_RE(
# /etc/clamd.conf, or may be controlled by your service manager / init. # [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
#
# ['ClamAV-clamd',
-# \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"],
+# \&ask_daemon, ["CONTSCAN {}\n", "/run/clamd.amavisd/clamd.sock"],
# qr/\bOK$/m, qr/\bFOUND$/m,
# qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ['ClamAV-clamd-stream', # ['ClamAV-clamd-stream',
-# \&ask_daemon, ["*", 'clamd:/var/run/clamav/clamd.sock'], -# \&ask_daemon, ["*", 'clamd:/var/run/clamav/clamd.sock'],
+# \&ask_daemon, ["*", 'clamd:/run/clamd.amavisd/clamd.sock'], +# \&ask_daemon, ["*", 'clamd:/run/clamav/clamd.sock'],
# qr/\bOK$/m, qr/\bFOUND$/m, # qr/\bOK$/m, qr/\bFOUND$/m,
# qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], # qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
-- --
2.50.1 2.29.2

View file

@ -1,12 +1,11 @@
# SNMP enabled by default %global with_snmp 1
%bcond_without snmp
Summary: Email filter with virus scanner and spamassassin support Summary: Email filter with virus scanner and spamassassin support
Name: amavis Name: amavis
Version: 2.14.0 Version: 2.12.1
Release: 3%{?dist} Release: 8%{?dist}
# LDAP schema is GFDL-1.2-or-later, some helpers are BSD-2-Clause, core is GPL-2.0-or-later # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+
License: GPL-2.0-or-later AND BSD-2-Clause AND GFDL-1.2-or-later License: GPLv2+ and BSD and GFDL
URL: https://gitlab.com/amavis/amavis URL: https://gitlab.com/amavis/amavis
Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v%{version}.tar.bz2 Source0: https://gitlab.com/amavis/amavis/-/archive/v%{version}/amavis-v%{version}.tar.bz2
Source2: amavis-clamd.conf Source2: amavis-clamd.conf
@ -15,9 +14,7 @@ Source5: README.quarantine
Source8: amavisd-tmpfiles.conf Source8: amavisd-tmpfiles.conf
Source9: amavisd.service Source9: amavisd.service
Source10: amavisd-snmp.service Source10: amavisd-snmp.service
Source11: amavis.sysusers Patch0: amavis-2.12.1-conf.patch
Source12: amavisd.sysconfig
Patch0: amavis-conf.patch
BuildArch: noarch BuildArch: noarch
%if 0%{?fedora} %if 0%{?fedora}
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
@ -25,11 +22,9 @@ BuildRequires: systemd-rpm-macros
BuildRequires: systemd BuildRequires: systemd
%endif %endif
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl-interpreter
%if 0%{?rhel} > 7 || 0%{?fedora} > 24 %if 0%{?rhel} > 7 || 0%{?fedora} > 24
Suggests: %{name}-doc Suggests: %{name}-doc
Recommends: clamav-server-systemd Recommends: clamav-server-systemd
Recommends: clamav
Recommends: binutils Recommends: binutils
Recommends: arj Recommends: arj
Recommends: bzip2 Recommends: bzip2
@ -43,6 +38,9 @@ Recommends: p7zip, p7zip-plugins
Recommends: tar Recommends: tar
Recommends: unzoo Recommends: unzoo
Recommends: perl(DBD::SQLite) Recommends: perl(DBD::SQLite)
Recommends: perl(DBI)
Recommends: perl(Mail::SpamAssassin)
Recommends: perl(Net::LDAP)
Recommends: perl(Convert::TNEF) Recommends: perl(Convert::TNEF)
Recommends: perl(Convert::UUlib) Recommends: perl(Convert::UUlib)
%else %else
@ -59,16 +57,26 @@ Requires: p7zip, p7zip-plugins
Requires: tar Requires: tar
Requires: unzoo Requires: unzoo
Requires: perl(DBD::SQLite) Requires: perl(DBD::SQLite)
Requires: perl(DBI)
Requires: perl(Mail::SpamAssassin)
Requires: perl(Net::LDAP)
%endif %endif
Requires: perl-Amavis = %{version}-%{release}
Requires: clamav-filesystem Requires: clamav-filesystem
Requires: altermime Requires: altermime
Requires: file Requires: file
Requires: perl(Archive::Tar) Requires: perl(Archive::Tar)
Requires: perl(Archive::Zip) >= 1.14
Requires: perl(Authen::SASL) Requires: perl(Authen::SASL)
Requires: perl(Compress::Zlib) >= 1.35
Requires: perl(Compress::Raw::Zlib) >= 2.017 Requires: perl(Compress::Raw::Zlib) >= 2.017
Requires: perl(Crypt::OpenSSL::RSA)
Requires: perl(Digest::MD5) >= 2.22
Requires: perl(Digest::SHA)
Requires: perl(File::LibMagic) Requires: perl(File::LibMagic)
Requires: perl(IO::Socket::IP) Requires: perl(IO::Socket::IP)
Requires: perl(IO::Socket::SSL)
Requires: perl(IO::Stringy)
Requires: perl(MIME::Base64)
Requires: perl(MIME::Body) Requires: perl(MIME::Body)
Requires: perl(MIME::Decoder::Base64) Requires: perl(MIME::Decoder::Base64)
Requires: perl(MIME::Decoder::Binary) Requires: perl(MIME::Decoder::Binary)
@ -77,26 +85,29 @@ Requires: perl(MIME::Decoder::NBit)
Requires: perl(MIME::Decoder::QuotedPrint) Requires: perl(MIME::Decoder::QuotedPrint)
Requires: perl(MIME::Decoder::UU) Requires: perl(MIME::Decoder::UU)
Requires: perl(MIME::Head) Requires: perl(MIME::Head)
Requires: perl(MIME::Parser)
Requires: perl(Mail::DKIM) >= 0.31
Requires: perl(Mail::Field) Requires: perl(Mail::Field)
Requires: perl(Mail::Header) Requires: perl(Mail::Header)
Requires: perl(Mail::Internet) >= 1.58 Requires: perl(Mail::Internet) >= 1.58
Requires: perl(Mail::SPF) Requires: perl(Mail::SPF)
Requires: perl(Net::DNS) Requires: perl(Net::DNS)
Requires: perl(Net::LibIDN2) Requires: perl(Net::LibIDN)
Requires: perl(Net::SSLeay) Requires: perl(Net::SSLeay)
Requires: perl(Net::Server) >= 2.0
Requires: perl(NetAddr::IP) Requires: perl(NetAddr::IP)
Requires: perl(Razor2::Client::Version) Requires: perl(Razor2::Client::Version)
Requires: perl(Socket) Requires: perl(Socket6)
Requires: perl(Time::HiRes) >= 1.49
Requires: perl(Unix::Syslog)
Requires: perl(URI) Requires: perl(URI)
Requires(pre): shadow-utils
Obsoletes: amavisd-new-zeromq <= 2.11.0-5 Obsoletes: amavisd-new-zeromq <= 2.11.0-5
Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5 Obsoletes: amavisd-new-snmp-zeromq <= 2.11.0-5
Provides: amavisd-new = %{version}-%{release} Provides: amavisd-new = %{version}-%{release}
Obsoletes: amavisd-new < 2.12.0-3 Obsoletes: amavisd-new < 2.12.0-3
%package -n perl-Amavis %if %{?with_snmp}
Summary: Amavis perl module
%if %{with snmp}
%package snmp %package snmp
Summary: Exports amavis SNMP data Summary: Exports amavis SNMP data
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -109,9 +120,6 @@ Summary: Amavis doc files
Provides: amavisd-new-doc = %{version}-%{release} Provides: amavisd-new-doc = %{version}-%{release}
Obsoletes: amavisd-new-doc < 2.12.0-3 Obsoletes: amavisd-new-doc < 2.12.0-3
%description -n perl-Amavis
Amavis perl module used by the amavis mail scanner service.
%description %description
amavis is a high-performance and reliable interface between mailer amavis is a high-performance and reliable interface between mailer
(MTA) and one or more content checkers: virus scanners, and/or (MTA) and one or more content checkers: virus scanners, and/or
@ -120,7 +128,7 @@ reliability, portability and maintainability. It talks to MTA via (E)SMTP
or LMTP, or by using helper programs. No timing gaps exist in the design or LMTP, or by using helper programs. No timing gaps exist in the design
which could cause a mail loss. which could cause a mail loss.
%if %{with snmp} %if %{?with_snmp}
%description snmp %description snmp
This package contains the program amavisd-snmp-subagent, which can be This package contains the program amavisd-snmp-subagent, which can be
used as a SNMP AgentX, exporting amavisd statistical counters database used as a SNMP AgentX, exporting amavisd statistical counters database
@ -138,30 +146,32 @@ alerting purposes.
Documentation files for amavis Documentation files for amavis
%prep %prep
%autosetup -p1 -n %{name}-v%{version} %setup -q -n %{name}-v%{version}
%patch0 -p1
install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/
sed -e 's,/var/amavis/amavisd.sock\>,%{_rundir}/amavisd/amavisd.sock,' -i amavisd-{release,submit}
%build %build
%install %install
mkdir -p -m 0755 %{buildroot}%{perl_vendorlib} rm -rf %{buildroot}
cp -pr lib/* %{buildroot}%{perl_vendorlib}/
install -D -p -m 755 bin/amavisd %{buildroot}%{_sbindir}/amavisd install -D -p -m 755 amavisd %{buildroot}%{_sbindir}/amavisd
%if %{?with_snmp} %if %{?with_snmp}
install -D -p -m 755 bin/amavisd-snmp-subagent %{buildroot}%{_sbindir}/amavisd-snmp-subagent install -D -p -m 755 amavisd-snmp-subagent %{buildroot}%{_sbindir}/amavisd-snmp-subagent
%endif %endif
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
install -p -m 755 bin/amavisd-{agent,nanny,release,signer,submit} %{buildroot}%{_bindir}/ install -p -m 755 amavisd-{agent,nanny,release,signer,submit} %{buildroot}%{_bindir}/
install -D -p -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/amavisd.service install -D -p -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/amavisd.service
%if %{with snmp} %if %{?with_snmp}
install -D -p -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/amavisd-snmp.service install -D -p -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/amavisd-snmp.service
%endif %endif
mkdir -p -m 0755 %{buildroot}%{_sysconfdir}/clamd.d mkdir -p -m 0755 %{buildroot}%{_sysconfdir}/clamd.d
install -D -p -m 644 conf/amavisd.conf %{buildroot}%{_sysconfdir}/amavisd/amavisd.conf install -D -p -m 644 amavisd.conf %{buildroot}%{_sysconfdir}/amavisd/amavisd.conf
install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/clamd.d/amavisd.conf install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/clamd.d/amavisd.conf
mkdir -p %{buildroot}%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} mkdir -p %{buildroot}%{_localstatedir}/spool/amavisd/{tmp,db,quarantine}
@ -169,15 +179,17 @@ mkdir -p %{buildroot}%{_rundir}/{clamd.amavisd,amavisd}
install -D -m 644 %{SOURCE8} %{buildroot}%{_tmpfilesdir}/amavisd.conf install -D -m 644 %{SOURCE8} %{buildroot}%{_tmpfilesdir}/amavisd.conf
install -p -D -m 0644 %{SOURCE11} %{buildroot}%{_sysusersdir}/amavis.conf %pre
getent group amavis > /dev/null || %{_sbindir}/groupadd -r amavis
install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/amavisd getent passwd amavis > /dev/null || \
%{_sbindir}/useradd -r -g amavis -d %{_localstatedir}/spool/amavisd -s /sbin/nologin \
-c "User for amavis" amavis
exit 0
%preun %preun
%systemd_preun amavisd.service %systemd_preun amavisd.service
%if %{with snmp} %if %{?with_snmp}
%preun snmp %preun snmp
%systemd_preun amavisd-snmp.service %systemd_preun amavisd-snmp.service
%endif %endif
@ -185,7 +197,7 @@ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/amavisd
%post %post
%systemd_post amavisd.service %systemd_post amavisd.service
%if %{with snmp} %if %{?with_snmp}
%post snmp %post snmp
%systemd_post amavisd-snmp.service %systemd_post amavisd-snmp.service
%endif %endif
@ -193,7 +205,7 @@ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/amavisd
%postun %postun
%systemd_postun_with_restart amavisd.service %systemd_postun_with_restart amavisd.service
%if %{with snmp} %if %{?with_snmp}
%postun snmp %postun snmp
%systemd_postun_with_restart amavisd-snmp.service %systemd_postun_with_restart amavisd-snmp.service
%endif %endif
@ -216,16 +228,10 @@ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/amavisd
%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/db %dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/db
%dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine %dir %attr(750,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine
%{_tmpfilesdir}/amavisd.conf %{_tmpfilesdir}/amavisd.conf
%{_sysusersdir}/amavis.conf
%dir %attr(755,amavis,amavis) %{_rundir}/amavisd %dir %attr(755,amavis,amavis) %{_rundir}/amavisd
%dir %attr(770,amavis,clamupdate) %{_rundir}/clamd.amavisd %dir %attr(770,amavis,clamupdate) %{_rundir}/clamd.amavisd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/amavisd
%files -n perl-Amavis %if %{?with_snmp}
%license LICENSE
%{perl_vendorlib}/*
%if %{with snmp}
%files snmp %files snmp
%doc AMAVIS-MIB.txt %doc AMAVIS-MIB.txt
%{_unitdir}/amavisd-snmp.service %{_unitdir}/amavisd-snmp.service
@ -234,83 +240,10 @@ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/amavisd
%files doc %files doc
%license LICENSE %license LICENSE
%doc AAAREADME.first contrib/LDAP.schema contrib/LDAP.ldif RELEASE_NOTES TODO %doc AAAREADME.first LDAP.schema LDAP.ldif RELEASE_NOTES TODO
%doc README_FILES conf/amavisd.conf-* conf/amavisd-custom.conf %doc README_FILES test-messages amavisd.conf-* amavisd-custom.conf
%changelog %changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jul 17 2025 Juan Orti Alcaine <jortialc@redhat.com> - 2.14.0-1
- Update to version 2.14.0 (RHBZ#2379545)
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.13.1-4
- Drop call to %sysusers_create_compat
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Mar 14 2024 Juan Orti Alcaine <jortialc@redhat.com> - 2.13.1-1
- Update to version 2.13.1
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat May 06 2023 Chris Adams <linux@cmadams.net> - 2.13.0-4
- Add a syconfig file to be able to add arguments
* Thu Feb 23 2023 Juan Orti Alcaine <jortialc@redhat.com> - 2.13.0-3
- Update configuration to use clamdscan
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sun Jan 08 2023 Juan Orti Alcaine <jortialc@redhat.com> - 2.13.0-1
- Version 2.13.0 (RHBZ#2158819)
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-10.git35407e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.12.2-9.git35407e9
- Perl 5.36 rebuild
* Mon May 30 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-8.git35407e9
- Update to latest git snapshot
* Mon Apr 04 2022 Michal Josef Špaček <mspacek@redhat.com> - 2.12.2-7.gitb561924
- Remove dependency to Socket6, in Socket is support for IPv6 too
* Wed Mar 09 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-6.gitb561924
- create perl-Amavis subpackage
* Tue Mar 08 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-5.gitb561924
- Update to master branch
- Switch from Net:LibIDN to Net:LibIDN2
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 06 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-3
- Remove perl(IO::Stringy) dependency
* Tue Oct 26 2021 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-2
- Create amavis user with systemd sysusers
* Fri Oct 22 2021 Juan Orti Alcaine <jortialc@redhat.com> - 2.12.2-1
- Version 2.12.2 (#2013555)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-8 * Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

View file

@ -1 +0,0 @@
u amavis - "Amavis email content filter" /var/spool/amavisd

View file

@ -7,9 +7,8 @@ Wants=clamd@amavisd.service
[Service] [Service]
Type=forking Type=forking
PIDFile=/run/amavisd/amavisd.pid PIDFile=/run/amavisd/amavisd.pid
EnvironmentFile=-/etc/sysconfig/amavisd ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf
ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf $ARGS ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf reload
ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf $ARGS reload
Restart=on-failure Restart=on-failure
PrivateTmp=true PrivateTmp=true
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_SETGID CAP_SETUID CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_SETGID CAP_SETUID

View file

@ -1,2 +0,0 @@
# Add additional arguments to amavisd command-line
#ARGS=""

View file

@ -1 +1 @@
SHA512 (amavis-v2.14.0.tar.bz2) = 49303d86947d7ae258c6def8cf9892ff062fd054b4bc6451b1670426a5d767782ed7febd350237d36d4b62db408cbb993b6b4522eb595ead77faafb07012fe58 SHA512 (amavis-v2.12.1.tar.bz2) = 8a2cef6ff6e2fa7f5d2e00a433a3f3ec7a15c47e21deadf6a25f50e0e29ad20d8641f474cd5d0dfcd3715458b07f08272f6df35efb2137b7c6a74a460cb91013