From: Frank Brehm Date: Thu, 8 Apr 2021 20:01:43 +0000 (+0200) Subject: committing changes in /etc made by "apt-get install -y python3-setuptools python3... X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=766049aa8064e11b07fb8bb717c86cdfe5c97a51;p=config%2Fhelga-hetzner%2Fetc.git committing changes in /etc made by "apt-get install -y python3-setuptools python3-pip python3-wheel python3-requests uwsgi uwsgi-plugin-python3 postfix postfix-pcre libsasl2-modules mariadb-client mariadb-server postfix-mysql libdbd-mysql-perl php-cli php-fpm php-json php-gd php-curl mcrypt php-intl php-xml php-mbstring php-zip php-mysql nginx-full dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-sieve dovecot-mysql amavisd-new libcrypt-openssl-rsa-perl libmail-dkim-perl clamav-freshclam clamav-daemon spamassassin altermime arj nomarch cpio lzop cabextract p7zip-full rpm libmail-spf-perl unrar-free pax lrzip mlmmj python3-pymysql python3-sqlalchemy python3-dnspython python3-pymysql python3-jinja2 python3-netifaces python3-bcrypt python3-dnspython python3-simplejson python3-pymysql zlib1g libuuid1 libmnl0 curl lm-sensors netcat bzip2 acl patch cron tofrodos logwatch unzip bsdutils liblz4-tool nftables" Package changes: +altermime 0.3.10-9 amd64 +amavisd-new 1:2.11.0-6.1 all +arj 3.10.22-18 amd64 +cabextract 1.9-1 amd64 +clamav-base 0.102.4+dfsg-0+deb10u1 all +clamav-daemon 0.102.4+dfsg-0+deb10u1 amd64 +clamav-freshclam 0.102.4+dfsg-0+deb10u1 amd64 +debugedit 4.14.2.1+dfsg1-1 amd64 +dovecot-core 1:2.3.4.1-5+deb10u6 amd64 +dovecot-imapd 1:2.3.4.1-5+deb10u6 amd64 +dovecot-lmtpd 1:2.3.4.1-5+deb10u6 amd64 +dovecot-managesieved 1:2.3.4.1-5+deb10u6 amd64 +dovecot-mysql 1:2.3.4.1-5+deb10u6 amd64 +dovecot-pop3d 1:2.3.4.1-5+deb10u6 amd64 +dovecot-sieve 1:2.3.4.1-5+deb10u6 amd64 +fontconfig-config 2.13.1-2 all +fonts-dejavu-core 2.37-1 all +libarchive-zip-perl 1.64-1 all +libarchive13 3.3.3-4+deb10u1 amd64 +libberkeleydb-perl 0.55-2 amd64 +libcgi-pm-perl 4.40-1 all +libclamav9 0.102.4+dfsg-0+deb10u1 amd64 +libconvert-binhex-perl 1.125-1 all +libconvert-tnef-perl 0.18-1 all +libconvert-uulib-perl 1:1.5~dfsg-1+b1 amd64 +libcrypt-openssl-bignum-perl 0.09-1+b1 amd64 +libcrypt-openssl-random-perl 0.15-1+b1 amd64 +libcrypt-openssl-rsa-perl 0.31-1+b1 amd64 +libdbd-mysql-perl 4.050-2 amd64 +libdw1 0.176-1.1 amd64 +libexttextcat-2.0-0 3.4.5-1 amd64 +libexttextcat-data 3.4.5-1 all +libfontconfig1 2.13.1-2 amd64 +libgd3 2.2.5-5.2 amd64 +libhtml-parser-perl 3.72-3+b3 amd64 +libhtml-tagset-perl 3.20-3 all +libhttp-date-perl 6.02-1 all +libio-multiplex-perl 1.16-1 all +libio-socket-inet6-perl 2.72-2 all +libio-stringy-perl 2.111-3 all +libjbig0 2.1-3.1+b2 amd64 +libjpeg62-turbo 1:1.5.2-2+deb10u1 amd64 +liblua5.3-0 5.3.3-1.1 amd64 +liblz4-tool 1.8.3-1 all +libmail-dkim-perl 0.54-1 all +libmail-spf-perl 2.9.0-4 all +libmatheval1 1.1.11+dfsg-3 amd64 +libmcrypt4 2.5.8-3.4 amd64 +libmhash2 0.9.9.9-7+b1 amd64 +libmime-tools-perl 5.509-1 all +libmspack0 0.10.1-1 amd64 +libnet-cidr-perl 0.19-1 all +libnet-server-perl 2.009-1 all +libnetaddr-ip-perl 4.079+dfsg-1+b3 amd64 +libnftables0 0.9.0-2 amd64 +libnginx-mod-http-auth-pam 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-dav-ext 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-echo 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-geoip 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-image-filter 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-subs-filter 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-upstream-fair 1.14.2-2+deb10u3 amd64 +libnginx-mod-http-xslt-filter 1.14.2-2+deb10u3 amd64 +libnginx-mod-mail 1.14.2-2+deb10u3 amd64 +libnginx-mod-stream 1.14.2-2+deb10u3 amd64 +libnspr4 2:4.20-1 amd64 +libnss3 2:3.42.1-1+deb10u3 amd64 +libpython3.7 3.7.3-2+deb10u3 amd64 +librpm8 4.14.2.1+dfsg1-1 amd64 +librpmbuild8 4.14.2.1+dfsg1-1 amd64 +librpmio8 4.14.2.1+dfsg1-1 amd64 +librpmsign8 4.14.2.1+dfsg1-1 amd64 +libsensors-config 1:3.5.0-3 all +libsensors5 1:3.5.0-3 amd64 +libsocket6-perl 0.29-1+b1 amd64 +libstemmer0d 0+svn585-1+b2 amd64 +libsys-hostname-long-perl 1.5-1 all +libtfm1 0.13-4 amd64 +libtiff5 4.1.0+git191117-2~deb10u2 amd64 +libunix-syslog-perl 1.1-3+b1 amd64 +liburi-perl 1.76-1 all +libwebp6 0.6.1-2 amd64 +libx11-6 2:1.6.7-1+deb10u1 amd64 +libx11-data 2:1.6.7-1+deb10u1 all +libxau6 1:1.0.8-1+b2 amd64 +libxcb1 1.13.1-2 amd64 +libxdmcp6 1:1.1.2-3 amd64 +libxpm4 1:3.5.12-1 amd64 +libxslt1.1 1.1.32-2.2~deb10u1 amd64 +libzip4 1.5.1-4 amd64 +lm-sensors 1:3.5.0-3 amd64 +logwatch 7.5.0-1 all +lrzip 0.631+git180528-1 amd64 +lz4 1.8.3-1 amd64 +lzop 1.03-4+b1 amd64 +mariadb-client 1:10.3.27-0+deb10u1 all +mcrypt 2.6.8-4 amd64 +mlmmj 1.3.0-3 amd64 +netcat 1.10-41.1 all +nftables 0.9.0-2 amd64 +nginx-common 1.14.2-2+deb10u3 all +nomarch 1.4-3+b2 amd64 +p7zip 16.02+dfsg-6 amd64 +p7zip-full 16.02+dfsg-6 amd64 +pax 1:20190224-1 amd64 +php-cli 2:7.3+69 all +php-common 2:69 all +php-curl 2:7.3+69 all +php-fpm 2:7.3+69 all +php-gd 2:7.3+69 all +php-intl 2:7.3+69 all +php-json 2:7.3+69 all +php-mbstring 2:7.3+69 all +php-mysql 2:7.3+69 all +php-xml 2:7.3+69 all +php-zip 2:7.3+69 all +php7.3-cli 7.3.27-1~deb10u1 amd64 +php7.3-common 7.3.27-1~deb10u1 amd64 +php7.3-curl 7.3.27-1~deb10u1 amd64 +php7.3-fpm 7.3.27-1~deb10u1 amd64 +php7.3-gd 7.3.27-1~deb10u1 amd64 +php7.3-intl 7.3.27-1~deb10u1 amd64 +php7.3-json 7.3.27-1~deb10u1 amd64 +php7.3-mbstring 7.3.27-1~deb10u1 amd64 +php7.3-mysql 7.3.27-1~deb10u1 amd64 +php7.3-opcache 7.3.27-1~deb10u1 amd64 +php7.3-readline 7.3.27-1~deb10u1 amd64 +php7.3-xml 7.3.27-1~deb10u1 amd64 +php7.3-zip 7.3.27-1~deb10u1 amd64 +python-pip-whl 18.1-5 all +python3-bcrypt 3.1.6-1 amd64 +python3-distutils 3.7.3-1 all +python3-dnspython 1.16.0-1 all +python3-lib2to3 3.7.3-1 all +python3-netifaces 0.10.4-1+b1 amd64 +python3-pip 18.1-5 all +python3-pymysql 0.9.3-1 all +python3-setuptools 40.8.0-1 all +python3-simplejson 3.16.0-1 amd64 +python3-sqlalchemy 1.2.18+ds1-2 all +python3-wheel 0.32.3-2 all +rpm 4.14.2.1+dfsg1-1 amd64 +rpm-common 4.14.2.1+dfsg1-1 amd64 +rpm2cpio 4.14.2.1+dfsg1-1 amd64 +spamassassin 3.4.2-1+deb10u3 all +tofrodos 1.7.13+ds-4 amd64 +unrar-free 1:0.0.1+cvs20140707-4 amd64 +unzip 6.0-23+deb10u2 amd64 +uwsgi 2.0.18-1 amd64 +uwsgi-core 2.0.18-1 amd64 +uwsgi-plugin-python3 2.0.18-1 amd64 --- diff --git a/.etckeeper b/.etckeeper index 568294f..7731562 100755 --- a/.etckeeper +++ b/.etckeeper @@ -7,6 +7,9 @@ mkdir -p './apt/auth.conf.d' mkdir -p './apt/preferences.d' mkdir -p './binfmt.d' mkdir -p './ca-certificates/update.d' +mkdir -p './clamav/onerrorexecute.d' +mkdir -p './clamav/onupdateexecute.d' +mkdir -p './clamav/virusevent.d' mkdir -p './dbus-1/session.d' mkdir -p './dbus-1/system.d' mkdir -p './dpkg/dpkg.cfg.d' @@ -23,6 +26,11 @@ mkdir -p './initramfs-tools/scripts/nfs-premount' mkdir -p './initramfs-tools/scripts/nfs-top' mkdir -p './initramfs-tools/scripts/panic' mkdir -p './kernel/install.d' +mkdir -p './logwatch/conf/logfiles' +mkdir -p './logwatch/conf/services' +mkdir -p './logwatch/scripts/services' +mkdir -p './nginx/conf.d' +mkdir -p './nginx/modules-available' mkdir -p './opt' mkdir -p './perl/CPAN' mkdir -p './postfix/dynamicmaps.cf.d' @@ -53,12 +61,36 @@ maybe chmod 0644 'aliases' maybe chmod 0644 'aliases.db' maybe chmod 0755 'alternatives' maybe chmod 0644 'alternatives/README' +maybe chmod 0755 'amavis' +maybe chmod 0644 'amavis/README.l10n' +maybe chmod 0755 'amavis/conf.d' +maybe chmod 0644 'amavis/conf.d/01-debian' +maybe chmod 0644 'amavis/conf.d/05-domain_id' +maybe chmod 0644 'amavis/conf.d/05-node_id' +maybe chmod 0644 'amavis/conf.d/15-av_scanners' +maybe chmod 0644 'amavis/conf.d/15-content_filter_mode' +maybe chmod 0644 'amavis/conf.d/20-debian_defaults' +maybe chmod 0644 'amavis/conf.d/25-amavis_helpers' +maybe chmod 0644 'amavis/conf.d/30-template_localization' +maybe chmod 0644 'amavis/conf.d/50-user' +maybe chmod 0755 'amavis/en_US' +maybe chmod 0644 'amavis/en_US/charset' +maybe chmod 0644 'amavis/en_US/template-auto-response.txt' +maybe chmod 0644 'amavis/en_US/template-dsn.txt' +maybe chmod 0644 'amavis/en_US/template-problem-feedback.txt' +maybe chmod 0644 'amavis/en_US/template-release-quarantine.txt' +maybe chmod 0644 'amavis/en_US/template-spam-admin.txt' +maybe chmod 0644 'amavis/en_US/template-spam-sender.txt' +maybe chmod 0644 'amavis/en_US/template-virus-admin.txt' +maybe chmod 0644 'amavis/en_US/template-virus-recipient.txt' +maybe chmod 0644 'amavis/en_US/template-virus-sender.txt' maybe chmod 0755 'apache2' maybe chmod 0644 'apache2/apache2.conf' maybe chmod 0755 'apache2/conf-available' maybe chmod 0644 'apache2/conf-available/charset.conf' maybe chmod 0644 'apache2/conf-available/localized-error-pages.conf' maybe chmod 0644 'apache2/conf-available/other-vhosts-access-log.conf' +maybe chmod 0644 'apache2/conf-available/php7.3-fpm.conf' maybe chmod 0644 'apache2/conf-available/security.conf' maybe chmod 0644 'apache2/conf-available/serve-cgi-bin.conf' maybe chmod 0755 'apache2/conf-enabled' @@ -217,11 +249,15 @@ maybe chmod 0755 'apm/event.d/20hdparm' maybe chmod 0755 'apparmor.d' maybe chmod 0755 'apparmor.d/force-complain' maybe chmod 0755 'apparmor.d/local' +maybe chmod 0644 'apparmor.d/local/usr.bin.freshclam' maybe chmod 0644 'apparmor.d/local/usr.bin.man' maybe chmod 0644 'apparmor.d/local/usr.sbin.chronyd' +maybe chmod 0644 'apparmor.d/local/usr.sbin.clamd' maybe chmod 0644 'apparmor.d/local/usr.sbin.named' +maybe chmod 0644 'apparmor.d/usr.bin.freshclam' maybe chmod 0644 'apparmor.d/usr.bin.man' maybe chmod 0644 'apparmor.d/usr.sbin.chronyd' +maybe chmod 0644 'apparmor.d/usr.sbin.clamd' maybe chmod 0644 'apparmor.d/usr.sbin.mysqld' maybe chmod 0644 'apparmor.d/usr.sbin.named' maybe chmod 0755 'apt' @@ -306,6 +342,14 @@ maybe chmod 0644 'cczerc' maybe chmod 0755 'chrony' maybe chmod 0644 'chrony/chrony.conf' maybe chmod 0640 'chrony/chrony.keys' +maybe chmod 0755 'clamav' +maybe chmod 0644 'clamav/clamd.conf' +maybe chown 'clamav' 'clamav/freshclam.conf' +maybe chgrp 'adm' 'clamav/freshclam.conf' +maybe chmod 0444 'clamav/freshclam.conf' +maybe chmod 0755 'clamav/onerrorexecute.d' +maybe chmod 0755 'clamav/onupdateexecute.d' +maybe chmod 0755 'clamav/virusevent.d' maybe chmod 0755 'cloud' maybe chmod 0644 'cloud/cloud.cfg' maybe chmod 0755 'cloud/cloud.cfg.d' @@ -374,10 +418,14 @@ maybe chmod 0644 'console-setup/compose.VISCII.inc' maybe chmod 0644 'console-setup/remap.inc' maybe chmod 0755 'cron.d' maybe chmod 0644 'cron.d/.placeholder' +maybe chmod 0644 'cron.d/amavisd-new' maybe chmod 0644 'cron.d/greetings' maybe chmod 0644 'cron.d/mdadm' +maybe chmod 0644 'cron.d/mlmmj' +maybe chmod 0644 'cron.d/php' maybe chmod 0755 'cron.daily' maybe chmod 0644 'cron.daily/.placeholder' +maybe chmod 0755 'cron.daily/00logwatch' maybe chmod 0755 'cron.daily/apache2' maybe chmod 0755 'cron.daily/apt-compat' maybe chmod 0755 'cron.daily/aptitude' @@ -389,6 +437,7 @@ maybe chmod 0755 'cron.daily/man-db' maybe chmod 0755 'cron.daily/mdadm' maybe chmod 0755 'cron.daily/mlocate' maybe chmod 0755 'cron.daily/passwd' +maybe chmod 0755 'cron.daily/spamassassin' maybe chmod 0755 'cron.hourly' maybe chmod 0644 'cron.hourly/.placeholder' maybe chmod 0755 'cron.monthly' @@ -410,6 +459,7 @@ maybe chmod 0644 'debconf.conf' maybe chmod 0644 'debian_version' maybe chmod 0755 'default' maybe chmod 0644 'default/acpid' +maybe chmod 0644 'default/amavisd-snmp-subagent' maybe chmod 0644 'default/apache-htcacheclean' maybe chmod 0644 'default/bind9' maybe chmod 0644 'default/bsdmainutils' @@ -418,6 +468,7 @@ maybe chmod 0644 'default/console-setup' maybe chmod 0644 'default/cron' maybe chmod 0644 'default/cryptdisks' maybe chmod 0644 'default/dbus' +maybe chmod 0644 'default/dovecot' maybe chmod 0644 'default/grub' maybe chmod 0755 'default/grub.d' maybe chmod 0644 'default/grub.d/init-select.cfg' @@ -427,11 +478,14 @@ maybe chmod 0644 'default/locale' maybe chmod 0644 'default/mdadm' maybe chmod 0644 'default/mysql' maybe chmod 0644 'default/networking' +maybe chmod 0644 'default/nginx' maybe chmod 0644 'default/nss' maybe chmod 0644 'default/rsync' maybe chmod 0644 'default/rsyslog' +maybe chmod 0644 'default/spamassassin' maybe chmod 0644 'default/ssh' maybe chmod 0644 'default/useradd' +maybe chmod 0644 'default/uwsgi' maybe chmod 0644 'deluser.conf' maybe chmod 0755 'dhcp' maybe chmod 0644 'dhcp/debug' @@ -443,6 +497,43 @@ maybe chmod 0755 'dhcp/dhclient-exit-hooks.d/hook-dhclient' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/timesyncd' maybe chmod 0644 'dhcp/dhclient.conf' +maybe chmod 0755 'dovecot' +maybe chmod 0755 'dovecot/conf.d' +maybe chmod 0644 'dovecot/conf.d/10-auth.conf' +maybe chmod 0644 'dovecot/conf.d/10-director.conf' +maybe chmod 0644 'dovecot/conf.d/10-logging.conf' +maybe chmod 0644 'dovecot/conf.d/10-mail.conf' +maybe chmod 0644 'dovecot/conf.d/10-master.conf' +maybe chmod 0644 'dovecot/conf.d/10-ssl.conf' +maybe chmod 0644 'dovecot/conf.d/10-tcpwrapper.conf' +maybe chmod 0644 'dovecot/conf.d/15-lda.conf' +maybe chmod 0644 'dovecot/conf.d/15-mailboxes.conf' +maybe chmod 0644 'dovecot/conf.d/20-imap.conf' +maybe chmod 0644 'dovecot/conf.d/20-lmtp.conf' +maybe chmod 0644 'dovecot/conf.d/20-managesieve.conf' +maybe chmod 0644 'dovecot/conf.d/20-pop3.conf' +maybe chmod 0644 'dovecot/conf.d/90-acl.conf' +maybe chmod 0644 'dovecot/conf.d/90-plugin.conf' +maybe chmod 0644 'dovecot/conf.d/90-quota.conf' +maybe chmod 0644 'dovecot/conf.d/90-sieve-extprograms.conf' +maybe chmod 0644 'dovecot/conf.d/90-sieve.conf' +maybe chmod 0644 'dovecot/conf.d/auth-checkpassword.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-deny.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-dict.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-master.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-passwdfile.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-sql.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-static.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-system.conf.ext' +maybe chmod 0644 'dovecot/conf.d/auth-vpopmail.conf.ext' +maybe chgrp 'dovecot' 'dovecot/dovecot-dict-auth.conf.ext' +maybe chmod 0640 'dovecot/dovecot-dict-auth.conf.ext' +maybe chgrp 'dovecot' 'dovecot/dovecot-dict-sql.conf.ext' +maybe chmod 0640 'dovecot/dovecot-dict-sql.conf.ext' +maybe chgrp 'dovecot' 'dovecot/dovecot-sql.conf.ext' +maybe chmod 0640 'dovecot/dovecot-sql.conf.ext' +maybe chmod 0644 'dovecot/dovecot.conf' +maybe chmod 0700 'dovecot/private' maybe chmod 0755 'dpkg' maybe chmod 0644 'dpkg/dpkg.cfg' maybe chmod 0755 'dpkg/dpkg.cfg.d' @@ -500,6 +591,23 @@ maybe chmod 0755 'etckeeper/update-ignore.d/01update-ignore' maybe chmod 0644 'etckeeper/update-ignore.d/README' maybe chmod 0755 'etckeeper/vcs.d' maybe chmod 0755 'etckeeper/vcs.d/50vcs-cmd' +maybe chmod 0755 'fonts' +maybe chmod 0755 'fonts/conf.avail' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-lgc-sans.conf' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-lgc-serif.conf' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-sans.conf' +maybe chmod 0644 'fonts/conf.avail/20-unhint-small-dejavu-serif.conf' +maybe chmod 0644 'fonts/conf.avail/57-dejavu-sans-mono.conf' +maybe chmod 0644 'fonts/conf.avail/57-dejavu-sans.conf' +maybe chmod 0644 'fonts/conf.avail/57-dejavu-serif.conf' +maybe chmod 0644 'fonts/conf.avail/58-dejavu-lgc-sans-mono.conf' +maybe chmod 0644 'fonts/conf.avail/58-dejavu-lgc-sans.conf' +maybe chmod 0644 'fonts/conf.avail/58-dejavu-lgc-serif.conf' +maybe chmod 0755 'fonts/conf.d' +maybe chmod 0644 'fonts/conf.d/README' +maybe chmod 0644 'fonts/fonts.conf' maybe chmod 0644 'fstab' maybe chmod 0644 'gai.conf' maybe chmod 0755 'groff' @@ -529,13 +637,19 @@ maybe chmod 0644 'hostname' maybe chmod 0644 'hosts' maybe chmod 0644 'hosts.allow' maybe chmod 0644 'hosts.deny' +maybe chmod 0755 'init' maybe chmod 0755 'init.d' maybe chmod 0755 'init.d/acpid' +maybe chmod 0755 'init.d/amavis' +maybe chmod 0755 'init.d/amavis-mc' +maybe chmod 0755 'init.d/amavisd-snmp-subagent' maybe chmod 0755 'init.d/apache-htcacheclean' maybe chmod 0755 'init.d/apache2' maybe chmod 0755 'init.d/atd' maybe chmod 0755 'init.d/bind9' maybe chmod 0755 'init.d/chrony' +maybe chmod 0755 'init.d/clamav-daemon' +maybe chmod 0755 'init.d/clamav-freshclam' maybe chmod 0755 'init.d/cloud-config' maybe chmod 0755 'init.d/cloud-final' maybe chmod 0755 'init.d/cloud-init' @@ -545,15 +659,19 @@ maybe chmod 0755 'init.d/cron' maybe chmod 0755 'init.d/cryptdisks' maybe chmod 0755 'init.d/cryptdisks-early' maybe chmod 0755 'init.d/dbus' +maybe chmod 0755 'init.d/dovecot' maybe chmod 0755 'init.d/hwclock.sh' maybe chmod 0755 'init.d/keyboard-setup.sh' maybe chmod 0755 'init.d/kmod' +maybe chmod 0755 'init.d/lm-sensors' maybe chmod 0755 'init.d/lvm2' maybe chmod 0755 'init.d/lvm2-lvmpolld' maybe chmod 0755 'init.d/mdadm' maybe chmod 0755 'init.d/mdadm-waitidle' maybe chmod 0755 'init.d/mysql' maybe chmod 0755 'init.d/networking' +maybe chmod 0755 'init.d/nginx' +maybe chmod 0755 'init.d/php7.3-fpm' maybe chmod 0755 'init.d/postfix' maybe chmod 0755 'init.d/procps' maybe chmod 0755 'init.d/qemu-guest-agent' @@ -561,9 +679,12 @@ maybe chmod 0755 'init.d/rsync' maybe chmod 0755 'init.d/rsyslog' maybe chmod 0755 'init.d/salt-minion' maybe chmod 0755 'init.d/screen-cleanup' +maybe chmod 0755 'init.d/spamassassin' maybe chmod 0755 'init.d/ssh' maybe chmod 0755 'init.d/sudo' maybe chmod 0755 'init.d/udev' +maybe chmod 0755 'init.d/uwsgi' +maybe chmod 0644 'init/php7.3-fpm.conf' maybe chmod 0755 'initramfs-tools' maybe chmod 0755 'initramfs-tools/conf.d' maybe chmod 0644 'initramfs-tools/conf.d/resume' @@ -619,13 +740,18 @@ maybe chmod 0644 'ld.so.conf.d/libc.conf' maybe chmod 0644 'ld.so.conf.d/x86_64-linux-gnu.conf' maybe chmod 0755 'ldap' maybe chmod 0644 'ldap/ldap.conf' +maybe chmod 0755 'ldap/schema' +maybe chmod 0644 'ldap/schema/amavis.schema' maybe chmod 0644 'libaudit.conf' maybe chmod 0644 'locale.alias' maybe chmod 0644 'locale.gen' maybe chmod 0755 'logcheck' maybe chmod 0755 'logcheck/ignore.d.paranoid' +maybe chmod 0644 'logcheck/ignore.d.paranoid/clamav-daemon' maybe chmod 0644 'logcheck/ignore.d.paranoid/mariadb-server-10_3' maybe chmod 0755 'logcheck/ignore.d.server' +maybe chmod 0644 'logcheck/ignore.d.server/clamav-daemon' +maybe chmod 0644 'logcheck/ignore.d.server/clamav-freshclam' maybe chmod 0644 'logcheck/ignore.d.server/gpg-agent' maybe chmod 0644 'logcheck/ignore.d.server/libsasl2-modules' maybe chmod 0644 'logcheck/ignore.d.server/mariadb-server-10_3' @@ -645,11 +771,22 @@ maybe chmod 0644 'logrotate.d/aptitude' maybe chmod 0644 'logrotate.d/bind' maybe chmod 0644 'logrotate.d/btmp' maybe chmod 0644 'logrotate.d/chrony' +maybe chmod 0644 'logrotate.d/clamav-daemon' +maybe chmod 0644 'logrotate.d/clamav-freshclam' maybe chmod 0644 'logrotate.d/dpkg' maybe chmod 0644 'logrotate.d/mysql-server' +maybe chmod 0644 'logrotate.d/nginx' +maybe chmod 0644 'logrotate.d/php7.3-fpm' maybe chmod 0644 'logrotate.d/rsyslog' maybe chmod 0644 'logrotate.d/salt-common' +maybe chmod 0644 'logrotate.d/uwsgi' maybe chmod 0644 'logrotate.d/wtmp' +maybe chmod 0755 'logwatch' +maybe chmod 0755 'logwatch/conf' +maybe chmod 0755 'logwatch/conf/logfiles' +maybe chmod 0755 'logwatch/conf/services' +maybe chmod 0755 'logwatch/scripts' +maybe chmod 0755 'logwatch/scripts/services' maybe chmod 0755 'lvm' maybe chmod 0700 'lvm/archive' maybe chmod 0700 'lvm/backup' @@ -668,6 +805,7 @@ maybe chmod 0644 'lvm/profile/vdo-small.profile' maybe chmod 0444 'machine-id' maybe chmod 0644 'magic' maybe chmod 0644 'magic.mime' +maybe chmod 0755 'mail' maybe chmod 0644 'mailcap' maybe chmod 0644 'mailcap.order' maybe chmod 0644 'mailname' @@ -700,6 +838,7 @@ maybe chmod 0644 'nanorc' maybe chmod 0755 'network' maybe chmod 0755 'network/if-down.d' maybe chmod 0755 'network/if-down.d/bind9' +maybe chmod 0755 'network/if-down.d/clamav-freshclam-ifupdown' maybe chmod 0755 'network/if-down.d/postfix' maybe chmod 0755 'network/if-post-down.d' maybe chmod 0755 'network/if-post-down.d/chrony' @@ -708,12 +847,34 @@ maybe chmod 0755 'network/if-pre-up.d/ethtool' maybe chmod 0755 'network/if-up.d' maybe chmod 0755 'network/if-up.d/bind9' maybe chmod 0755 'network/if-up.d/chrony' +maybe chmod 0755 'network/if-up.d/clamav-freshclam-ifupdown' maybe chmod 0755 'network/if-up.d/ethtool' maybe chmod 0755 'network/if-up.d/postfix' maybe chmod 0644 'network/interfaces' maybe chmod 0755 'network/interfaces.d' maybe chmod 0644 'network/interfaces.d/50-cloud-init' maybe chmod 0644 'networks' +maybe chmod 0755 'nftables.conf' +maybe chmod 0755 'nginx' +maybe chmod 0755 'nginx/conf.d' +maybe chmod 0644 'nginx/fastcgi.conf' +maybe chmod 0644 'nginx/fastcgi_params' +maybe chmod 0644 'nginx/koi-utf' +maybe chmod 0644 'nginx/koi-win' +maybe chmod 0644 'nginx/mime.types' +maybe chmod 0755 'nginx/modules-available' +maybe chmod 0755 'nginx/modules-enabled' +maybe chmod 0644 'nginx/nginx.conf' +maybe chmod 0644 'nginx/proxy_params' +maybe chmod 0644 'nginx/scgi_params' +maybe chmod 0755 'nginx/sites-available' +maybe chmod 0644 'nginx/sites-available/default' +maybe chmod 0755 'nginx/sites-enabled' +maybe chmod 0755 'nginx/snippets' +maybe chmod 0644 'nginx/snippets/fastcgi-php.conf' +maybe chmod 0644 'nginx/snippets/snakeoil.conf' +maybe chmod 0644 'nginx/uwsgi_params' +maybe chmod 0644 'nginx/win-utf' maybe chmod 0644 'nsswitch.conf' maybe chmod 0755 'opt' maybe chmod 0644 'pam.conf' @@ -728,6 +889,7 @@ maybe chmod 0644 'pam.d/common-password' maybe chmod 0644 'pam.d/common-session' maybe chmod 0644 'pam.d/common-session-noninteractive' maybe chmod 0644 'pam.d/cron' +maybe chmod 0644 'pam.d/dovecot' maybe chmod 0644 'pam.d/login' maybe chmod 0644 'pam.d/newusers' maybe chmod 0644 'pam.d/other' @@ -745,6 +907,52 @@ maybe chmod 0755 'perl' maybe chmod 0755 'perl/CPAN' maybe chmod 0755 'perl/Net' maybe chmod 0644 'perl/Net/libnet.cfg' +maybe chmod 0755 'php' +maybe chmod 0755 'php/7.3' +maybe chmod 0755 'php/7.3/cli' +maybe chmod 0755 'php/7.3/cli/conf.d' +maybe chmod 0644 'php/7.3/cli/php.ini' +maybe chmod 0755 'php/7.3/fpm' +maybe chmod 0755 'php/7.3/fpm/conf.d' +maybe chmod 0644 'php/7.3/fpm/php-fpm.conf' +maybe chmod 0644 'php/7.3/fpm/php.ini' +maybe chmod 0755 'php/7.3/fpm/pool.d' +maybe chmod 0644 'php/7.3/fpm/pool.d/www.conf' +maybe chmod 0755 'php/7.3/mods-available' +maybe chmod 0644 'php/7.3/mods-available/calendar.ini' +maybe chmod 0644 'php/7.3/mods-available/ctype.ini' +maybe chmod 0644 'php/7.3/mods-available/curl.ini' +maybe chmod 0644 'php/7.3/mods-available/dom.ini' +maybe chmod 0644 'php/7.3/mods-available/exif.ini' +maybe chmod 0644 'php/7.3/mods-available/fileinfo.ini' +maybe chmod 0644 'php/7.3/mods-available/ftp.ini' +maybe chmod 0644 'php/7.3/mods-available/gd.ini' +maybe chmod 0644 'php/7.3/mods-available/gettext.ini' +maybe chmod 0644 'php/7.3/mods-available/iconv.ini' +maybe chmod 0644 'php/7.3/mods-available/intl.ini' +maybe chmod 0644 'php/7.3/mods-available/json.ini' +maybe chmod 0644 'php/7.3/mods-available/mbstring.ini' +maybe chmod 0644 'php/7.3/mods-available/mysqli.ini' +maybe chmod 0644 'php/7.3/mods-available/mysqlnd.ini' +maybe chmod 0644 'php/7.3/mods-available/opcache.ini' +maybe chmod 0644 'php/7.3/mods-available/pdo.ini' +maybe chmod 0644 'php/7.3/mods-available/pdo_mysql.ini' +maybe chmod 0644 'php/7.3/mods-available/phar.ini' +maybe chmod 0644 'php/7.3/mods-available/posix.ini' +maybe chmod 0644 'php/7.3/mods-available/readline.ini' +maybe chmod 0644 'php/7.3/mods-available/shmop.ini' +maybe chmod 0644 'php/7.3/mods-available/simplexml.ini' +maybe chmod 0644 'php/7.3/mods-available/sockets.ini' +maybe chmod 0644 'php/7.3/mods-available/sysvmsg.ini' +maybe chmod 0644 'php/7.3/mods-available/sysvsem.ini' +maybe chmod 0644 'php/7.3/mods-available/sysvshm.ini' +maybe chmod 0644 'php/7.3/mods-available/tokenizer.ini' +maybe chmod 0644 'php/7.3/mods-available/wddx.ini' +maybe chmod 0644 'php/7.3/mods-available/xml.ini' +maybe chmod 0644 'php/7.3/mods-available/xmlreader.ini' +maybe chmod 0644 'php/7.3/mods-available/xmlwriter.ini' +maybe chmod 0644 'php/7.3/mods-available/xsl.ini' +maybe chmod 0644 'php/7.3/mods-available/zip.ini' maybe chmod 0755 'postfix' maybe chmod 0644 'postfix/dynamicmaps.cf' maybe chmod 0755 'postfix/dynamicmaps.cf.d' @@ -767,10 +975,12 @@ maybe chmod 0755 'ppp' maybe chmod 0755 'ppp/ip-down.d' maybe chmod 0755 'ppp/ip-down.d/bind9' maybe chmod 0755 'ppp/ip-down.d/chrony' +maybe chmod 0755 'ppp/ip-down.d/clamav-freshclam-ifupdown' maybe chmod 0755 'ppp/ip-down.d/postfix' maybe chmod 0755 'ppp/ip-up.d' maybe chmod 0755 'ppp/ip-up.d/bind9' maybe chmod 0755 'ppp/ip-up.d/chrony' +maybe chmod 0755 'ppp/ip-up.d/clamav-freshclam-ifupdown' maybe chmod 0755 'ppp/ip-up.d/postfix' maybe chmod 0644 'profile' maybe chmod 0755 'profile.d' @@ -800,6 +1010,7 @@ maybe chmod 0755 'rc4.d' maybe chmod 0755 'rc5.d' maybe chmod 0755 'rc6.d' maybe chmod 0755 'rcS.d' +maybe chmod 0644 'rearj.cfg' maybe chmod 0644 'reportbug.conf' maybe chmod 0644 'resolv.conf' maybe chmod 0755 'resolvconf' @@ -841,6 +1052,9 @@ maybe chmod 0644 'security/sepermit.conf' maybe chmod 0644 'security/time.conf' maybe chmod 0755 'selinux' maybe chmod 0644 'selinux/semanage.conf' +maybe chmod 0755 'sensors.d' +maybe chmod 0644 'sensors.d/.placeholder' +maybe chmod 0644 'sensors3.conf' maybe chmod 0644 'services' maybe chgrp 'shadow' 'shadow' maybe chmod 0640 'shadow' @@ -853,6 +1067,19 @@ maybe chmod 0644 'skel/.bashrc' maybe chmod 0644 'skel/.bashrc.orig' maybe chmod 0644 'skel/.cloud-locale-test.skip' maybe chmod 0644 'skel/.profile' +maybe chmod 0755 'spamassassin' +maybe chmod 0644 'spamassassin/65_debian.cf' +maybe chmod 0644 'spamassassin/init.pre' +maybe chmod 0644 'spamassassin/local.cf' +maybe chmod 0755 'spamassassin/sa-update-hooks.d' +maybe chmod 0755 'spamassassin/sa-update-hooks.d/amavisd-new' +maybe chmod 0644 'spamassassin/v310.pre' +maybe chmod 0644 'spamassassin/v312.pre' +maybe chmod 0644 'spamassassin/v320.pre' +maybe chmod 0644 'spamassassin/v330.pre' +maybe chmod 0644 'spamassassin/v340.pre' +maybe chmod 0644 'spamassassin/v341.pre' +maybe chmod 0644 'spamassassin/v342.pre' maybe chmod 0755 'ssh' maybe chmod 0644 'ssh/moduli' maybe chmod 0644 'ssh/ssh_config' @@ -895,6 +1122,8 @@ maybe chmod 0644 'systemd/resolved.conf' maybe chmod 0644 'systemd/sleep.conf' maybe chmod 0755 'systemd/system' maybe chmod 0644 'systemd/system.conf' +maybe chmod 0755 'systemd/system/clamav-daemon.service.d' +maybe chmod 0644 'systemd/system/clamav-daemon.service.d/extend.conf' maybe chmod 0755 'systemd/system/cloud-init.target.wants' maybe chmod 0755 'systemd/system/getty.target.wants' maybe chmod 0755 'systemd/system/multi-user.target.wants' @@ -919,11 +1148,19 @@ maybe chmod 0644 'udev/udev.conf' maybe chmod 0755 'ufw' maybe chmod 0755 'ufw/applications.d' maybe chmod 0644 'ufw/applications.d/bind9' +maybe chmod 0644 'ufw/applications.d/dovecot-imapd' +maybe chmod 0644 'ufw/applications.d/dovecot-pop3d' +maybe chmod 0644 'ufw/applications.d/nginx' maybe chmod 0644 'ufw/applications.d/openssh-server' maybe chmod 0644 'ufw/applications.d/postfix' maybe chmod 0755 'update-motd.d' maybe chmod 0755 'update-motd.d/10-uname' maybe chmod 0644 'updatedb.conf' +maybe chmod 0755 'uwsgi' +maybe chmod 0755 'uwsgi/apps-available' +maybe chmod 0644 'uwsgi/apps-available/README' +maybe chmod 0755 'uwsgi/apps-enabled' +maybe chmod 0644 'uwsgi/apps-enabled/README' maybe chmod 0755 'vim' maybe chmod 0644 'vim/vimrc' maybe chmod 0644 'vim/vimrc.local' diff --git a/aliases b/aliases index 93a3249..1c94d8c 100644 --- a/aliases +++ b/aliases @@ -1,2 +1,3 @@ # See man 5 aliases for format postmaster: root +clamav: root diff --git a/aliases.db b/aliases.db index 063bb0c..1dd8ece 100644 Binary files a/aliases.db and b/aliases.db differ diff --git a/alternatives/phar b/alternatives/phar new file mode 120000 index 0000000..b3b4ae7 --- /dev/null +++ b/alternatives/phar @@ -0,0 +1 @@ +/usr/bin/phar7.3 \ No newline at end of file diff --git a/alternatives/phar.1.gz b/alternatives/phar.1.gz new file mode 120000 index 0000000..f308505 --- /dev/null +++ b/alternatives/phar.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/phar7.3.1.gz \ No newline at end of file diff --git a/alternatives/phar.phar b/alternatives/phar.phar new file mode 120000 index 0000000..a03cf84 --- /dev/null +++ b/alternatives/phar.phar @@ -0,0 +1 @@ +/usr/bin/phar.phar7.3 \ No newline at end of file diff --git a/alternatives/phar.phar.1.gz b/alternatives/phar.phar.1.gz new file mode 120000 index 0000000..74ee7f3 --- /dev/null +++ b/alternatives/phar.phar.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/phar.phar7.3.1.gz \ No newline at end of file diff --git a/alternatives/php b/alternatives/php new file mode 120000 index 0000000..c890124 --- /dev/null +++ b/alternatives/php @@ -0,0 +1 @@ +/usr/bin/php7.3 \ No newline at end of file diff --git a/alternatives/php.1.gz b/alternatives/php.1.gz new file mode 120000 index 0000000..4338797 --- /dev/null +++ b/alternatives/php.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/php7.3.1.gz \ No newline at end of file diff --git a/alternatives/unrar b/alternatives/unrar new file mode 120000 index 0000000..2c6210a --- /dev/null +++ b/alternatives/unrar @@ -0,0 +1 @@ +/usr/bin/unrar-free \ No newline at end of file diff --git a/alternatives/unrar.1.gz b/alternatives/unrar.1.gz new file mode 120000 index 0000000..9e2a2d4 --- /dev/null +++ b/alternatives/unrar.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/unrar-free.1.gz \ No newline at end of file diff --git a/alternatives/uwsgi b/alternatives/uwsgi new file mode 120000 index 0000000..2878c85 --- /dev/null +++ b/alternatives/uwsgi @@ -0,0 +1 @@ +/usr/bin/uwsgi-core \ No newline at end of file diff --git a/alternatives/uwsgi-plugin-python3 b/alternatives/uwsgi-plugin-python3 new file mode 120000 index 0000000..8931231 --- /dev/null +++ b/alternatives/uwsgi-plugin-python3 @@ -0,0 +1 @@ +/usr/lib/uwsgi/plugins/python37_plugin.so \ No newline at end of file diff --git a/alternatives/uwsgi.1.gz b/alternatives/uwsgi.1.gz new file mode 120000 index 0000000..bb1ba92 --- /dev/null +++ b/alternatives/uwsgi.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/uwsgi-core.1.gz \ No newline at end of file diff --git a/alternatives/uwsgi_python3 b/alternatives/uwsgi_python3 new file mode 120000 index 0000000..2878c85 --- /dev/null +++ b/alternatives/uwsgi_python3 @@ -0,0 +1 @@ +/usr/bin/uwsgi-core \ No newline at end of file diff --git a/alternatives/uwsgi_python3.1.gz b/alternatives/uwsgi_python3.1.gz new file mode 120000 index 0000000..4f34268 --- /dev/null +++ b/alternatives/uwsgi_python3.1.gz @@ -0,0 +1 @@ +/usr/share/man/man1/uwsgi_python37.1.gz \ No newline at end of file diff --git a/amavis/README.l10n b/amavis/README.l10n new file mode 100644 index 0000000..0b8c1a3 --- /dev/null +++ b/amavis/README.l10n @@ -0,0 +1,21 @@ +$Id: README.l10n 742 2005-12-26 17:15:22Z hmh $ + +First of all, read /usr/share/doc/amavisd-new/README.customize.gz + +Amavisd-new is UTF8-aware, and it will do character-set conversion when dealing +with DSN templates. The full unicode codespace is available, if used with the +proper encodings... and you have to use the proper encodings if you don't want +your DSNs to be flagged as more charset-challenged SPAM by other systems. + +ALWAYS respect the charset when adding l10n files. + +Amavisd-new does charset conversion twice: one when reading the text files with +localized templates (to internal perl UTF8), and another when writing the email +notification (from internal perl UTF8 to $hdr_encoding and $bdy_encoding). + +Headers will be RFC2047-encoded if they have any codepoints not allowed by +RFC2822 after the charset conversions. The body text charset encoding is +inserted in the proper MIME header. + +More details are available in /usr/share/doc/amavisd-new/RELEASE_NOTES.gz + diff --git a/amavis/conf.d/01-debian b/amavis/conf.d/01-debian new file mode 100644 index 0000000..764d8d4 --- /dev/null +++ b/amavis/conf.d/01-debian @@ -0,0 +1,47 @@ +use strict; + +# ADMINISTRATORS: +# Debian suggests that any changes you need to do that should never +# be "updated" by the Debian package should be made in another file, +# overriding the settings in this file. +# +# The package will *not* overwrite your settings, but by keeping +# them separate, you will make the task of merging changes on these +# configuration files much simpler... + +# see /usr/share/doc/amavisd-new/examples/amavisd.conf-default for +# a list of all variables with their defaults; +# see /usr/share/doc/amavisd-new/examples/amavisd.conf-sample for +# a traditional-style commented file +# [note: the above files were not converted to Debian settings!] +# +# for more details see documentation in /usr/share/doc/amavisd-new +# and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html + + +# SETTINGS RARELY MODIFIED BY THE LOCAL ADMIN + +$ENV{PATH} = $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; +$file = 'file'; +$gzip = 'gzip'; +$bzip2 = 'bzip2'; +$lzop = 'lzop'; +$rpm2cpio = ['rpm2cpio.pl','rpm2cpio']; +$cabextract = 'cabextract'; +$uncompress = ['uncompress', 'gzip -d', 'zcat']; +#$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; #disabled (non-free, no security support) +$unfreeze = undef; +$arc = ['nomarch', 'arc']; +$unarj = ['arj', 'unarj']; +#$unrar = ['rar', 'unrar']; #disabled (non-free, no security support) +$unrar = ['unrar-free']; +$zoo = 'zoo'; +$lha = 'lha'; +$lha = undef; +$pax = 'pax'; +$cpio = 'cpio'; +$ar = 'ar'; +$ripole = 'ripole'; +$dspam = 'dspam'; + +1; # ensure a defined return diff --git a/amavis/conf.d/05-domain_id b/amavis/conf.d/05-domain_id new file mode 100644 index 0000000..e1174c0 --- /dev/null +++ b/amavis/conf.d/05-domain_id @@ -0,0 +1,19 @@ +use strict; + +# $mydomain is used just for convenience in the config files and it is not +# used internally by amavisd-new except in the default X_HEADER_LINE (which +# Debian overrides by default anyway). + +chomp($mydomain = `head -n 1 /etc/mailname`); + +# amavisd-new needs to know which email domains are to be considered local +# to the administrative domain. Only emails to "local" domains are subject +# to certain functionality, such as the addition of spam tags. +# +# Default local domains to $mydomain and all subdomains. Remember to +# override or redefine this if $mydomain is changed later in the config +# sequence. + +@local_domains_acl = ( ".$mydomain" ); + +1; # ensure a defined return diff --git a/amavis/conf.d/05-node_id b/amavis/conf.d/05-node_id new file mode 100644 index 0000000..4d2d37d --- /dev/null +++ b/amavis/conf.d/05-node_id @@ -0,0 +1,13 @@ +use strict; + +# $myhostname is used by amavisd-new for node identification, and it is +# important to get it right (e.g. for ESMTP EHLO, loop detection, and so on). + +chomp($myhostname = `hostname --fqdn`); + +# To manually set $myhostname, edit the following line with the correct Fully +# Qualified Domain Name (FQDN) and remove the # at the beginning of the line. +# +#$myhostname = "mail.example.com"; + +1; # ensure a defined return diff --git a/amavis/conf.d/15-av_scanners b/amavis/conf.d/15-av_scanners new file mode 100644 index 0000000..1e0b527 --- /dev/null +++ b/amavis/conf.d/15-av_scanners @@ -0,0 +1,475 @@ +use strict; + +## +## AV Scanners (Debian version) +## + +@av_scanners = ( + +# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/) +# ['Sophie', +# \&ask_daemon, ["{}/\n", '/var/run/sophie'], +# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m, +# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ], + +# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/ +# ['Sophos SAVI', \&sophos_savi ], + +### http://www.clamav.net/ + ['ClamAV-clamd', + \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"], + 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 socket "$MYHOME/clamd". + +# ### http://www.openantivirus.org/ +# ['OpenAntiVirus ScannerDaemon (OAV)', +# \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'], +# qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ], + +# ### http://www.vanja.com/tools/trophie/ +# ['Trophie', +# \&ask_daemon, ["{}/\n", '/var/run/trophie'], +# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m, +# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ], + +# ### http://www.grisoft.com/ +# ['AVG Anti-Virus', +# \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'], +# qr/^200/m, qr/^403/m, qr/^403 .*?: ([^\r\n]+)/m ], + +# ### http://www.f-prot.com/ +# ['F-Prot fpscand', # F-PROT Antivirus for BSD/Linux/Solaris, version 6 +# \&ask_daemon, +# ["SCAN FILE {}/*\n", '127.0.0.1:10200'], +# qr/^(0|8|64) /m, +# qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m, +# qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ], + +# ### http://www.f-prot.com/ +# ['F-Prot f-protd', # old version +# \&ask_daemon, +# ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n", +# ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202', +# '127.0.0.1:10203', '127.0.0.1:10204'] ], +# qr/(?i)]*>clean<\/summary>/m, +# qr/(?i)]*>infected<\/summary>/m, +# qr/(?i)(.+)<\/name>/m ], + +# ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/ +# ['DrWebD', \&ask_daemon, # DrWebD 4.31 or later +# [pack('N',1). # DRWEBD_SCAN_CMD +# pack('N',0x00280001). # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES +# pack('N', # path length +# length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")). +# '{}/*'. # path +# pack('N',0). # content size +# pack('N',0), +# '/var/drweb/run/drwebd.sock', +# # '/var/amavis/var/run/drwebd.sock', # suitable for chroot +# # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default +# # '127.0.0.1:3000', # or over an inet socket +# ], +# qr/\A\x00[\x10\x11][\x00\x10]\x00/sm, # IS_CLEAN,EVAL_KEY; SKIPPED +# qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF +# qr/\A.{12}(?:infected with )?([^\x00]+)\x00/sm, +# ], +# # NOTE: If using amavis-milter, change length to: +# # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx"). + + ### http://www.kaspersky.com/ (kav4mailservers) + ['KasperskyLab AVP - aveclient', + ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient', + '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'], + '-p /var/run/aveserver -s {}/*', + [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m, + qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m, + ], + # NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious, + # currupted or protected archives are to be handled + + ### http://www.kaspersky.com/ + ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'], + '-* -P -B -Y -O- {}', [0,3,6,8], [2,4], # any use for -A -K ? + qr/infected: (.+)/m, + sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"}, + sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, + ], + + ### The kavdaemon and AVPDaemonClient have been removed from Kasperky + ### products and replaced by aveserver and aveclient + ['KasperskyLab AVPDaemonClient', + [ '/opt/AVP/kavdaemon', 'kavdaemon', + '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient', + '/opt/AVP/AvpTeamDream', 'AvpTeamDream', + '/opt/AVP/avpdc', 'avpdc' ], + "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/m ], + # change the startup-script in /etc/init.d/kavd to: + # DPARMS="-* -Y -dl -f=/var/amavis /var/amavis" + # (or perhaps: DPARMS="-I0 -Y -* /var/amavis" ) + # adjusting /var/amavis above to match your $TEMPBASE. + # The '-f=/var/amavis' is needed if not running it as root, so it + # can find, read, and write its pid file, etc., see 'man kavdaemon'. + # defUnix.prf: there must be an entry "*/var/amavis" (or whatever + # directory $TEMPBASE specifies) in the 'Names=' section. + # cd /opt/AVP/DaemonClients; configure; cd Sample; make + # cp AvpDaemonClient /opt/AVP/ + # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}" + + ### http://www.centralcommand.com/ + ['CentralCommand Vexira (new) vascan', + ['vascan','/usr/lib/Vexira/vascan'], + "-a s --timeout=60 --temp=$TEMPBASE -y $QUARANTINEDIR ". + "--log=/var/log/vascan.log {}", + [0,3], [1,2,5], + qr/(?x)^\s* (?:virus|iworm|macro|mutant|sequence|trojan)\ found:\ ( [^\]\s']+ )\ \.\.\.\ /m ], + # Adjust the path of the binary and the virus database as needed. + # 'vascan' does not allow to have the temp directory to be the same as + # the quarantine directory, and the quarantine option can not be disabled. + # If $QUARANTINEDIR is not used, then another directory must be specified + # to appease 'vascan'. Move status 3 to the second list if password + # protected files are to be considered infected. + + ### http://www.avira.com/ + ### Avira AntiVir (formerly H+BEDV) or (old) CentralCommand Vexira Antivirus + ['Avira AntiVir', ['antivir','vexira'], + '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/m, + qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) | + (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/m ], + # NOTE: if you only have a demo version, remove -z and add 214, as in: + # '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/, + + ### http://www.commandsoftware.com/ + ['Command AntiVirus for Linux', 'csav', + '-all -archive -packed {}', [50], [51,52,53], + qr/Infection: (.+)/m ], + + ### http://www.symantec.com/ + ['Symantec CarrierScan via Symantec CommandLineScanner', + 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}', + qr/^Files Infected:\s+0$/m, qr/^Infected\b/m, + qr/^(?:Info|Virus Name):\s+(.+)/m ], + + ### http://www.symantec.com/ + ['Symantec AntiVirus Scan Engine', + 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}', + [0], qr/^Infected\b/m, + qr/^(?:Info|Virus Name):\s+(.+)/m ], + # NOTE: check options and patterns to see which entry better applies + +# ### http://www.f-secure.com/products/anti-virus/ version 4.65 +# ['F-Secure Antivirus for Linux servers', +# ['/opt/f-secure/fsav/bin/fsav', 'fsav'], +# '--delete=no --disinf=no --rename=no --archive=yes --auto=yes '. +# '--dumb=yes --list=no --mime=yes {}', [0], [3,6,8], +# qr/(?:infection|Infected|Suspected): (.+)/m ], + + ### http://www.f-secure.com/products/anti-virus/ version 5.52 + ['F-Secure Antivirus for Linux servers', + ['/opt/f-secure/fsav/bin/fsav', 'fsav'], + '--virus-action1=report --archive=yes --auto=yes '. + '--dumb=yes --list=no --mime=yes {}', [0], [3,4,6,8], + qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ], + # NOTE: internal archive handling may be switched off by '--archive=no' + # to prevent fsav from exiting with status 9 on broken archives + +# ### http://www.avast.com/ +# ['avast! Antivirus daemon', +# \&ask_daemon, # greets with 220, terminate with QUIT +# ["SCAN {}\015\012QUIT\015\012", '/var/run/avast4/mailscanner.sock'], +# qr/\t\[\+\]/m, qr/\t\[L\]\t/m, qr/\t\[L\]\t([^[ \t\015\012]+)/m ], + +# ### http://www.avast.com/ +# ['avast! Antivirus - Client/Server Version', 'avastlite', +# '-a /var/run/avast4/mailscanner.sock -n {}', [0], [1], +# qr/\t\[L\]\t([^[ \t\015\012]+)/m ], + + ['CAI InoculateIT', 'inocucmd', # retired product + '-sec -nex {}', [0], [100], + qr/was infected by virus (.+)/m ], + # see: http://www.flatmtn.com/computer/Linux-Antivirus_CAI.html + + ### http://www3.ca.com/Solutions/Product.asp?ID=156 (ex InoculateIT) + ['CAI eTrust Antivirus', 'etrust-wrapper', + '-arc -nex -spm h {}', [0], [101], + qr/is infected by virus: (.+)/m ], + # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer + # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783 + + ### http://mks.com.pl/english.html + ['MkS_Vir for Linux (beta)', ['mks32','mks'], + '-s {}/*', [0], [1,2], + qr/--[ \t]*(.+)/m ], + + ### http://mks.com.pl/english.html + ['MkS_Vir daemon', 'mksscan', + '-s -q {}', [0], [1..7], + qr/^... (\S+)/m ], + +# ### http://www.nod32.com/, version v2.52 (old) +# ['ESET NOD32 for Linux Mail servers', +# ['/opt/eset/nod32/bin/nod32cli', 'nod32cli'], +# '--subdir --files -z --sfx --rtp --adware --unsafe --pattern --heur '. +# '-w -a --action-on-infected=accept --action-on-uncleanable=accept '. +# '--action-on-notscanned=accept {}', +# [0,3], [1,2], qr/virus="([^"]+)"/m ], + +# ### http://www.eset.com/, version v2.7 (old) +# ['ESET NOD32 Linux Mail Server - command line interface', +# ['/usr/bin/nod32cli', '/opt/eset/nod32/bin/nod32cli', 'nod32cli'], +# '--subdir {}', [0,3], [1,2], qr/virus="([^"]+)"/m ], + +# ### http://www.eset.com/, version 2.71.12 +# ['ESET Software ESETS Command Line Interface', +# ['/usr/bin/esets_cli', 'esets_cli'], +# '--subdir {}', [0], [1,2,3], qr/virus="([^"]+)"/m ], + + ### http://www.eset.com/, version 3.0 + ['ESET Software ESETS Command Line Interface', + ['/usr/bin/esets_cli', 'esets_cli'], + '--subdir {}', [0], [2,3], + qr/:\s*action="(?!accepted)[^"]*"\n.*:\s*virus="([^"]*)"/m ], + + ## http://www.nod32.com/, NOD32LFS version 2.5 and above + ['ESET NOD32 for Linux File servers', + ['/opt/eset/nod32/sbin/nod32','nod32'], + '--files -z --mail --sfx --rtp --adware --unsafe --pattern --heur '. + '-w -a --action=1 -b {}', + [0], [1,10], qr/^object=.*, virus="(.*?)",/m ], + +# Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31 +# ['ESET Software NOD32 Client/Server (NOD32SS)', +# \&ask_daemon2, # greets with 200, persistent, terminate with QUIT +# ["SCAN {}/*\r\n", '127.0.0.1:8448' ], +# qr/^200 File OK/m, qr/^201 /m, qr/^201 (.+)/m ], + +# Disabled as it conflicts with packaged /usr/bin/nvcc of "nvidia-cuda-toolkit" +# (LP: 1582318) +# ### http://www.norman.com/products_nvc.shtml +# ['Norman Virus Control v5 / Linux', 'nvcc', +# '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14], +# qr/(?i).* virus in .* -> \'(.+)\'/m ], + + ### http://www.pandasoftware.com/ + ['Panda CommandLineSecure 9 for Linux', + ['/opt/pavcl/usr/bin/pavcl','pavcl'], + '-auto -aex -heu -cmp -nbr -nor -nos -eng -nob {}', + qr/Number of files infected[ .]*: 0+(?!\d)/m, + qr/Number of files infected[ .]*: 0*[1-9]/m, + qr/Found virus :\s*(\S+)/m ], + # NOTE: for efficiency, start the Panda in resident mode with 'pavcl -tsr' + # before starting amavisd - the bases are then loaded only once at startup. + # To reload bases in a signature update script: + # /opt/pavcl/usr/bin/pavcl -tsr -ulr; /opt/pavcl/usr/bin/pavcl -tsr + # Please review other options of pavcl, for example: + # -nomalw, -nojoke, -nodial, -nohackt, -nospyw, -nocookies + +# ### http://www.pandasoftware.com/ +# ['Panda Antivirus for Linux', ['pavcl'], +# '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}', +# [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0], +# qr/Found virus :\s*(\S+)/m ], + +# GeCAD AV technology is acquired by Microsoft; RAV has been discontinued. +# Check your RAV license terms before fiddling with the following two lines! +# ['GeCAD RAV AntiVirus 8', 'ravav', +# '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/m ], +# # NOTE: the command line switches changed with scan engine 8.5 ! +# # (btw, assigning stdin to /dev/null causes RAV to fail) + + ### http://www.nai.com/ + ['NAI McAfee AntiVirus (uvscan)', 'uvscan', + '--secure -rv --mime --summary --noboot - {}', [0], [13], + qr/(?x) Found (?: + \ the\ (.+)\ (?:virus|trojan) | + \ (?:virus|trojan)\ or\ variant\ ([^ ]+) | + :\ (.+)\ NOT\ a\ virus)/m, + # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'}, + # sub {delete $ENV{LD_PRELOAD}}, + ], + # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before + # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6 + # and then clear it when finished to avoid confusing anything else. + # NOTE2: to treat encrypted files as viruses replace the [13] with: + # qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/ + + ### http://www.virusbuster.hu/en/ + ['VirusBuster', ['vbuster', 'vbengcl'], + "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1], + qr/: '(.*)' - Virus/m ], + # VirusBuster Ltd. does not support the daemon version for the workstation + # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of + # binaries, some parameters AND return codes have changed (from 3 to 1). + # See also the new Vexira entry 'vascan' which is possibly related. + +# ### http://www.virusbuster.hu/en/ +# ['VirusBuster (Client + Daemon)', 'vbengd', +# '-f -log scandir {}', [0], [3], +# qr/Virus found = (.*);/m ], +# # HINT: for an infected file it always returns 3, +# # although the man-page tells a different story + + ### http://www.cyber.com/ + ['CyberSoft VFind', 'vfind', + '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m, + # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'}, + ], + + ### http://www.avast.com/ + ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'], + '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ], + + ### http://www.ikarus-software.com/ + ['Ikarus AntiVirus for Linux', 'ikarus', + '{}', [0], [40], qr/Signature (.+) found/m ], + + ### http://www.bitdefender.com/ + ['BitDefender', 'bdscan', # new version + '--action=ignore --no-list {}', qr/^Infected files *:0+(?!\d)/m, + qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m, + qr/(?:suspected|infected): (.*)(?:\033|$)/m ], + + ### http://www.bitdefender.com/ + ['BitDefender', 'bdc', # old version + '--arc --mail {}', qr/^Infected files *:0+(?!\d)/m, + qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m, + qr/(?:suspected|infected): (.*)(?:\033|$)/m ], + # consider also: --all --nowarn --alev=15 --flev=15. The --all argument may + # not apply to your version of bdc, check documentation and see 'bdc --help' + + ### ArcaVir for Linux and Unix http://www.arcabit.pl/ + ['ArcaVir for Linux', ['arcacmd','arcacmd.static'], + '-v 1 -summary 0 -s {}', [0], [1,2], + qr/(?:VIR|WIR):[ \t]*(.+)/m ], + +# ['File::Scan', sub {Amavis::AV::ask_av(sub{ +# use File::Scan; my($fn)=@_; +# my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0); +# my($vname) = $f->scan($fn); +# $f->error ? (2,"Error: ".$f->error) +# : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) }, +# ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ], + +# ### fully-fledged checker for JPEG marker segments of invalid length +# ['check-jpeg', +# sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) }, +# ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ], +# # NOTE: place file JpegTester.pm somewhere where Perl can find it, +# # for example in /usr/local/lib/perl5/site_perl + +# ### example: simpleminded checker for JPEG marker segments with +# ### invalid length (only checks first 32k, which is not thorough enough) +# ['check-jpeg-simple', +# sub { Amavis::AV::ask_av(sub { +# my($f)=@_; local(*FF,$_,$1,$2); my(@r)=(0,'not jpeg'); +# open(FF,$f) or die "jpeg: open err $f: $!"; +# binmode(FF) or die "jpeg: binmode err $f: $!"; +# defined read(FF,$_,32000) or die "jpeg: read err $f: $!"; +# close(FF) or die "jpeg: close err $f: $!"; +# if (/^\xff\xd8\xff/) { +# @r=(0,'jpeg ok'); +# while (!/\G(?:\xff\xd9|\z)/gc) { # EOI or eof +# if (/\G\xff+(?=\xff|\z)/gc) {} # fill-bytes before marker +# elsif (/\G\xff([\x01\xd0-\xd8])/gc) {} # TEM, RSTi, SOI +# elsif (/\G\xff([^\x00\xff])(..)/gcs) { # marker segment start +# my($n)=unpack("n",$2)-2; +# $n=32766 if $n>32766; # Perl regexp limit +# if ($n<0) {@r=(1,"bad jpeg: len=$n, pos=".pos); last} +# elsif (/\G.{$n}/gcs) {} # ok +# elsif (/\G.{0,$n}\z/gcs) {last} # truncated +# else {@r=(1,"bad jpeg: unexpected, pos=".pos); last} +# } +# elsif (/\G[^\xff]+/gc) {} # ECS +# elsif (/\G(?:\xff\x00)+/gc) {} # ECS +# else {@r=(2,"bad jpeg: unexpected char, pos=".pos); last} +# } +# }; @r}, @_) }, +# ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ], + +# ### an example/testing/template virus scanner (external), wastes 3 seconds +# ['wasteful sleeper example', +# '/bin/sleep', '3', # calls external program +# undef, undef, qr/no such/m ], + +# ### an example/testing/template virus scanner (internal), does nothing +# ['null', +# sub {}, ["{}"], # supplies its own subroutine, no external program +# undef, undef, qr/no such/m ], + +); + + +# If no virus scanners from the @av_scanners list produce 'clean' nor +# 'infected' status (i.e. they all fail to run or the list is empty), +# then _all_ scanners from the @av_scanners_backup list are tried +# (again, subject to $first_infected_stops_scan). When there are both +# daemonized and equivalent or similar command-line scanners available, +# it is customary to place slower command-line scanners in the +# @av_scanners_backup list. The default choice is somewhat arbitrary, +# move entries from one list to another as desired, keeping main scanners +# in the primary list to avoid warnings. + +@av_scanners_backup = ( + + ### http://www.clamav.net/ - backs up clamd or Mail::ClamAV + ['ClamAV-clamscan', 'clamscan', + "--stdout --no-summary -r --tempdir=$TEMPBASE {}", + [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], + + ### http://www.f-prot.com/ - backs up F-Prot Daemon, V6 + ['F-PROT Antivirus for UNIX', ['fpscan'], + '--report --mount --adware {}', # consider: --applications -s 4 -u 3 -z 10 + [0,8,64], [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3], + qr/^\[Found\s+[^\]]*\]\s+<([^ \t(>]*)/m ], + + ### http://www.f-prot.com/ - backs up F-Prot Daemon (old) + ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'], + '-dumb -archive -packed {}', [0,8], [3,6], # or: [0], [3,6,8], + qr/(?:Infection:|security risk named) (.+)|\s+contains\s+(.+)$/m ], + + ### http://www.trendmicro.com/ - backs up Trophie + ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'], + '-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ], + + ### http://www.sald.com/, http://drweb.imshop.de/ - backs up DrWebD + ['drweb - DrWeb Antivirus', # security LHA hole in Dr.Web 4.33 and earlier + ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'], + '-path={} -al -go -ot -cn -upn -ok-', + [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ], + + ### http://www.kaspersky.com/ + ['Kaspersky Antivirus v5.5', + ['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner', + '/opt/kav/5.5/kav4unix/bin/kavscanner', + '/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'], + '-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25], + qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m, +# sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"}, +# sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, + ], + +# Commented out because the name 'sweep' clashes with Debian and FreeBSD +# package/port of an audio editor. Make sure the correct 'sweep' is found +# in the path when enabling. +# +# ### http://www.sophos.com/ - backs up Sophie or SAVI-Perl +# ['Sophos Anti Virus (sweep)', 'sweep', +# '-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '. +# '--no-reset-atime {}', +# [0,2], qr/Virus .*? found/m, +# qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m, +# ], +# # other options to consider: -idedir=/usr/local/sav + +# Always succeeds and considers mail clean. +# Potentially useful when all other scanners fail and it is desirable +# to let mail continue to flow with no virus checking (when uncommented). +# ['always-clean', sub {0}], + +); + +1; # ensure a defined return diff --git a/amavis/conf.d/15-content_filter_mode b/amavis/conf.d/15-content_filter_mode new file mode 100644 index 0000000..57c62c8 --- /dev/null +++ b/amavis/conf.d/15-content_filter_mode @@ -0,0 +1,27 @@ +use strict; + +# You can modify this file to re-enable SPAM checking through spamassassin +# and to re-enable antivirus checking. + +# +# Default antivirus checking mode +# Please note, that anti-virus checking is DISABLED by +# default. +# If You wish to enable it, please uncomment the following lines: + + +#@bypass_virus_checks_maps = ( +# \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re); + + +# +# Default SPAM checking mode +# Please note, that anti-spam checking is DISABLED by +# default. +# If You wish to enable it, please uncomment the following lines: + + +#@bypass_spam_checks_maps = ( +# \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re); + +1; # ensure a defined return diff --git a/amavis/conf.d/20-debian_defaults b/amavis/conf.d/20-debian_defaults new file mode 100644 index 0000000..e1c6756 --- /dev/null +++ b/amavis/conf.d/20-debian_defaults @@ -0,0 +1,212 @@ +use strict; + +# ADMINISTRATORS: +# Debian suggests that any changes you need to do that should never +# be "updated" by the Debian package should be made in another file, +# overriding the settings in this file. +# +# The package will *not* overwrite your settings, but by keeping +# them separate, you will make the task of merging changes on these +# configuration files much simpler... + +# see /usr/share/doc/amavisd-new/examples/amavisd.conf-default for +# a list of all variables with their defaults; +# see /usr/share/doc/amavisd-new/examples/amavisd.conf-sample for +# a traditional-style commented file +# [note: the above files were not converted to Debian settings!] +# +# for more details see documentation in /usr/share/doc/amavisd-new +# and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html + +$QUARANTINEDIR = "$MYHOME/virusmails"; +$quarantine_subdir_levels = 1; # enable quarantine dir hashing + +$log_recip_templ = undef; # disable by-recipient level-0 log entries +$DO_SYSLOG = 1; # log via syslogd (preferred) +$syslog_ident = 'amavis'; # syslog ident tag, prepended to all messages +$syslog_facility = 'mail'; +$syslog_priority = 'debug'; # switch to info to drop debug output, etc + +$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) +$enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1 + +$inet_socket_port = 10024; # default listening socket + +$sa_spam_subject_tag = '***SPAM*** '; +$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level +$sa_tag2_level_deflt = 6.31; # add 'spam detected' headers at that level +$sa_kill_level_deflt = 6.31; # triggers spam evasive actions +$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent + +$sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger +$sa_local_tests_only = 0; # only tests which do not require internet access? + +# Quota limits to avoid bombs (like 42.zip) + +$MAXLEVELS = 14; +$MAXFILES = 1500; +$MIN_EXPANSION_QUOTA = 100*1024; # bytes +$MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes + +# You should: +# Use D_DISCARD to discard data (viruses) +# Use D_BOUNCE to generate local bounces by amavisd-new +# Use D_REJECT to generate local or remote bounces by the calling MTA +# Use D_PASS to deliver the message +# +# Whatever you do, *NEVER* use D_REJECT if you have other MTAs *forwarding* +# mail to your account. Use D_BOUNCE instead, otherwise you are delegating +# the bounce work to your friendly forwarders, which might not like it at all. +# +# On dual-MTA setups, one can often D_REJECT, as this just makes your own +# MTA generate the bounce message. Test it first. +# +# Bouncing viruses is stupid, always discard them after you are sure the AV +# is working correctly. Bouncing real SPAM is also useless, if you cannot +# D_REJECT it (and don't D_REJECT mail coming from your forwarders!). + +$final_virus_destiny = D_DISCARD; # (data not lost, see virus quarantine) +$final_banned_destiny = D_DISCARD; +$final_spam_destiny = D_PASS; +$final_bad_header_destiny = D_PASS; # False-positive prone (for spam) + +$enable_dkim_verification = 0; #disabled to prevent warning + +$virus_admin = "postmaster\@$mydomain"; # due to D_DISCARD default + +# Set to empty ("") to add no header +$X_HEADER_LINE = "Debian $myproduct_name at $mydomain"; + +# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS + +# +# DO NOT SEND VIRUS NOTIFICATIONS TO OUTSIDE OF YOUR DOMAIN. EVER. +# +# These days, almost all viruses fake the envelope sender and mail headers. +# Therefore, "virus notifications" became nothing but undesired, aggravating +# SPAM. This holds true even inside one's domain. We disable them all by +# default, except for the EICAR test pattern. +# + +@viruses_that_fake_sender_maps = (new_RE( + [qr'\bEICAR\b'i => 0], # av test pattern name + [qr/.*/ => 1], # true for everything else +)); + +@keep_decoded_original_maps = (new_RE( +# qr'^MAIL$', # retain full original message for virus checking (can be slow) + qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables + qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i, +# qr'^Zip archive data', # don't trust Archive::Zip +)); + + +# for $banned_namepath_re, a new-style of banned table, see amavisd.conf-sample + +$banned_filename_re = new_RE( +# qr'^UNDECIPHERABLE$', # is or contains any undecipherable components + + # block certain double extensions anywhere in the base name + qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i, + + qr'\{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\}?$'i, # Windows Class ID CLSID, strict + + qr'^application/x-msdownload$'i, # block these MIME types + qr'^application/x-msdos-program$'i, + qr'^application/hta$'i, + +# qr'^application/x-msmetafile$'i, # Windows Metafile MIME type +# qr'^\.wmf$', # Windows Metafile file(1) type + +# qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types + +# [ qr'^\.(Z|gz|bz2)$' => 0 ], # allow any in Unix-compressed +# [ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives +# [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ], # allow any within such archives +# [ qr'^application/x-zip-compressed$'i => 0], # allow any within such archives + + qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl)$'i, # banned extension - basic +# qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta| +# inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst| +# ops|pcd|pif|prg|reg|scr|sct|shb|shs|vb|vbe|vbs| +# wmf|wsc|wsf|wsh)$'ix, # banned ext - long + +# qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab. + + qr'^\.(exe-ms)$', # banned file(1) types +# qr'^\.(exe|lha|tnef|cab|dll)$', # banned file(1) types +); +# See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631 +# and http://www.cknow.com/vtutor/vtextensions.htm + + +# ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING + +@score_sender_maps = ({ # a by-recipient hash lookup table, + # results from all matching recipient tables are summed + +# ## per-recipient personal tables (NOTE: positive: black, negative: white) +# 'user1@example.com' => [{'bla-mobile.press@example.com' => 10.0}], +# 'user3@example.com' => [{'.ebay.com' => -3.0}], +# 'user4@example.com' => [{'cleargreen@cleargreen.com' => -7.0, +# '.cleargreen.com' => -5.0}], + + ## site-wide opinions about senders (the '.' matches any recipient) + '.' => [ # the _first_ matching sender determines the score boost + + new_RE( # regexp-type lookup table, just happens to be all soft-blacklist + [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i => 5.0], + [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0], + [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0], + [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i => 5.0], + [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i => 5.0], + [qr'^(your_friend|greatoffers)@'i => 5.0], + [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0], + ), + +# read_hash("/var/amavis/sender_scores_sitewide"), + +# This are some examples for whitelists, since envelope senders can be forged +# they are not enabled by default. + { # a hash-type lookup table (associative array) + #'nobody@cert.org' => -3.0, + #'cert-advisory@us-cert.gov' => -3.0, + #'owner-alert@iss.net' => -3.0, + #'slashdot@slashdot.org' => -3.0, + #'securityfocus.com' => -3.0, + #'ntbugtraq@listserv.ntbugtraq.com' => -3.0, + #'security-alerts@linuxsecurity.com' => -3.0, + #'mailman-announce-admin@python.org' => -3.0, + #'amavis-user-admin@lists.sourceforge.net'=> -3.0, + #'amavis-user-bounces@lists.sourceforge.net' => -3.0, + #'spamassassin.apache.org' => -3.0, + #'notification-return@lists.sophos.com' => -3.0, + #'owner-postfix-users@postfix.org' => -3.0, + #'owner-postfix-announce@postfix.org' => -3.0, + #'owner-sendmail-announce@lists.sendmail.org' => -3.0, + #'sendmail-announce-request@lists.sendmail.org' => -3.0, + #'donotreply@sendmail.org' => -3.0, + #'ca+envelope@sendmail.org' => -3.0, + #'noreply@freshmeat.net' => -3.0, + #'owner-technews@postel.acm.org' => -3.0, + #'ietf-123-owner@loki.ietf.org' => -3.0, + #'cvs-commits-list-admin@gnome.org' => -3.0, + #'rt-users-admin@lists.fsck.com' => -3.0, + #'clp-request@comp.nus.edu.sg' => -3.0, + #'surveys-errors@lists.nua.ie' => -3.0, + #'emailnews@genomeweb.com' => -5.0, + #'yahoo-dev-null@yahoo-inc.com' => -3.0, + #'returns.groups.yahoo.com' => -3.0, + #'clusternews@linuxnetworx.com' => -3.0, + #lc('lvs-users-admin@LinuxVirtualServer.org') => -3.0, + #lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0, + + # soft-blacklisting (positive score) + #'sender@example.net' => 3.0, + #'.example.net' => 1.0, + + }, + ], # end of site-wide tables +}); + +1; # ensure a defined return diff --git a/amavis/conf.d/25-amavis_helpers b/amavis/conf.d/25-amavis_helpers new file mode 100644 index 0000000..ef399e4 --- /dev/null +++ b/amavis/conf.d/25-amavis_helpers @@ -0,0 +1,23 @@ +use strict; + +## +## Functionality required for amavis helpers like +## amavis-release. +## + +# Enable required AM.PDP protocol socket. +# +# this is incompatible with the old helpers, but one can +# have multiple inet (not unix) sockets to overcome this +# issue. Refer to the amavisd-new documentation for more +# information + +$unix_socketname = "/var/lib/amavis/amavisd.sock"; + +$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 +}; + +1; # ensure a defined return diff --git a/amavis/conf.d/30-template_localization b/amavis/conf.d/30-template_localization new file mode 100644 index 0000000..b808bd7 --- /dev/null +++ b/amavis/conf.d/30-template_localization @@ -0,0 +1,42 @@ +use strict; + +# l10n (localization) of the AMaViSd-new DSN templates +# Override or change as necessary + +# Select notifications text encoding when Unicode-aware Perl is converting +# text from internal character representation to external encoding (charset +# in MIME terminology). Used as argument to Perl Encode::encode subroutine. +# +# to be used in RFC 2047-encoded header field bodies, e.g. in Subject: +#$hdr_encoding = 'iso-8859-1'; # (default: 'iso-8859-1') +# +# to be used in notification body text: its encoding and Content-type.charset +#$bdy_encoding = 'iso-8859-1'; # (default: 'iso-8859-1') + +# Default template texts for notifications may be overruled by directly +# assigning new text to template variables, or by reading template text +# from files. A second argument may be specified in a call to read_text(), +# specifying character encoding layer to be used when reading from the +# external file, e.g. 'utf8', 'iso-8859-1', or often just $bdy_encoding. +# Text will be converted to internal character representation by Perl 5.8.0 +# or later; second argument is ignored otherwise. See PerlIO::encoding, +# Encode::PerlIO and perluniintro man pages. +# +# $notify_sender_templ = read_text('/var/amavis/notify_sender.txt'); +# $notify_virus_sender_templ= read_text('/var/amavis/notify_virus_sender.txt'); +# $notify_virus_admin_templ = read_text('/var/amavis/notify_virus_admin.txt'); +# $notify_virus_recips_templ= read_text('/var/amavis/notify_virus_recips.txt'); +# $notify_spam_sender_templ = read_text('/var/amavis/notify_spam_sender.txt'); +# $notify_spam_admin_templ = read_text('/var/amavis/notify_spam_admin.txt'); + +# If notification template files are collectively available in some directory, +# you can use read_l10n_templates which calls read_text for each known +# template. Name the files as above, and include a file named "charset" with +# the charset used in the files. This is how Debian ships l10n templates. +# +# syntax: read_l10n_templates(); OR +# read_l10n_templates(, ); +# +read_l10n_templates('en_US', '/etc/amavis'); + +1; # ensure a defined return diff --git a/amavis/conf.d/50-user b/amavis/conf.d/50-user new file mode 100644 index 0000000..c43c6ba --- /dev/null +++ b/amavis/conf.d/50-user @@ -0,0 +1,13 @@ +use strict; + +# +# Place your configuration directives here. They will override those in +# earlier files. +# +# See /usr/share/doc/amavisd-new/ for documentation and examples of +# the directives you can use in this file +# + + +#------------ Do not modify anything below this line ------------- +1; # ensure a defined return diff --git a/amavis/en_US/charset b/amavis/en_US/charset new file mode 100644 index 0000000..fd23d72 --- /dev/null +++ b/amavis/en_US/charset @@ -0,0 +1,4 @@ +# This is charset for en_US messages. +# If you are creating new messages, use 'iconv -l' to get possible encodings. +ascii # or iso-8859-1 +ignored lines after first one diff --git a/amavis/en_US/template-auto-response.txt b/amavis/en_US/template-auto-response.txt new file mode 100644 index 0000000..5b50baf --- /dev/null +++ b/amavis/en_US/template-auto-response.txt @@ -0,0 +1,23 @@ +# +# ============================================================================= +# This is a template for the plain text part of an auto response (e.g. +# vacation, out-of-office), see RFC 3834. +# +From: %f +Date: %d +To: [? %#T |undisclosed-recipients:;|[%T|, ]] +[? %#C |#|Cc: [%C|, ]] +Reply-To: postmaster@%h +Message-ID: +Auto-Submitted: auto-replied +[:wrap|76||\t|Subject: Auto: autoresponse to: %s] +[? %m |#|In-Reply-To: %m] +Precedence: junk + +This is an auto-response to a message \ +[? %a |\nreceived on %d,|received from\nIP address \[%a\] on %d,] +envelope sender: %s +(author) From: [:rfc2822_from] +[? %j |#|[:wrap|78|| |Subject: %j]] +[?[:dkim|author]|#| +A first-party DKIM or DomainKeys signature is valid, d=[:dkim|author].] diff --git a/amavis/en_US/template-dsn.txt b/amavis/en_US/template-dsn.txt new file mode 100644 index 0000000..561d163 --- /dev/null +++ b/amavis/en_US/template-dsn.txt @@ -0,0 +1,134 @@ +# +# ============================================================================= +# This is a template for (neutral: non-virus, non-spam, non-banned) +# DELIVERY STATUS NOTIFICATIONS to sender. +# For syntax and customization instructions see README.customize. +# The From, To and Date header fields will be provided automatically. +# Long header fields will be automatically wrapped by the program. +# +Subject: [?%#D|Undeliverable mail|Delivery status notification]\ +[? [:ccat|major] |||, MTA-BLOCKED\ +|, OVERSIZED message\ +|, invalid header section[=explain_badh|1]\ +[?[:ccat|minor]||: bad MIME|: unencoded 8-bit character\ +|: improper use of control char|: all-whitespace header line\ +|: header line longer than 998 characters|: header field syntax error\ +|: missing required header field|: duplicate header field|]\ +|, UNSOLICITED BULK EMAIL apparently from you\ +|, UNSOLICITED BULK EMAIL apparently from you\ +|, contents UNCHECKED\ +|, BANNED contents type (%F)\ +|, VIRUS in message apparently from you (%V)\ +] +Message-ID: + +[? %#D |#|Your message WAS SUCCESSFULLY RELAYED to:[\n %D] +[~[:dsn_notify]|["\\bSUCCESS\\b"]|\ +and you explicitly requested a delivery status notification on success.\n]\ +] +[? %#N |#|The message WAS NOT relayed to:[\n %N] +] +[:wrap|78|||This [?%#D|nondelivery|delivery] report was \ +generated by the program amavisd-new at host %h. \ +Our internal reference code for your message is %n/%i] + +# ccat_min 0: other, 1: bad MIME, 2: 8-bit char, 3: NUL/CR, +# 4: empty, 5: long, 6: syntax, 7: missing, 8: multiple +[? [:explain_badh] ||[? [:ccat|minor] +|INVALID HEADER +|INVALID HEADER: BAD MIME HEADER SECTION OR BAD MIME STRUCTURE +|INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER SECTION +|INVALID HEADER: INVALID CONTROL CHARACTERS IN HEADER SECTION +|INVALID HEADER: FOLDED HEADER FIELD LINE MADE UP ENTIRELY OF WHITESPACE +|INVALID HEADER: HEADER LINE LONGER THAN RFC 5322 LIMIT OF 998 CHARACTERS +|INVALID HEADER: HEADER FIELD SYNTAX ERROR +|INVALID HEADER: MISSING REQUIRED HEADER FIELD +|INVALID HEADER: DUPLICATE HEADER FIELD +|INVALID HEADER +] +[[:wrap|78| | |%X]\n] +]\ +# +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender|100]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? %#X|#|[? [:useragent] |#|[:wrap|78|| |[:useragent]]]] +[? %j |#|[:wrap|78|| |Subject: [:header_field|Subject|100]]] + +# ccat_min 0: other, 1: bad MIME, 2: 8-bit char, 3: NUL/CR, +# 4: empty, 5: long, 6: syntax, 7: missing, 8: multiple +[? [:explain_badh] ||[? [:ccat|minor] +|# 0: other +|# 1: bad MIME +|# 2: 8-bit char +WHAT IS AN INVALID CHARACTER IN A MAIL HEADER SECTION? + + The RFC 5322 document specifies rules for forming internet messages. + It does not allow the use of characters with codes above 127 to be + used directly (non-encoded) in a mail header section. + + If such characters (e.g. with diacritics) from ISO Latin or other + alphabets need to be included in a header section, these characters + need to be properly encoded according to RFC 2047. Such encoding + is often done transparently by mail reader (MUA), but if automatic + encoding is not available (e.g. by some older MUA) it is a user's + responsibility to avoid using such characters in a header section, + or to encode them manually. Typically the offending header fields + in this category are 'Subject', 'Organization', and comment fields + or display names in e-mail addresses of 'From', 'To' or 'Cc'. + + Sometimes such invalid header fields are inserted automatically + by some MUA, MTA, content filter, or other mail handling service. + If this is the case, such service needs to be fixed or properly + configured. Typically the offending header fields in this category + are 'Date', 'Received', 'X-Mailer', 'X-Priority', 'X-Scanned', etc. + + If you don't know how to fix or avoid the problem, please report it + to _your_ postmaster or system manager. +# +[~[:useragent]|^X-Mailer:\\s*Microsoft Outlook Express 6\\.00|[" + If using Microsoft Outlook Express as your MUA, make sure its + settings under: + Tools -> Options -> Send -> Mail Sending Format -> Plain & HTML + are: "MIME format" MUST BE selected, + and "Allow 8-bit characters in headers" MUST NOT be enabled! +"]]# +|# 3: NUL/CR +IMPROPER USE OF CONTROL CHARACTER IN A MESSAGE HEADER SECTION + + The RFC 5322 document specifies rules for forming internet messages. + It does not allow the use of control characters NUL and bare CR + to be used directly in a mail header section. +|# 4: empty +IMPROPERLY FOLDED HEADER FIELD LINE MADE UP ENTIRELY OF WHITESPACE + + The RFC 5322 document specifies rules for forming internet messages. + In section '3.2.2. Folding white space and comments' it explicitly + prohibits folding of header fields in such a way that any line of a + folded header field is made up entirely of white-space characters + (control characters SP and HTAB) and nothing else. +|# 5: long +HEADER LINE LONGER THAN RFC 5322 LIMIT OF 998 CHARACTERS + + The RFC 5322 document specifies rules for forming internet messages. + Section '2.1.1. Line Length Limits' prohibits each line of a header + section to be more than 998 characters in length (excluding the CRLF). +|# 6: syntax +|# 7: missing +MISSING REQUIRED HEADER FIELD + + The RFC 5322 document specifies rules for forming internet messages. + Section '3.6. Field Definitions' specifies that certain header fields + are required (origination date field and the "From:" originator field). +|# 8: multiple +DUPLICATE HEADER FIELD + + The RFC 5322 document specifies rules for forming internet messages. + Section '3.6. Field Definitions' specifies that certain header fields + must not occur more than once in a message header section. +|# other +]]# diff --git a/amavis/en_US/template-problem-feedback.txt b/amavis/en_US/template-problem-feedback.txt new file mode 100644 index 0000000..2f6b14e --- /dev/null +++ b/amavis/en_US/template-problem-feedback.txt @@ -0,0 +1,37 @@ +# +# ============================================================================= +# This is a template for the plain text part of a problem/feedback report, +# with either the original message included in-line, or attached, +# or the message is structured as a FEEDBACK REPORT NOTIFICATIONS format. +# See RFC 5965 - "An Extensible Format for Email Feedback Reports". +# +From: %f +Date: %d +Subject: Fw: %j +To: [? %#T |undisclosed-recipients:;|[%T|, ]] +[? %#C |#|Cc: [%C|, ]] +Message-ID: +#Auto-Submitted: auto-generated + +This is an e-mail [:feedback_type] report for a message \ +[? %a |\nreceived on %d,|received from\nIP address [:client_addr_port] on %d,] + +[:wrap|78|| |Return-Path: %s] +[:wrap|78|| |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|[:wrap|78|| |Sender: [:header_field|Sender]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? %j |#|[:wrap|78|| |Subject: [:header_field|Subject|100]]] +[?[:dkim|author]|#| +A first-party DKIM or DomainKeys signature is valid, d=[:dkim|author].] + +Reporting-MTA: %h +Our internal reference code for the message is %n/%i + +[~[:report_format]|["^(arf|attach|dsn)$"]|["\ +A complete original message is attached. +[~[:report_format]|["^arf$"]|\ +For more information on the ARF format please see RFC 5965. +]"]|["\ +A complete original message in its pristine form follows: +"]]# diff --git a/amavis/en_US/template-release-quarantine.txt b/amavis/en_US/template-release-quarantine.txt new file mode 100644 index 0000000..affd42e --- /dev/null +++ b/amavis/en_US/template-release-quarantine.txt @@ -0,0 +1,45 @@ +# +# ============================================================================= +# This is a template for the plain text part of a RELEASE FROM A QUARANTINE, +# applicable if a chosen release format is 'attach' (not 'resend'). +# +From: %f +Date: %d +Subject: \[released message\] %j +To: [? %#T |undisclosed-recipients:;|[%T|, ]] +[? %#C |#|Cc: [%C|, ]] +Message-ID: + +Please find attached a message which was held in a quarantine, +and has now been released. + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +# [? %m |#|[:wrap|78|| |Message-ID: %m]] +# [? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +# [? [:useragent] |#|[:wrap|78|| |[:useragent]]] +[? %j |#|[:wrap|78|| |Subject: %j]] + +Our internal reference code for the message is %n/%i +# +[~[:report_format]|["^attach$"]|["[? [:attachment_password] |#| + +Contents of the attached mail message may pose a threat to your computer or +could be a social engineering deception, so it should be handled cautiously. +To prevent undesired automatic opening, the attached original mail message +has been wrapped in a password-protected ZIP archive. + +Here is the password that allows opening of the attached archive: + + [:attachment_password] + +Note that the attachment is not strongly encrypted and the password +is not a strong secret (being displayed in this non-encrypted text), +so this attachment is not suitable for guarding a secret contents. +The sole purpose of this password protection it to prevent undesired +accidental or automatic opening of a message, either by some filtering +software, a virus scanner, or by a mail reader. +]"]|]# diff --git a/amavis/en_US/template-spam-admin.txt b/amavis/en_US/template-spam-admin.txt new file mode 100644 index 0000000..317acc3 --- /dev/null +++ b/amavis/en_US/template-spam-admin.txt @@ -0,0 +1,39 @@ +# +# ============================================================================= +# This is a template for spam ADMINISTRATOR NOTIFICATIONS. +# For syntax and customization instructions see README.customize. +# Long header fields will be automatically wrapped by the program. +# +From: %f +Date: %d +Subject: Spam FROM [?%l||LOCAL ][?%a||[:client_addr_port] ]%s +To: [? %#T |undisclosed-recipients:;|[%T|, ]] +[? %#C |#|Cc: [%C|, ]] +Message-ID: + +Content type: [:ccat|name|main]# +[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]] +Internal reference code for the message is %n/%i + +[? %a |#|[:wrap|78|| |First upstream SMTP client IP address: \[%a\] %g]] +[? %e |#|[:wrap|78|| |According to a 'Received:' trace,\ + the message apparently originated at: \[%e\], %t]] + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? [:useragent] |#|[:wrap|78|| |[:useragent]]] +[? %j |#|[:wrap|78|| |Subject: %j]] +[? %q |Not quarantined.|The message has been quarantined as: %q] + +[? %#D |#|The message WILL BE relayed to:[\n%D] +] +[? %#N |#|The message WAS NOT relayed to:[\n%N] +] +Spam scanner report: +[%A +]\ diff --git a/amavis/en_US/template-spam-sender.txt b/amavis/en_US/template-spam-sender.txt new file mode 100644 index 0000000..5d91afe --- /dev/null +++ b/amavis/en_US/template-spam-sender.txt @@ -0,0 +1,48 @@ +# +# ============================================================================= +# This is a template for spam SENDER NOTIFICATIONS. +# For syntax and customization instructions see README.customize. +# The From, To and Date header fields will be provided automatically. +# Long header fields will be automatically wrapped by the program. +# +Subject: Considered UNSOLICITED BULK EMAIL, apparently from you +[? %m |#|In-Reply-To: %m] +Message-ID: + +A message from %s[ +to: %R] + +was considered unsolicited bulk e-mail (UBE). + +Our internal reference code for your message is %n/%i + +The message carried your return address, so it was either a genuine mail +from you, or a sender address was faked and your e-mail address abused +by third party, in which case we apologize for undesired notification. + +We do try to minimize backscatter for more prominent cases of UBE and +for infected mail, but for less obvious cases some balance between +losing genuine mail and sending undesired backscatter is sought, +and there can be some collateral damage on either side. + +[? %a |#|[:wrap|78|| |First upstream SMTP client IP address: \[%a\] %g]] +[? %e |#|[:wrap|78|| |According to a 'Received:' trace,\ + the message apparently originated at: \[%e\], %t]] + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender|100]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +# [? [:useragent] |#|[:wrap|78|| |[:useragent]]] +[? %j |#|[:wrap|78|| |Subject: [:header_field|Subject|100]]] +[? %#X |#|\n[[:wrap|78|| |%X]\n]] + +[? %#D |Delivery of the email was stopped! +]# +# +# Spam scanner report: +# [%A +# ]\ diff --git a/amavis/en_US/template-virus-admin.txt b/amavis/en_US/template-virus-admin.txt new file mode 100644 index 0000000..559b6d0 --- /dev/null +++ b/amavis/en_US/template-virus-admin.txt @@ -0,0 +1,54 @@ +# +# ============================================================================= +# This is a template for non-spam (e.g. VIRUS,...) ADMINISTRATOR NOTIFICATIONS. +# For syntax and customization instructions see README.customize. +# Long header fields will be automatically wrapped by the program. +# +From: %f +Date: %d +Subject: [? [:ccat|major] |Clean mail|Clean mail|MTA-blocked mail|\ +OVERSIZED mail|INVALID HEADER in mail|Spammy|Spam|UNCHECKED contents in mail|\ +BANNED contents (%F) in mail|VIRUS (%V) in mail]\ + FROM [?%l||LOCAL ][?%a||[:client_addr_port] ]%s +To: [? %#T |undisclosed-recipients:;|[%T|, ]] +[? %#C |#|Cc: [%C|, ]] +Message-ID: + +[? %#V |No viruses were found. +|A virus was found: %V +|Two viruses were found:\n %V +|%#V viruses were found:\n %V +] +[? %#F |#|[:wrap|78|| |Banned [?%#F|names|name|names]: %F]] +[? %#X |#|Bad header:[\n[:wrap|78| | |%X]]] +[? %#W |#\ +|Scanner detecting a virus: %W +|Scanners detecting a virus: %W +] +Content type: [:ccat|name|main]# +[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]] +Internal reference code for the message is %n/%i + +[? %a |#|[:wrap|78|| |First upstream SMTP client IP address: \[%a\] %g]] +[? %e |#|[:wrap|78|| |According to a 'Received:' trace,\ + the message apparently originated at: \[%e\], %t]] + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? %j |#|[:wrap|78|| |Subject: %j]] +[? %q |Not quarantined.|The message has been quarantined as: %q] + +[? %#S |Notification to sender will not be mailed. + +]# +[? %#D |#|The message WILL BE relayed to:[\n%D] +] +[? %#N |#|The message WAS NOT relayed to:[\n%N] +] +[? %#V |#|[? %#v |#|Virus scanner output:[\n %v] +]] diff --git a/amavis/en_US/template-virus-recipient.txt b/amavis/en_US/template-virus-recipient.txt new file mode 100644 index 0000000..f8e579a --- /dev/null +++ b/amavis/en_US/template-virus-recipient.txt @@ -0,0 +1,46 @@ +# +# ============================================================================= +# This is a template for VIRUS/BANNED/BAD-HEADER RECIPIENTS NOTIFICATIONS. +# For syntax and customization instructions see README.customize. +# Long header fields will be automatically wrapped by the program. +# +From: %f +Date: %d +Subject: [? [:ccat|major] |Clean mail|Clean mail|MTA-blocked mail|\ +OVERSIZED mail|INVALID HEADER in mail|Spammy|Spam|UNCHECKED contents in mail|\ +BANNED contents (%F) in mail|VIRUS (%V) in mail] TO YOU from %s +[? [:header_field|To] |To: undisclosed-recipients:;|To: [:header_field|To]] +[? [:header_field|Cc] |#|Cc: [:header_field|Cc]] +Message-ID: + +[? %#V |[? %#F ||BANNED CONTENTS ALERT]|VIRUS ALERT] + +Our content checker found +[? %#V |#|[:wrap|78| | |[?%#V|viruses|virus|viruses]: %V]] +[? %#F |#|[:wrap|78| | |banned [?%#F|names|name|names]: %F]] +[? %#X |#|[[:wrap|78| | |%X]\n]] + +in an email to you [? %#V |from:|from probably faked sender:] + %o +[? %#V |#|claiming to be: %s] + +Content type: [:ccat|name|main]# +[? [:ccat|is_blocked_by_nonmain] ||, blocked for [:ccat|name]] +Our internal reference code for your message is %n/%i + +[? %a |#|[:wrap|78|| |First upstream SMTP client IP address: \[%a\] %g]] +[? %e |#|[:wrap|78|| |According to a 'Received:' trace,\ + the message apparently originated at: \[%e\], %t]] + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? [:useragent] |#|[:wrap|78|| |[:useragent]]] +[? %j |#|[:wrap|78|| |Subject: %j]] +[? %q |Not quarantined.|The message has been quarantined as: %q] + +Please contact your system administrator for details. diff --git a/amavis/en_US/template-virus-sender.txt b/amavis/en_US/template-virus-sender.txt new file mode 100644 index 0000000..5f254c8 --- /dev/null +++ b/amavis/en_US/template-virus-sender.txt @@ -0,0 +1,91 @@ +# +# ============================================================================= +# This is a template for VIRUS/BANNED SENDER NOTIFICATIONS. +# For syntax and customization instructions see README.customize. +# The From, To and Date header fields will be provided automatically. +# Long header fields will be automatically wrapped by the program. +# +Subject: [? [:ccat|major] +|Clean message from you\ +|Clean message from you\ +|Clean message from you (MTA blocked)\ +|OVERSIZED message from you\ +|BAD-HEADER in message from you\ +|Spam claiming to be from you\ +|Spam claiming to be from you\ +|A message with UNCHECKED contents from you\ +|BANNED contents from you (%F)\ +|VIRUS in message apparently from you (%V)\ +] +[? %m |#|In-Reply-To: %m] +Message-ID: + +[? [:ccat|major] |Clean|Clean|MTA-BLOCKED|OVERSIZED|INVALID HEADER|\ +Spammy|Spam|UNCHECKED contents|BANNED CONTENTS ALERT|VIRUS ALERT] + +Our content checker found +[? %#V |#|[:wrap|78| | |[? %#V |viruses|virus|viruses]: %V]] +[? %#F |#|[:wrap|78| | |banned [? %#F |names|name|names]: %F]] +[? %#X |#|[[:wrap|78| | |%X]\n]] + +in email presumably from you %s +to the following [? %#R |recipients|recipient|recipients]:[ +-> %R] + +Our internal reference code for your message is %n/%i + +[? %a |#|[:wrap|78|| |First upstream SMTP client IP address: \[%a\] %g]] +[? %e |#|[:wrap|78|| |According to a 'Received:' trace,\ + the message apparently originated at: \[%e\], %t]] + +[:wrap|78|| |Return-Path: %s[?[:dkim|envsender]|| (OK)]] +[:wrap|78|| |From: [:header_field|From|100][?[:dkim|author]|| (dkim:AUTHOR)]] +[? [:header_field|Sender]|#|\ +[:wrap|78|| |Sender: [:header_field|Sender|100]\ +[?[:dkim|sender]|| (dkim:SENDER)]]] +[? %m |#|[:wrap|78|| |Message-ID: %m]] +[? %r |#|[:wrap|78|| |Resent-Message-ID: %r]] +[? %j |#|[:wrap|78|| |Subject: [:header_field|Subject|100]]] + +[? %#D |Delivery of the email was stopped! + +]# +[? %#V ||Please check your system for viruses, +or ask your system administrator to do so. + +]# +[? %#V |[? %#F ||# +The message [?%#D|has been blocked|triggered this warning] because it contains a component +(as a MIME part or nested within) with declared name +or MIME type or contents type violating our access policy. + +To transfer contents that may be considered risky or unwanted +by site policies, or simply too large for mailing, please consider +publishing your content on the web, and only sending an URL of the +document to the recipient. + +Depending on the recipient and sender site policies, with a little +effort it might still be possible to send any contents (including +viruses) using one of the following methods: + +- encrypted using pgp, gpg or other encryption methods; + +- wrapped in a password-protected or scrambled container or archive + (e.g.: zip -e, arj -g, arc g, rar -p, or other methods) + +Note that if the contents is not intended to be secret, the +encryption key or password may be included in the same message +for recipient's convenience. + +We are sorry for inconvenience if the contents was not malicious. + +The purpose of these restrictions is to cut the most common propagation +methods used by viruses and other malware. These often exploit automatic +mechanisms and security holes in more popular mail readers (Microsoft +mail readers and browsers are a common target). By requiring an explicit +and decisive action from the recipient to decode mail, the danger of +automatic malware propagation is largely reduced. +# +# Details of our mail restrictions policy are available at ... + +]]# diff --git a/apache2/conf-available/php7.3-fpm.conf b/apache2/conf-available/php7.3-fpm.conf new file mode 100644 index 0000000..ef41022 --- /dev/null +++ b/apache2/conf-available/php7.3-fpm.conf @@ -0,0 +1,23 @@ +# Redirect to local php-fpm if mod_php is not available + + + # Enable http authorization headers + + SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 + + + + SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost" + + + # Deny access to raw php sources by default + # To re-enable it's recommended to enable access to the files + # only in specific virtual host or directory + Require all denied + + # Deny access to files without filename (e.g. '.php') + + Require all denied + + + diff --git a/apparmor.d/local/usr.bin.freshclam b/apparmor.d/local/usr.bin.freshclam new file mode 100644 index 0000000..e69de29 diff --git a/apparmor.d/local/usr.sbin.clamd b/apparmor.d/local/usr.sbin.clamd new file mode 100644 index 0000000..e69de29 diff --git a/apparmor.d/usr.bin.freshclam b/apparmor.d/usr.bin.freshclam new file mode 100644 index 0000000..df5cb5b --- /dev/null +++ b/apparmor.d/usr.bin.freshclam @@ -0,0 +1,44 @@ +# vim:syntax=apparmor +# Author: Jamie Strandboge +# Last Modified: Sun Aug 3 09:39:03 2008 + +#include + +/usr/bin/freshclam flags=(attach_disconnected) { + #include + #include + #include + #include + + capability setgid, + capability setuid, + + @{PROC}/filesystems r, + owner @{PROC}/[0-9]*/status r, + + /etc/clamav/clamd.conf r, + /etc/clamav/freshclam.conf r, + /etc/clamav/onerrorexecute.d/* mr, + /etc/clamav/onupdateexecute.d/* mr, + /etc/clamav/virusevent.d/* mr, + + owner @{HOME}/.clamtk/db/ rw, + owner @{HOME}/.clamtk/db/** rwk, + + owner @{HOME}/.klamav/database/ rw, + owner @{HOME}/.klamav/database/** rwk, + + /usr/bin/freshclam mr, + + /var/lib/clamav/ r, + /var/lib/clamav/** krw, + + /var/log/clamav/* krw, + /{,var/}run/clamav/freshclam.pid w, + /{,var/}run/clamav/clamd.ctl rw, + + deny /{,var/}run/samba/{gencache,unexpected}.tdb mrwkl, + + # Site-specific additions and overrides. See local/README for details. + #include +} diff --git a/apparmor.d/usr.sbin.clamd b/apparmor.d/usr.sbin.clamd new file mode 100644 index 0000000..4544759 --- /dev/null +++ b/apparmor.d/usr.sbin.clamd @@ -0,0 +1,60 @@ +# vim:syntax=apparmor +# Author: Jamie Strandboge +# Last Modified: Sun Aug 3 09:39:03 2008 + +#include + +/usr/sbin/clamd { + #include + #include + #include + + # LP: #433764: + capability dac_override, + + # needed, when using systemd + capability setgid, + capability setuid, + + @{PROC}/filesystems r, + @{PROC}/[0-9]*/status r, + + /etc/clamav/clamd.conf r, + + /usr/sbin/clamd mr, + + /tmp/ rw, + /tmp/** krw, + + /var/lib/clamav/ r, + /var/lib/clamav/** krw, + /var/log/clamav/* krw, + + /{,var/}run/clamav/clamd.ctl w, + /{,var/}run/clamav/clamd.pid w, + + /var/spool/clamsmtp/* r, + + /var/spool/qpsmtpd/* r, + + /var/spool/p3scan/children/** r, + + /var/spool/havp/** r, + + # For amavisd-new integration + /var/lib/amavis/tmp/** r, + + # For mimedefang integration + /var/spool/MIMEDefang/mdefang-*/Work/ r, + /var/spool/MIMEDefang/mdefang-*/Work/** r, + + # For use with exim + /var/spool/exim4/** r, + + # Allow home dir to be scanned + @{HOME}/ r, + @{HOME}/** r, + + # Site-specific additions and overrides. See local/README for details. + #include +} diff --git a/clamav/clamd.conf b/clamav/clamd.conf new file mode 100644 index 0000000..3c4f513 --- /dev/null +++ b/clamav/clamd.conf @@ -0,0 +1,87 @@ +#Automatically Generated by clamav-daemon postinst +#To reconfigure clamd run #dpkg-reconfigure clamav-daemon +#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details +LocalSocket /var/run/clamav/clamd.ctl +FixStaleSocket true +LocalSocketGroup clamav +LocalSocketMode 666 +# TemporaryDirectory is not set to its default /tmp here to make overriding +# the default with environment variables TMPDIR/TMP/TEMP possible +User clamav +ScanMail true +ScanArchive true +ArchiveBlockEncrypted false +MaxDirectoryRecursion 15 +FollowDirectorySymlinks false +FollowFileSymlinks false +ReadTimeout 180 +MaxThreads 12 +MaxConnectionQueueLength 15 +LogSyslog false +LogRotate true +LogFacility LOG_LOCAL6 +LogClean false +LogVerbose false +PreludeEnable no +PreludeAnalyzerName ClamAV +DatabaseDirectory /var/lib/clamav +OfficialDatabaseOnly false +SelfCheck 3600 +Foreground false +Debug false +ScanPE true +MaxEmbeddedPE 10M +ScanOLE2 true +ScanPDF true +ScanHTML true +MaxHTMLNormalize 10M +MaxHTMLNoTags 2M +MaxScriptNormalize 5M +MaxZipTypeRcg 1M +ScanSWF true +ExitOnOOM false +LeaveTemporaryFiles false +AlgorithmicDetection true +ScanELF true +IdleTimeout 30 +CrossFilesystems true +PhishingSignatures true +PhishingScanURLs true +PhishingAlwaysBlockSSLMismatch false +PhishingAlwaysBlockCloak false +PartitionIntersection false +DetectPUA false +ScanPartialMessages false +HeuristicScanPrecedence false +StructuredDataDetection false +CommandReadTimeout 30 +SendBufTimeout 200 +MaxQueue 100 +ExtendedDetectionInfo true +OLE2BlockMacros false +AllowAllMatchScan true +ForceToDisk false +DisableCertCheck false +DisableCache false +MaxScanTime 120000 +MaxScanSize 100M +MaxFileSize 25M +MaxRecursion 16 +MaxFiles 10000 +MaxPartitions 50 +MaxIconsPE 100 +PCREMatchLimit 10000 +PCRERecMatchLimit 5000 +PCREMaxFileSize 25M +ScanXMLDOCS true +ScanHWP3 true +MaxRecHWP3 16 +StreamMaxLength 25M +LogFile /var/log/clamav/clamav.log +LogTime true +LogFileUnlock false +LogFileMaxSize 0 +Bytecode true +BytecodeSecurity TrustSigned +BytecodeTimeout 60000 +OnAccessMaxFileSize 5M diff --git a/clamav/freshclam.conf b/clamav/freshclam.conf new file mode 100644 index 0000000..d238dc2 --- /dev/null +++ b/clamav/freshclam.conf @@ -0,0 +1,28 @@ +# Automatically created by the clamav-freshclam postinst +# Comments will get lost when you reconfigure the clamav-freshclam package + +DatabaseOwner clamav +UpdateLogFile /var/log/clamav/freshclam.log +LogVerbose false +LogSyslog false +LogFacility LOG_LOCAL6 +LogFileMaxSize 0 +LogRotate true +LogTime true +Foreground false +Debug false +MaxAttempts 5 +DatabaseDirectory /var/lib/clamav +DNSDatabaseInfo current.cvd.clamav.net +ConnectTimeout 30 +ReceiveTimeout 0 +TestDatabases yes +ScriptedUpdates yes +CompressLocalDatabase no +SafeBrowsing false +Bytecode true +NotifyClamd /etc/clamav/clamd.conf +# Check for new database 24 times a day +Checks 24 +DatabaseMirror db.local.clamav.net +DatabaseMirror database.clamav.net diff --git a/cron.d/amavisd-new b/cron.d/amavisd-new new file mode 100644 index 0000000..84ec761 --- /dev/null +++ b/cron.d/amavisd-new @@ -0,0 +1,6 @@ +# +# SpamAssassin maintenance for amavisd-new +# +# m h dom mon dow user command +18 */3 * * * amavis test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-sync +24 1 * * * amavis test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-clean diff --git a/cron.d/mlmmj b/cron.d/mlmmj new file mode 100644 index 0000000..97d2c8c --- /dev/null +++ b/cron.d/mlmmj @@ -0,0 +1 @@ +0 */2 * * * root /usr/bin/test -x /usr/bin/mlmmj-maintd && /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj diff --git a/cron.d/php b/cron.d/php new file mode 100644 index 0000000..84e5d10 --- /dev/null +++ b/cron.d/php @@ -0,0 +1,14 @@ +# /etc/cron.d/php@PHP_VERSION@: crontab fragment for PHP +# This purges session files in session.save_path older than X, +# where X is defined in seconds as the largest value of +# session.gc_maxlifetime from all your SAPI php.ini files +# or 24 minutes if not defined. The script triggers only +# when session.save_handler=files. +# +# WARNING: The scripts tries hard to honour all relevant +# session PHP options, but if you do something unusual +# you have to disable this script and take care of your +# sessions yourself. + +# Look for and purge old sessions every 30 minutes +09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi diff --git a/cron.daily/00logwatch b/cron.daily/00logwatch new file mode 100755 index 0000000..ddf11fd --- /dev/null +++ b/cron.daily/00logwatch @@ -0,0 +1,10 @@ +#!/bin/bash + +#Check if removed-but-not-purged +test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0 + +#execute +/usr/sbin/logwatch --output mail + +#Note: It's possible to force the recipient in above command +#Just pass --mailto address@a.com instead of --output mail diff --git a/cron.daily/spamassassin b/cron.daily/spamassassin new file mode 100755 index 0000000..52a7d71 --- /dev/null +++ b/cron.daily/spamassassin @@ -0,0 +1,105 @@ +#!/bin/sh + +# Duncan Findlay +# duncf@debian.org + +# Daily cronjob for SpamAssassin updates. This isn't pretty but it +# should do the job. + +CRON=0 + +test -f /etc/default/spamassassin && . /etc/default/spamassassin + +test -x /usr/bin/sa-update || exit 0 +test -x /etc/init.d/spamassassin || exit 0 +command -v gpg > /dev/null || exit 0 + +if [ "$CRON" = "0" ] ; then + exit 0 +fi + +# If there's a problem with the ruleset or configs, print the output +# of spamassassin --lint (which will typically get emailed to root) +# and abort. +die_with_lint() { + env -i LANG="$LANG" PATH="$PATH" start-stop-daemon \ + --chuid debian-spamd:debian-spamd --start \ + --exec /usr/bin/spamassassin -- -D --lint 2>&1 + exit 1 +} + +do_compile() { +# Compile rules if the required tools are available. Prior to version +# 3.3.2-8, there was an additional check to verify that an sa-compile +# run had previously been executed by hand. With sa-learn now +# distributed in a separate, optional, package, this check is no +# longer necessary. + if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile ]; then + env -i LANG="$LANG" PATH="$PATH" start-stop-daemon \ + --chuid debian-spamd:debian-spamd --start \ + --exec /usr/bin/sa-compile -- --quiet + + # Fixup perms -- group and other should be able to + # read and execute, but never write. Works around + # sa-compile's failure to obey umask. + runuser -u debian-spamd -- \ + chmod -R go-w,go+rX /var/lib/spamassassin/compiled + fi +} + +# Tell a running spamd to reload its configs and rules. +reload() { + # Reload + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d --quiet spamassassin status > /dev/null && \ + invoke-rc.d spamassassin reload > /dev/null + else + /etc/init.d/spamassassin reload > /dev/null + fi + if [ -d /etc/spamassassin/sa-update-hooks.d ]; then + run-parts --lsbsysinit /etc/spamassassin/sa-update-hooks.d + fi +} + +# Sleep for up to 3600 seconds if not running interactively +if [ ! -t 0 ]; then + RANGE=3600 + number=`od -vAn -N2 -tu4 < /dev/urandom` + number=`expr $number "%" $RANGE` + sleep $number +fi + +# Update +umask 022 +env -i LANG="$LANG" PATH="$PATH" http_proxy="$http_proxy" \ + start-stop-daemon --chuid debian-spamd:debian-spamd --start \ + --exec /usr/bin/sa-update -- \ + --gpghomedir /var/lib/spamassassin/sa-update-keys 2>&1 + +case $? in + 0) + # got updates! + env -i LANG="$LANG" PATH="$PATH" start-stop-daemon \ + --chuid debian-spamd:debian-spamd --start \ + --exec /usr/bin/spamassassin -- --lint 2>&1 || die_with_lint + do_compile + reload + ;; + 1) + # no updates + exit 0 + ;; + 2) + # lint failed! + die_with_lint + ;; + *) + echo "sa-update failed for unknown reasons" 1>&2 + ;; +esac + +# Local variables: +# mode: shell-script +# tab-width: 4 +# indent-tabs-mode: nil +# end: diff --git a/default/amavisd-snmp-subagent b/default/amavisd-snmp-subagent new file mode 100644 index 0000000..beee367 --- /dev/null +++ b/default/amavisd-snmp-subagent @@ -0,0 +1,12 @@ +# there are two implementations of the subagent daemon: +# 1) the default bdb version +# 2) a zero mq based version +# if you want to use this agent you need at least +# libnet-snmp-perl installed. +# the zeromq version also needs libzeromq-perl. +# You also have to enable zeromq +# in amavis: $enable_zmq = 1; +# +# See RELEASE_NOTES for details. + +AGENT_BACKEND="bdb" # use zeromq for the zeromq version diff --git a/default/dovecot b/default/dovecot new file mode 100644 index 0000000..dee9239 --- /dev/null +++ b/default/dovecot @@ -0,0 +1,4 @@ +# /etc/default/dovecot + +# Set to '1' to allow Dovecot daemons to produce core dumps +#ALLOW_COREDUMPS=1 diff --git a/default/nginx b/default/nginx new file mode 100644 index 0000000..09b8fd0 --- /dev/null +++ b/default/nginx @@ -0,0 +1,10 @@ +# Note: You may want to look at the following page before setting the ULIMIT. +# http://wiki.nginx.org/CoreModule#worker_rlimit_nofile +# Set the ulimit variable if you need defaults to change. +# Example: ULIMIT="-n 4096" +#ULIMIT="-n 4096" + +# Define the stop schedule for nginx +# see the start-stop-daemon --retry documentation for more information +# +#STOP_SCHEDULE="QUIT/5/TERM/5/KILL/5" diff --git a/default/spamassassin b/default/spamassassin new file mode 100644 index 0000000..9efb197 --- /dev/null +++ b/default/spamassassin @@ -0,0 +1,33 @@ +# /etc/default/spamassassin +# Duncan Findlay + +# WARNING: please read README.spamd before using. +# There may be security risks. + +# Prior to version 3.4.2-1, spamd could be enabled by setting +# ENABLED=1 in this file. This is no longer supported. Instead, please +# use the update-rc.d command, invoked for example as "update-rc.d +# spamassassin enable", to enable the spamd service. + +# Options +# See man spamd for possible options. The -d option is automatically added. + +# SpamAssassin uses a preforking model, so be careful! You need to +# make sure --max-children is not set to anything higher than 5, +# unless you know what you're doing. + +OPTIONS="--create-prefs --max-children 5 --helper-home-dir" + +# Pid file +# Where should spamd write its PID to file? If you use the -u or +# --username option above, this needs to be writable by that user. +# Otherwise, the init script will not be able to shut spamd down. +PIDFILE="/var/run/spamd.pid" + +# Set nice level of spamd +#NICE="--nicelevel 15" + +# Cronjob +# Set to anything but 0 to enable the cron job to automatically update +# spamassassin's rules on a nightly basis +CRON=0 diff --git a/default/uwsgi b/default/uwsgi new file mode 100644 index 0000000..a640ab1 --- /dev/null +++ b/default/uwsgi @@ -0,0 +1,30 @@ +# Defaults for uWSGI initscript +# sourced by /etc/init.d/uwsgi + +# If you don't want uWSGI to be started as a system service, +# disable it using the command 'update-rc.d uwsgi disable' + +# At startup VERBOSE value is setted in 'no'. So when user invokes +# uWSGI init.d script, no output is showed. +# It could be unexpected behaviour, because it is common practice for +# init.d script to ignore VERBOSE value. +# Here VERBOSE is overriden to conform such the practice. +VERBOSE=yes + +# Should init.d script print configuration file names while marking progress of +# it's execution? +# +# If 'no', then init.d script prints one-character symbols instead file names. +# +# Printing confnames is quite informative, but could mess terminal output or +# be somewhat dangerous (as filename could contain arbitary characters). +# ASCII control characters in file names are replaced with '?' in init.d script +# output, nevertheless you were warned. +PRINT_CONFNAMES_IN_INITD_SCRIPT_OUTPUT=no + +# init.d script starts instance of uWSGI daemon for each found user-created +# configuration file. +# +# Options from inherited configuration file are passed to each instance by +# default. They could be overrided (or extended) by user configuration file. +INHERITED_CONFIG=/usr/share/uwsgi/conf/default.ini diff --git a/dovecot/conf.d/10-auth.conf b/dovecot/conf.d/10-auth.conf new file mode 100644 index 0000000..1c59eb4 --- /dev/null +++ b/dovecot/conf.d/10-auth.conf @@ -0,0 +1,128 @@ +## +## Authentication processes +## + +# Disable LOGIN command and all other plaintext authentications unless +# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP +# matches the local IP (ie. you're connecting from the same computer), the +# connection is considered secure and plaintext authentication is allowed. +# See also ssl=required setting. +#disable_plaintext_auth = yes + +# Authentication cache size (e.g. 10M). 0 means it's disabled. Note that +# bsdauth, PAM and vpopmail require cache_key to be set for caching to be used. +#auth_cache_size = 0 +# Time to live for cached data. After TTL expires the cached record is no +# longer used, *except* if the main database lookup returns internal failure. +# We also try to handle password changes automatically: If user's previous +# authentication was successful, but this one wasn't, the cache isn't used. +# For now this works only with plaintext authentication. +#auth_cache_ttl = 1 hour +# TTL for negative hits (user not found, password mismatch). +# 0 disables caching them completely. +#auth_cache_negative_ttl = 1 hour + +# Space separated list of realms for SASL authentication mechanisms that need +# them. You can leave it empty if you don't want to support multiple realms. +# Many clients simply use the first one listed here, so keep the default realm +# first. +#auth_realms = + +# Default realm/domain to use if none was specified. This is used for both +# SASL realms and appending @domain to username in plaintext logins. +#auth_default_realm = + +# List of allowed characters in username. If the user-given username contains +# a character not listed in here, the login automatically fails. This is just +# an extra check to make sure user can't exploit any potential quote escaping +# vulnerabilities with SQL/LDAP databases. If you want to allow all characters, +# set this value to empty. +#auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ + +# Username character translations before it's looked up from databases. The +# value contains series of from -> to characters. For example "#@/@" means +# that '#' and '/' characters are translated to '@'. +#auth_username_translation = + +# Username formatting before it's looked up from databases. You can use +# the standard variables here, eg. %Lu would lowercase the username, %n would +# drop away the domain if it was given, or "%n-AT-%d" would change the '@' into +# "-AT-". This translation is done after auth_username_translation changes. +#auth_username_format = %Lu + +# If you want to allow master users to log in by specifying the master +# username within the normal username string (ie. not using SASL mechanism's +# support for it), you can specify the separator character here. The format +# is then . UW-IMAP uses "*" as the +# separator, so that could be a good choice. +#auth_master_user_separator = + +# Username to use for users logging in with ANONYMOUS SASL mechanism +#auth_anonymous_username = anonymous + +# Maximum number of dovecot-auth worker processes. They're used to execute +# blocking passdb and userdb queries (eg. MySQL and PAM). They're +# automatically created and destroyed as needed. +#auth_worker_max_count = 30 + +# Host name to use in GSSAPI principal names. The default is to use the +# name returned by gethostname(). Use "$ALL" (with quotes) to allow all keytab +# entries. +#auth_gssapi_hostname = + +# Kerberos keytab to use for the GSSAPI mechanism. Will use the system +# default (usually /etc/krb5.keytab) if not specified. You may need to change +# the auth service to run as root to be able to read this file. +#auth_krb5_keytab = + +# Do NTLM and GSS-SPNEGO authentication using Samba's winbind daemon and +# ntlm_auth helper. +#auth_use_winbind = no + +# Path for Samba's ntlm_auth helper binary. +#auth_winbind_helper_path = /usr/bin/ntlm_auth + +# Time to delay before replying to failed authentications. +#auth_failure_delay = 2 secs + +# Require a valid SSL client certificate or the authentication fails. +#auth_ssl_require_client_cert = no + +# Take the username from client's SSL certificate, using +# X509_NAME_get_text_by_NID() which returns the subject's DN's +# CommonName. +#auth_ssl_username_from_cert = no + +# Space separated list of wanted authentication mechanisms: +# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey +# gss-spnego +# NOTE: See also disable_plaintext_auth setting. +auth_mechanisms = plain + +## +## Password and user databases +## + +# +# Password database is used to verify user's password (and nothing more). +# You can have multiple passdbs and userdbs. This is useful if you want to +# allow both system users (/etc/passwd) and virtual users to login without +# duplicating the system users into virtual database. +# +# +# +# User database specifies where mails are located and what user/group IDs +# own them. For single-UID configuration use "static" userdb. +# +# + +#!include auth-deny.conf.ext +#!include auth-master.conf.ext + +!include auth-system.conf.ext +#!include auth-sql.conf.ext +#!include auth-ldap.conf.ext +#!include auth-passwdfile.conf.ext +#!include auth-checkpassword.conf.ext +#!include auth-vpopmail.conf.ext +#!include auth-static.conf.ext diff --git a/dovecot/conf.d/10-director.conf b/dovecot/conf.d/10-director.conf new file mode 100644 index 0000000..073d8a8 --- /dev/null +++ b/dovecot/conf.d/10-director.conf @@ -0,0 +1,60 @@ +## +## Director-specific settings. +## + +# Director can be used by Dovecot proxy to keep a temporary user -> mail server +# mapping. As long as user has simultaneous connections, the user is always +# redirected to the same server. Each proxy server is running its own director +# process, and the directors are communicating the state to each others. +# Directors are mainly useful with NFS-like setups. + +# List of IPs or hostnames to all director servers, including ourself. +# Ports can be specified as ip:port. The default port is the same as +# what director service's inet_listener is using. +#director_servers = + +# List of IPs or hostnames to all backend mail servers. Ranges are allowed +# too, like 10.0.0.10-10.0.0.30. +#director_mail_servers = + +# How long to redirect users to a specific server after it no longer has +# any connections. +#director_user_expire = 15 min + +# How the username is translated before being hashed. Useful values include +# %Ln if user can log in with or without @domain, %Ld if mailboxes are shared +# within domain. +#director_username_hash = %Lu + +# To enable director service, uncomment the modes and assign a port. +service director { + unix_listener login/director { + #mode = 0666 + } + fifo_listener login/proxy-notify { + #mode = 0666 + } + unix_listener director-userdb { + #mode = 0600 + } + inet_listener { + #port = + } +} + +# Enable director for the wanted login services by telling them to +# connect to director socket instead of the default login socket: +service imap-login { + #executable = imap-login director +} +service pop3-login { + #executable = pop3-login director +} +service submission-login { + #executable = submission-login director +} + +# Enable director for LMTP proxying: +protocol lmtp { + #auth_socket_path = director-userdb +} diff --git a/dovecot/conf.d/10-logging.conf b/dovecot/conf.d/10-logging.conf new file mode 100644 index 0000000..bcd6dea --- /dev/null +++ b/dovecot/conf.d/10-logging.conf @@ -0,0 +1,109 @@ +## +## Log destination. +## + +# Log file to use for error messages. "syslog" logs to syslog, +# /dev/stderr logs to stderr. +#log_path = syslog + +# Log file to use for informational messages. Defaults to log_path. +#info_log_path = +# Log file to use for debug messages. Defaults to info_log_path. +#debug_log_path = + +# Syslog facility to use if you're logging to syslog. Usually if you don't +# want to use "mail", you'll use local0..local7. Also other standard +# facilities are supported. +#syslog_facility = mail + +## +## Logging verbosity and debugging. +## + +# Log filter is a space-separated list conditions. If any of the conditions +# match, the log filter matches (i.e. they're ORed together). Parenthesis +# are supported if multiple conditions need to be matched together. +# Supported conditions are: +# event: - Match event name. '*' and '?' wildcards supported. +# source:[:] - Match source code filename [and line] +# field:= - Match field key to a value. Can be specified +# multiple times to match multiple keys. +# cat[egory]: - Match a category. Can be specified multiple times to +# match multiple categories. +# For example: event:http_request_* (cat:error cat:storage) + +# Filter to specify what debug logging to enable. This will eventually replace +# mail_debug and auth_debug settings. +#log_debug = + +# Crash after logging a matching event. For example category:error will crash +# any time an error is logged, which can be useful for debugging. +#log_core_filter = + +# Log unsuccessful authentication attempts and the reasons why they failed. +#auth_verbose = no + +# In case of password mismatches, log the attempted password. Valid values are +# no, plain and sha1. sha1 can be useful for detecting brute force password +# attempts vs. user simply trying the same password over and over again. +# You can also truncate the value to n chars by appending ":n" (e.g. sha1:6). +#auth_verbose_passwords = no + +# Even more verbose logging for debugging purposes. Shows for example SQL +# queries. +#auth_debug = no + +# In case of password mismatches, log the passwords and used scheme so the +# problem can be debugged. Enabling this also enables auth_debug. +#auth_debug_passwords = no + +# Enable mail process debugging. This can help you figure out why Dovecot +# isn't finding your mails. +#mail_debug = no + +# Show protocol level SSL errors. +#verbose_ssl = no + +# mail_log plugin provides more event logging for mail processes. +plugin { + # Events to log. Also available: flag_change append + #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename + # Available fields: uid, box, msgid, from, subject, size, vsize, flags + # size and vsize are available only for expunge and copy events. + #mail_log_fields = uid box msgid size +} + +## +## Log formatting. +## + +# Prefix for each line written to log file. % codes are in strftime(3) +# format. +#log_timestamp = "%b %d %H:%M:%S " + +# Space-separated list of elements we want to log. The elements which have +# a non-empty variable value are joined together to form a comma-separated +# string. +#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c + +# Login log format. %s contains login_log_format_elements string, %$ contains +# the data we want to log. +#login_log_format = %$: %s + +# Log prefix for mail processes. See doc/wiki/Variables.txt for list of +# possible variables you can use. +#mail_log_prefix = "%s(%u)<%{pid}><%{session}>: " + +# Format to use for logging mail deliveries: +# %$ - Delivery status message (e.g. "saved to INBOX") +# %m / %{msgid} - Message-ID +# %s / %{subject} - Subject +# %f / %{from} - From address +# %p / %{size} - Physical size +# %w / %{vsize} - Virtual size +# %e / %{from_envelope} - MAIL FROM envelope +# %{to_envelope} - RCPT TO envelope +# %{delivery_time} - How many milliseconds it took to deliver the mail +# %{session_time} - How long LMTP session took, not including delivery_time +# %{storage_id} - Backend-specific ID for mail, e.g. Maildir filename +#deliver_log_format = msgid=%m: %$ diff --git a/dovecot/conf.d/10-mail.conf b/dovecot/conf.d/10-mail.conf new file mode 100644 index 0000000..d95112a --- /dev/null +++ b/dovecot/conf.d/10-mail.conf @@ -0,0 +1,420 @@ +## +## Mailbox locations and namespaces +## + +# Location for users' mailboxes. The default is empty, which means that Dovecot +# tries to find the mailboxes automatically. This won't work if the user +# doesn't yet have any mail, so you should explicitly tell Dovecot the full +# location. +# +# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u) +# isn't enough. You'll also need to tell Dovecot where the other mailboxes are +# kept. This is called the "root mail directory", and it must be the first +# path given in the mail_location setting. +# +# There are a few special variables you can use, eg.: +# +# %u - username +# %n - user part in user@domain, same as %u if there's no domain +# %d - domain part in user@domain, empty if there's no domain +# %h - home directory +# +# See doc/wiki/Variables.txt for full list. Some examples: +# +# mail_location = maildir:~/Maildir +# mail_location = mbox:~/mail:INBOX=/var/mail/%u +# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n +# +# +# +mail_location = mbox:~/mail:INBOX=/var/mail/%u + +# If you need to set multiple mailbox locations or want to change default +# namespace settings, you can do it by defining namespace sections. +# +# You can have private, shared and public namespaces. Private namespaces +# are for user's personal mails. Shared namespaces are for accessing other +# users' mailboxes that have been shared. Public namespaces are for shared +# mailboxes that are managed by sysadmin. If you create any shared or public +# namespaces you'll typically want to enable ACL plugin also, otherwise all +# users can access all the shared mailboxes, assuming they have permissions +# on filesystem level to do so. +namespace inbox { + # Namespace type: private, shared or public + #type = private + + # Hierarchy separator to use. You should use the same separator for all + # namespaces or some clients get confused. '/' is usually a good one. + # The default however depends on the underlying mail storage format. + #separator = + + # Prefix required to access this namespace. This needs to be different for + # all namespaces. For example "Public/". + #prefix = + + # Physical location of the mailbox. This is in same format as + # mail_location, which is also the default for it. + #location = + + # There can be only one INBOX, and this setting defines which namespace + # has it. + inbox = yes + + # If namespace is hidden, it's not advertised to clients via NAMESPACE + # extension. You'll most likely also want to set list=no. This is mostly + # useful when converting from another server with different namespaces which + # you want to deprecate but still keep working. For example you can create + # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/". + #hidden = no + + # Show the mailboxes under this namespace with LIST command. This makes the + # namespace visible for clients that don't support NAMESPACE extension. + # "children" value lists child mailboxes, but hides the namespace prefix. + #list = yes + + # Namespace handles its own subscriptions. If set to "no", the parent + # namespace handles them (empty prefix should always have this as "yes") + #subscriptions = yes + + # See 15-mailboxes.conf for definitions of special mailboxes. +} + +# Example shared namespace configuration +#namespace { + #type = shared + #separator = / + + # Mailboxes are visible under "shared/user@domain/" + # %%n, %%d and %%u are expanded to the destination user. + #prefix = shared/%%u/ + + # Mail location for other users' mailboxes. Note that %variables and ~/ + # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the + # destination user's data. + #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u + + # Use the default namespace for saving subscriptions. + #subscriptions = no + + # List the shared/ namespace only if there are visible shared mailboxes. + #list = children +#} +# Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"? +#mail_shared_explicit_inbox = no + +# System user and group used to access mails. If you use multiple, userdb +# can override these by returning uid or gid fields. You can use either numbers +# or names. +#mail_uid = +#mail_gid = + +# Group to enable temporarily for privileged operations. Currently this is +# used only with INBOX when either its initial creation or dotlocking fails. +# Typically this is set to "mail" to give access to /var/mail. +mail_privileged_group = mail + +# Grant access to these supplementary groups for mail processes. Typically +# these are used to set up access to shared mailboxes. Note that it may be +# dangerous to set these if users can create symlinks (e.g. if "mail" group is +# set here, ln -s /var/mail ~/mail/var could allow a user to delete others' +# mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it). +#mail_access_groups = + +# Allow full filesystem access to clients. There's no access checks other than +# what the operating system does for the active UID/GID. It works with both +# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/ +# or ~user/. +#mail_full_filesystem_access = no + +# Dictionary for key=value mailbox attributes. This is used for example by +# URLAUTH and METADATA extensions. +#mail_attribute_dict = + +# A comment or note that is associated with the server. This value is +# accessible for authenticated users through the IMAP METADATA server +# entry "/shared/comment". +#mail_server_comment = "" + +# Indicates a method for contacting the server administrator. According to +# RFC 5464, this value MUST be a URI (e.g., a mailto: or tel: URL), but that +# is currently not enforced. Use for example mailto:admin@example.com. This +# value is accessible for authenticated users through the IMAP METADATA server +# entry "/shared/admin". +#mail_server_admin = + +## +## Mail processes +## + +# Don't use mmap() at all. This is required if you store indexes to shared +# filesystems (NFS or clustered filesystem). +#mmap_disable = no + +# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL +# since version 3, so this should be safe to use nowadays by default. +#dotlock_use_excl = yes + +# When to use fsync() or fdatasync() calls: +# optimized (default): Whenever necessary to avoid losing important data +# always: Useful with e.g. NFS when write()s are delayed +# never: Never use it (best performance, but crashes can lose data) +#mail_fsync = optimized + +# Locking method for index files. Alternatives are fcntl, flock and dotlock. +# Dotlocking uses some tricks which may create more disk I/O than other locking +# methods. NFS users: flock doesn't work, remember to change mmap_disable. +#lock_method = fcntl + +# Directory where mails can be temporarily stored. Usually it's used only for +# mails larger than >= 128 kB. It's used by various parts of Dovecot, for +# example LDA/LMTP while delivering large mails or zlib plugin for keeping +# uncompressed mails. +#mail_temp_dir = /tmp + +# Valid UID range for users, defaults to 500 and above. This is mostly +# to make sure that users can't log in as daemons or other system users. +# Note that denying root logins is hardcoded to dovecot binary and can't +# be done even if first_valid_uid is set to 0. +#first_valid_uid = 500 +#last_valid_uid = 0 + +# Valid GID range for users, defaults to non-root/wheel. Users having +# non-valid GID as primary group ID aren't allowed to log in. If user +# belongs to supplementary groups with non-valid GIDs, those groups are +# not set. +#first_valid_gid = 1 +#last_valid_gid = 0 + +# Maximum allowed length for mail keyword name. It's only forced when trying +# to create new keywords. +#mail_max_keyword_length = 50 + +# ':' separated list of directories under which chrooting is allowed for mail +# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too). +# This setting doesn't affect login_chroot, mail_chroot or auth chroot +# settings. If this setting is empty, "/./" in home dirs are ignored. +# WARNING: Never add directories here which local users can modify, that +# may lead to root exploit. Usually this should be done only if you don't +# allow shell access for users. +#valid_chroot_dirs = + +# Default chroot directory for mail processes. This can be overridden for +# specific users in user database by giving /./ in user's home directory +# (eg. /home/./user chroots into /home). Note that usually there is no real +# need to do chrooting, Dovecot doesn't allow users to access files outside +# their mail directory anyway. If your home directories are prefixed with +# the chroot directory, append "/." to mail_chroot. +#mail_chroot = + +# UNIX socket path to master authentication server to find users. +# This is used by imap (for shared users) and lda. +#auth_socket_path = /var/run/dovecot/auth-userdb + +# Directory where to look up mail plugins. +#mail_plugin_dir = /usr/lib/dovecot/modules + +# Space separated list of plugins to load for all services. Plugins specific to +# IMAP, LDA, etc. are added to this list in their own .conf files. +#mail_plugins = + +## +## Mailbox handling optimizations +## + +# Mailbox list indexes can be used to optimize IMAP STATUS commands. They are +# also required for IMAP NOTIFY extension to be enabled. +#mailbox_list_index = yes + +# Trust mailbox list index to be up-to-date. This reduces disk I/O at the cost +# of potentially returning out-of-date results after e.g. server crashes. +# The results will be automatically fixed once the folders are opened. +#mailbox_list_index_very_dirty_syncs = yes + +# Should INBOX be kept up-to-date in the mailbox list index? By default it's +# not, because most of the mailbox accesses will open INBOX anyway. +#mailbox_list_index_include_inbox = no + +# The minimum number of mails in a mailbox before updates are done to cache +# file. This allows optimizing Dovecot's behavior to do less disk writes at +# the cost of more disk reads. +#mail_cache_min_mail_count = 0 + +# When IDLE command is running, mailbox is checked once in a while to see if +# there are any new mails or other changes. This setting defines the minimum +# time to wait between those checks. Dovecot can also use inotify and +# kqueue to find out immediately when changes occur. +#mailbox_idle_check_interval = 30 secs + +# Save mails with CR+LF instead of plain LF. This makes sending those mails +# take less CPU, especially with sendfile() syscall with Linux and FreeBSD. +# But it also creates a bit more disk I/O which may just make it slower. +# Also note that if other software reads the mboxes/maildirs, they may handle +# the extra CRs wrong and cause problems. +#mail_save_crlf = no + +# Max number of mails to keep open and prefetch to memory. This only works with +# some mailbox formats and/or operating systems. +#mail_prefetch_count = 0 + +# How often to scan for stale temporary files and delete them (0 = never). +# These should exist only after Dovecot dies in the middle of saving mails. +#mail_temp_scan_interval = 1w + +# How many slow mail accesses sorting can perform before it returns failure. +# With IMAP the reply is: NO [LIMIT] Requested sort would have taken too long. +# The untagged SORT reply is still returned, but it's likely not correct. +#mail_sort_max_read_count = 0 + +protocol !indexer-worker { + # If folder vsize calculation requires opening more than this many mails from + # disk (i.e. mail sizes aren't in cache already), return failure and finish + # the calculation via indexer process. Disabled by default. This setting must + # be 0 for indexer-worker processes. + #mail_vsize_bg_after_count = 0 +} + +## +## Maildir-specific settings +## + +# By default LIST command returns all entries in maildir beginning with a dot. +# Enabling this option makes Dovecot return only entries which are directories. +# This is done by stat()ing each entry, so it causes more disk I/O. +# (For systems setting struct dirent->d_type, this check is free and it's +# done always regardless of this setting) +#maildir_stat_dirs = no + +# When copying a message, do it with hard links whenever possible. This makes +# the performance much better, and it's unlikely to have any side effects. +#maildir_copy_with_hardlinks = yes + +# Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only +# when its mtime changes unexpectedly or when we can't find the mail otherwise. +#maildir_very_dirty_syncs = no + +# If enabled, Dovecot doesn't use the S= in the Maildir filenames for +# getting the mail's physical size, except when recalculating Maildir++ quota. +# This can be useful in systems where a lot of the Maildir filenames have a +# broken size. The performance hit for enabling this is very small. +#maildir_broken_filename_sizes = no + +# Always move mails from new/ directory to cur/, even when the \Recent flags +# aren't being reset. +#maildir_empty_new = no + +## +## mbox-specific settings +## + +# Which locking methods to use for locking mbox. There are four available: +# dotlock: Create .lock file. This is the oldest and most NFS-safe +# solution. If you want to use /var/mail/ like directory, the users +# will need write access to that directory. +# dotlock_try: Same as dotlock, but if it fails because of permissions or +# because there isn't enough disk space, just skip it. +# fcntl : Use this if possible. Works with NFS too if lockd is used. +# flock : May not exist in all systems. Doesn't work with NFS. +# lockf : May not exist in all systems. Doesn't work with NFS. +# +# You can use multiple locking methods; if you do the order they're declared +# in is important to avoid deadlocks if other MTAs/MUAs are using multiple +# locking methods as well. Some operating systems don't allow using some of +# them simultaneously. +# +# The Debian value for mbox_write_locks differs from upstream Dovecot. It is +# changed to be compliant with Debian Policy (section 11.6) for NFS safety. +# Dovecot: mbox_write_locks = dotlock fcntl +# Debian: mbox_write_locks = fcntl dotlock +# +#mbox_read_locks = fcntl +#mbox_write_locks = fcntl dotlock + +# Maximum time to wait for lock (all of them) before aborting. +#mbox_lock_timeout = 5 mins + +# If dotlock exists but the mailbox isn't modified in any way, override the +# lock file after this much time. +#mbox_dotlock_change_timeout = 2 mins + +# When mbox changes unexpectedly we have to fully read it to find out what +# changed. If the mbox is large this can take a long time. Since the change +# is usually just a newly appended mail, it'd be faster to simply read the +# new mails. If this setting is enabled, Dovecot does this but still safely +# fallbacks to re-reading the whole mbox file whenever something in mbox isn't +# how it's expected to be. The only real downside to this setting is that if +# some other MUA changes message flags, Dovecot doesn't notice it immediately. +# Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK +# commands. +#mbox_dirty_syncs = yes + +# Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE, +# EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored. +#mbox_very_dirty_syncs = no + +# Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK +# commands and when closing the mailbox). This is especially useful for POP3 +# where clients often delete all mails. The downside is that our changes +# aren't immediately visible to other MUAs. +#mbox_lazy_writes = yes + +# If mbox size is smaller than this (e.g. 100k), don't write index files. +# If an index file already exists it's still read, just not updated. +#mbox_min_index_size = 0 + +# Mail header selection algorithm to use for MD5 POP3 UIDLs when +# pop3_uidl_format=%m. For backwards compatibility we use apop3d inspired +# algorithm, but it fails if the first Received: header isn't unique in all +# mails. An alternative algorithm is "all" that selects all headers. +#mbox_md5 = apop3d + +## +## mdbox-specific settings +## + +# Maximum dbox file size until it's rotated. +#mdbox_rotate_size = 10M + +# Maximum dbox file age until it's rotated. Typically in days. Day begins +# from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled. +#mdbox_rotate_interval = 0 + +# When creating new mdbox files, immediately preallocate their size to +# mdbox_rotate_size. This setting currently works only in Linux with some +# filesystems (ext4, xfs). +#mdbox_preallocate_space = no + +## +## Mail attachments +## + +# sdbox and mdbox support saving mail attachments to external files, which +# also allows single instance storage for them. Other backends don't support +# this for now. + +# Directory root where to store mail attachments. Disabled, if empty. +#mail_attachment_dir = + +# Attachments smaller than this aren't saved externally. It's also possible to +# write a plugin to disable saving specific attachments externally. +#mail_attachment_min_size = 128k + +# Filesystem backend to use for saving attachments: +# posix : No SiS done by Dovecot (but this might help FS's own deduplication) +# sis posix : SiS with immediate byte-by-byte comparison during saving +# sis-queue posix : SiS with delayed comparison and deduplication +#mail_attachment_fs = sis posix + +# Hash format to use in attachment filenames. You can add any text and +# variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}. +# Variables can be truncated, e.g. %{sha256:80} returns only first 80 bits +#mail_attachment_hash = %{sha1} + +# Settings to control adding $HasAttachment or $HasNoAttachment keywords. +# By default, all MIME parts with Content-Disposition=attachment, or inlines +# with filename parameter are consired attachments. +# add-flags-on-save - Add the keywords when saving new mails. +# content-type=type or !type - Include/exclude content type. Excluding will +# never consider the matched MIME part as attachment. Including will only +# negate an exclusion (e.g. content-type=!foo/* content-type=foo/bar). +# exclude-inlined - Exclude any Content-Disposition=inline MIME part. +#mail_attachment_detection_options = diff --git a/dovecot/conf.d/10-master.conf b/dovecot/conf.d/10-master.conf new file mode 100644 index 0000000..d52ce80 --- /dev/null +++ b/dovecot/conf.d/10-master.conf @@ -0,0 +1,130 @@ +#default_process_limit = 100 +#default_client_limit = 1000 + +# Default VSZ (virtual memory size) limit for service processes. This is mainly +# intended to catch and kill processes that leak memory before they eat up +# everything. +#default_vsz_limit = 256M + +# Login user is internally used by login processes. This is the most untrusted +# user in Dovecot system. It shouldn't have access to anything at all. +#default_login_user = dovenull + +# Internal user is used by unprivileged processes. It should be separate from +# login user, so that login processes can't disturb other processes. +#default_internal_user = dovecot + +service imap-login { + inet_listener imap { + #port = 143 + } + inet_listener imaps { + #port = 993 + #ssl = yes + } + + # Number of connections to handle before starting a new process. Typically + # the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0 + # is faster. + #service_count = 1 + + # Number of processes to always keep waiting for more connections. + #process_min_avail = 0 + + # If you set service_count=0, you probably need to grow this. + #vsz_limit = $default_vsz_limit +} + +service pop3-login { + inet_listener pop3 { + #port = 110 + } + inet_listener pop3s { + #port = 995 + #ssl = yes + } +} + +service submission-login { + inet_listener submission { + #port = 587 + } +} + +service lmtp { + unix_listener lmtp { + #mode = 0666 + } + + # Create inet listener only if you can't use the above UNIX socket + #inet_listener lmtp { + # Avoid making LMTP visible for the entire internet + #address = + #port = + #} +} + +service imap { + # Most of the memory goes to mmap()ing files. You may need to increase this + # limit if you have huge mailboxes. + #vsz_limit = $default_vsz_limit + + # Max. number of IMAP processes (connections) + #process_limit = 1024 +} + +service pop3 { + # Max. number of POP3 processes (connections) + #process_limit = 1024 +} + +service submission { + # Max. number of SMTP Submission processes (connections) + #process_limit = 1024 +} + +service auth { + # auth_socket_path points to this userdb socket by default. It's typically + # used by dovecot-lda, doveadm, possibly imap process, etc. Users that have + # full permissions to this socket are able to get a list of all usernames and + # get the results of everyone's userdb lookups. + # + # The default 0666 mode allows anyone to connect to the socket, but the + # userdb lookups will succeed only if the userdb returns an "uid" field that + # matches the caller process's UID. Also if caller's uid or gid matches the + # socket's uid or gid the lookup succeeds. Anything else causes a failure. + # + # To give the caller full permissions to lookup all users, set the mode to + # something else than 0666 and Dovecot lets the kernel enforce the + # permissions (e.g. 0777 allows everyone full permissions). + unix_listener auth-userdb { + #mode = 0666 + #user = + #group = + } + + # Postfix smtp-auth + #unix_listener /var/spool/postfix/private/auth { + # mode = 0666 + #} + + # Auth process is run as this user. + #user = $default_internal_user +} + +service auth-worker { + # Auth worker process is run as root by default, so that it can access + # /etc/shadow. If this isn't necessary, the user should be changed to + # $default_internal_user. + #user = root +} + +service dict { + # If dict proxy is used, mail processes should have access to its socket. + # For example: mode=0660, group=vmail and global mail_access_groups=vmail + unix_listener dict { + #mode = 0600 + #user = + #group = + } +} diff --git a/dovecot/conf.d/10-ssl.conf b/dovecot/conf.d/10-ssl.conf new file mode 100644 index 0000000..1b82c29 --- /dev/null +++ b/dovecot/conf.d/10-ssl.conf @@ -0,0 +1,75 @@ +## +## SSL settings +## + +# SSL/TLS support: yes, no, required. +ssl = yes + +# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before +# dropping root privileges, so keep the key file unreadable by anyone but +# root. Included doc/mkcert.sh can be used to easily generate self-signed +# certificate, just make sure to update the domains in dovecot-openssl.cnf +ssl_cert = was automatically rejected:%n%r + +# Delimiter character between local-part and detail in email address. +#recipient_delimiter = + + +# Header where the original recipient address (SMTP's RCPT TO: address) is taken +# from if not available elsewhere. With dovecot-lda -a parameter overrides this. +# A commonly used header for this is X-Original-To. +#lda_original_recipient_header = + +# Should saving a mail to a nonexistent mailbox automatically create it? +#lda_mailbox_autocreate = no + +# Should automatically created mailboxes be also automatically subscribed? +#lda_mailbox_autosubscribe = no + +protocol lda { + # Space separated list of plugins to load (default is global mail_plugins). + #mail_plugins = $mail_plugins +} diff --git a/dovecot/conf.d/15-mailboxes.conf b/dovecot/conf.d/15-mailboxes.conf new file mode 100644 index 0000000..cd5b21b --- /dev/null +++ b/dovecot/conf.d/15-mailboxes.conf @@ -0,0 +1,78 @@ +## +## Mailbox definitions +## + +# Each mailbox is specified in a separate mailbox section. The section name +# specifies the mailbox name. If it has spaces, you can put the name +# "in quotes". These sections can contain the following mailbox settings: +# +# auto: +# Indicates whether the mailbox with this name is automatically created +# implicitly when it is first accessed. The user can also be automatically +# subscribed to the mailbox after creation. The following values are +# defined for this setting: +# +# no - Never created automatically. +# create - Automatically created, but no automatic subscription. +# subscribe - Automatically created and subscribed. +# +# special_use: +# A space-separated list of SPECIAL-USE flags (RFC 6154) to use for the +# mailbox. There are no validity checks, so you could specify anything +# you want in here, but it's not a good idea to use flags other than the +# standard ones specified in the RFC: +# +# \All - This (virtual) mailbox presents all messages in the +# user's message store. +# \Archive - This mailbox is used to archive messages. +# \Drafts - This mailbox is used to hold draft messages. +# \Flagged - This (virtual) mailbox presents all messages in the +# user's message store marked with the IMAP \Flagged flag. +# \Junk - This mailbox is where messages deemed to be junk mail +# are held. +# \Sent - This mailbox is used to hold copies of messages that +# have been sent. +# \Trash - This mailbox is used to hold messages that have been +# deleted. +# +# comment: +# Defines a default comment or note associated with the mailbox. This +# value is accessible through the IMAP METADATA mailbox entries +# "/shared/comment" and "/private/comment". Users with sufficient +# privileges can override the default value for entries with a custom +# value. + +# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf. +namespace inbox { + # These mailboxes are widely used and could perhaps be created automatically: + mailbox Drafts { + special_use = \Drafts + } + mailbox Junk { + special_use = \Junk + } + mailbox Trash { + special_use = \Trash + } + + # For \Sent mailboxes there are two widely used names. We'll mark both of + # them as \Sent. User typically deletes one of them if duplicates are created. + mailbox Sent { + special_use = \Sent + } + mailbox "Sent Messages" { + special_use = \Sent + } + + # If you have a virtual "All messages" mailbox: + #mailbox virtual/All { + # special_use = \All + # comment = All my messages + #} + + # If you have a virtual "Flagged" mailbox: + #mailbox virtual/Flagged { + # special_use = \Flagged + # comment = All my flagged messages + #} +} diff --git a/dovecot/conf.d/20-imap.conf b/dovecot/conf.d/20-imap.conf new file mode 100644 index 0000000..f11552f --- /dev/null +++ b/dovecot/conf.d/20-imap.conf @@ -0,0 +1,98 @@ +## +## IMAP specific settings +## + +# If nothing happens for this long while client is IDLEing, move the connection +# to imap-hibernate process and close the old imap process. This saves memory, +# because connections use very little memory in imap-hibernate process. The +# downside is that recreating the imap process back uses some resources. +#imap_hibernate_timeout = 0 + +# Maximum IMAP command line length. Some clients generate very long command +# lines with huge mailboxes, so you may need to raise this if you get +# "Too long argument" or "IMAP command line too large" errors often. +#imap_max_line_length = 64k + +# IMAP logout format string: +# %i - total number of bytes read from client +# %o - total number of bytes sent to client +# %{fetch_hdr_count} - Number of mails with mail header data sent to client +# %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client +# %{fetch_body_count} - Number of mails with mail body data sent to client +# %{fetch_body_bytes} - Number of bytes with mail body data sent to client +# %{deleted} - Number of mails where client added \Deleted flag +# %{expunged} - Number of mails that client expunged, which does not +# include automatically expunged mails +# %{autoexpunged} - Number of mails that were automatically expunged after +# client disconnected +# %{trashed} - Number of mails that client copied/moved to the +# special_use=\Trash mailbox. +# %{appended} - Number of mails saved during the session +#imap_logout_format = in=%i out=%o deleted=%{deleted} expunged=%{expunged} \ +# trashed=%{trashed} hdr_count=%{fetch_hdr_count} \ +# hdr_bytes=%{fetch_hdr_bytes} body_count=%{fetch_body_count} \ +# body_bytes=%{fetch_body_bytes} + +# Override the IMAP CAPABILITY response. If the value begins with '+', +# add the given capabilities on top of the defaults (e.g. +XFOO XBAR). +#imap_capability = + +# How long to wait between "OK Still here" notifications when client is +# IDLEing. +#imap_idle_notify_interval = 2 mins + +# ID field names and values to send to clients. Using * as the value makes +# Dovecot use the default value. The following fields have default values +# currently: name, version, os, os-version, support-url, support-email. +#imap_id_send = + +# ID fields sent by client to log. * means everything. +#imap_id_log = + +# Workarounds for various client bugs: +# delay-newmail: +# Send EXISTS/RECENT new mail notifications only when replying to NOOP +# and CHECK commands. Some clients ignore them otherwise, for example OSX +# Mail ( + #service_count = 1 + + # Number of processes to always keep waiting for more connections. + #process_min_avail = 0 + + # If you set service_count=0, you probably need to grow this. + #vsz_limit = 64M +#} + +#service managesieve { + # Max. number of ManageSieve processes (connections) + #process_limit = 1024 +#} + +# Service configuration + +protocol sieve { + # Maximum ManageSieve command line length in bytes. ManageSieve usually does + # not involve overly long command lines, so this setting will not normally + # need adjustment + #managesieve_max_line_length = 65536 + + # Maximum number of ManageSieve connections allowed for a user from each IP + # address. + # NOTE: The username is compared case-sensitively. + #mail_max_userip_connections = 10 + + # Space separated list of plugins to load (none known to be useful so far). + # Do NOT try to load IMAP plugins here. + #mail_plugins = + + # MANAGESIEVE logout format string: + # %i - total number of bytes read from client + # %o - total number of bytes sent to client + # %{put_bytes} - Number of bytes saved using PUTSCRIPT command + # %{put_count} - Number of scripts saved using PUTSCRIPT command + # %{get_bytes} - Number of bytes read using GETCRIPT command + # %{get_count} - Number of scripts read using GETSCRIPT command + # %{get_bytes} - Number of bytes processed using CHECKSCRIPT command + # %{get_count} - Number of scripts checked using CHECKSCRIPT command + # %{deleted_count} - Number of scripts deleted using DELETESCRIPT command + # %{renamed_count} - Number of scripts renamed using RENAMESCRIPT command + #managesieve_logout_format = bytes=%i/%o + + # To fool ManageSieve clients that are focused on CMU's timesieved you can + # specify the IMPLEMENTATION capability that Dovecot reports to clients. + # For example: 'Cyrus timsieved v2.2.13' + #managesieve_implementation_string = Dovecot Pigeonhole + + # Explicitly specify the SIEVE and NOTIFY capability reported by the server + # before login. If left unassigned these will be reported dynamically + # according to what the Sieve interpreter supports by default (after login + # this may differ depending on the user). + #managesieve_sieve_capability = + #managesieve_notify_capability = + + # The maximum number of compile errors that are returned to the client upon + # script upload or script verification. + #managesieve_max_compile_errors = 5 + + # Refer to 90-sieve.conf for script quota configuration and configuration of + # Sieve execution limits. +} diff --git a/dovecot/conf.d/20-pop3.conf b/dovecot/conf.d/20-pop3.conf new file mode 100644 index 0000000..7b310ea --- /dev/null +++ b/dovecot/conf.d/20-pop3.conf @@ -0,0 +1,99 @@ +## +## POP3 specific settings +## + +# Don't try to set mails non-recent or seen with POP3 sessions. This is +# mostly intended to reduce disk I/O. With maildir it doesn't move files +# from new/ to cur/, with mbox it doesn't write Status-header. +#pop3_no_flag_updates = no + +# Support LAST command which exists in old POP3 specs, but has been removed +# from new ones. Some clients still wish to use this though. Enabling this +# makes RSET command clear all \Seen flags from messages. +#pop3_enable_last = no + +# If mail has X-UIDL header, use it as the mail's UIDL. +#pop3_reuse_xuidl = no + +# Allow only one POP3 session to run simultaneously for the same user. +#pop3_lock_session = no + +# POP3 requires message sizes to be listed as if they had CR+LF linefeeds. +# Many POP3 servers violate this by returning the sizes with LF linefeeds, +# because it's faster to get. When this setting is enabled, Dovecot still +# tries to do the right thing first, but if that requires opening the +# message, it fallbacks to the easier (but incorrect) size. +#pop3_fast_size_lookups = no + +# POP3 UIDL (unique mail identifier) format to use. You can use following +# variables, along with the variable modifiers described in +# doc/wiki/Variables.txt (e.g. %Uf for the filename in uppercase) +# +# %v - Mailbox's IMAP UIDVALIDITY +# %u - Mail's IMAP UID +# %m - MD5 sum of the mailbox headers in hex (mbox only) +# %f - filename (maildir only) +# %g - Mail's GUID +# +# If you want UIDL compatibility with other POP3 servers, use: +# UW's ipop3d : %08Xv%08Xu +# Courier : %f or %v-%u (both might be used simultaneously) +# Cyrus (<= 2.1.3) : %u +# Cyrus (>= 2.1.4) : %v.%u +# Dovecot v0.99.x : %v.%u +# tpop3d : %Mf +# +# Note that Outlook 2003 seems to have problems with %v.%u format which was +# Dovecot's default, so if you're building a new server it would be a good +# idea to change this. %08Xu%08Xv should be pretty fail-safe. +# +#pop3_uidl_format = %08Xu%08Xv + +# Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes +# won't change those UIDLs. Currently this works only with Maildir. +#pop3_save_uidl = no + +# What to do about duplicate UIDLs if they exist? +# allow: Show duplicates to clients. +# rename: Append a temporary -2, -3, etc. counter after the UIDL. +#pop3_uidl_duplicates = allow + +# This option changes POP3 behavior so that it's not possible to actually +# delete mails via POP3, only hide them from future POP3 sessions. The mails +# will still be counted towards user's quota until actually deleted via IMAP. +# Use e.g. "$POP3Deleted" as the value (it will be visible as IMAP keyword). +# Make sure you can legally archive mails before enabling this setting. +#pop3_deleted_flag = + +# POP3 logout format string: +# %i - total number of bytes read from client +# %o - total number of bytes sent to client +# %t - number of TOP commands +# %p - number of bytes sent to client as a result of TOP command +# %r - number of RETR commands +# %b - number of bytes sent to client as a result of RETR command +# %d - number of deleted messages +# %{deleted_bytes} - number of bytes in deleted messages +# %m - number of messages (before deletion) +# %s - mailbox size in bytes (before deletion) +# %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly +#pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s + +# Workarounds for various client bugs: +# outlook-no-nuls: +# Outlook and Outlook Express hang if mails contain NUL characters. +# This setting replaces them with 0x80 character. +# oe-ns-eoh: +# Outlook Express and Netscape Mail breaks if end of headers-line is +# missing. This option simply sends it if it's missing. +# The list is space-separated. +#pop3_client_workarounds = + +protocol pop3 { + # Space separated list of plugins to load (default is global mail_plugins). + #mail_plugins = $mail_plugins + + # Maximum number of POP3 connections allowed for a user from each IP address. + # NOTE: The username is compared case-sensitively. + #mail_max_userip_connections = 10 +} diff --git a/dovecot/conf.d/90-acl.conf b/dovecot/conf.d/90-acl.conf new file mode 100644 index 0000000..f0c0e7a --- /dev/null +++ b/dovecot/conf.d/90-acl.conf @@ -0,0 +1,19 @@ +## +## Mailbox access control lists. +## + +# vfile backend reads ACLs from "dovecot-acl" file from mail directory. +# You can also optionally give a global ACL directory path where ACLs are +# applied to all users' mailboxes. The global ACL directory contains +# one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter +# specifies how many seconds to wait between stat()ing dovecot-acl file +# to see if it changed. +plugin { + #acl = vfile:/etc/dovecot/global-acls:cache_secs=300 +} + +# To let users LIST mailboxes shared by other users, Dovecot needs a +# shared mailbox dictionary. For example: +plugin { + #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes +} diff --git a/dovecot/conf.d/90-plugin.conf b/dovecot/conf.d/90-plugin.conf new file mode 100644 index 0000000..8c8fccf --- /dev/null +++ b/dovecot/conf.d/90-plugin.conf @@ -0,0 +1,11 @@ +## +## Plugin settings +## + +# All wanted plugins must be listed in mail_plugins setting before any of the +# settings take effect. See for list of plugins and +# their configuration. Note that %variable expansion is done for all values. + +plugin { + #setting_name = value +} diff --git a/dovecot/conf.d/90-quota.conf b/dovecot/conf.d/90-quota.conf new file mode 100644 index 0000000..3308c05 --- /dev/null +++ b/dovecot/conf.d/90-quota.conf @@ -0,0 +1,83 @@ +## +## Quota configuration. +## + +# Note that you also have to enable quota plugin in mail_plugins setting. +# + +## +## Quota limits +## + +# Quota limits are set using "quota_rule" parameters. To get per-user quota +# limits, you can set/override them by returning "quota_rule" extra field +# from userdb. It's also possible to give mailbox-specific limits, for example +# to give additional 100 MB when saving to Trash: + +plugin { + #quota_rule = *:storage=1G + #quota_rule2 = Trash:storage=+100M + + # LDA/LMTP allows saving the last mail to bring user from under quota to + # over quota, if the quota doesn't grow too high. Default is to allow as + # long as quota will stay under 10% above the limit. Also allowed e.g. 10M. + #quota_grace = 10%% + + # Quota plugin can also limit the maximum accepted mail size. + #quota_max_mail_size = 100M +} + +## +## Quota warnings +## + +# You can execute a given command when user exceeds a specified quota limit. +# Each quota root has separate limits. Only the command for the first +# exceeded limit is executed, so put the highest limit first. +# The commands are executed via script service by connecting to the named +# UNIX socket (quota-warning below). +# Note that % needs to be escaped as %%, otherwise "% " expands to empty. + +plugin { + #quota_warning = storage=95%% quota-warning 95 %u + #quota_warning2 = storage=80%% quota-warning 80 %u +} + +# Example quota-warning service. The unix listener's permissions should be +# set in a way that mail processes can connect to it. Below example assumes +# that mail processes run as vmail user. If you use mode=0666, all system users +# can generate quota warnings to anyone. +#service quota-warning { +# executable = script /usr/local/bin/quota-warning.sh +# user = dovecot +# unix_listener quota-warning { +# user = vmail +# } +#} + +## +## Quota backends +## + +# Multiple backends are supported: +# dirsize: Find and sum all the files found from mail directory. +# Extremely SLOW with Maildir. It'll eat your CPU and disk I/O. +# dict: Keep quota stored in dictionary (eg. SQL) +# maildir: Maildir++ quota +# fs: Read-only support for filesystem quota + +plugin { + #quota = dirsize:User quota + #quota = maildir:User quota + #quota = dict:User quota::proxy::quota + #quota = fs:User quota +} + +# Multiple quota roots are also possible, for example this gives each user +# their own 100MB quota and one shared 1GB quota within the domain: +plugin { + #quota = dict:user::proxy::quota + #quota2 = dict:domain:%d:proxy::quota_domain + #quota_rule = *:storage=102400 + #quota2_rule = *:storage=1048576 +} diff --git a/dovecot/conf.d/90-sieve-extprograms.conf b/dovecot/conf.d/90-sieve-extprograms.conf new file mode 100644 index 0000000..17dcb77 --- /dev/null +++ b/dovecot/conf.d/90-sieve-extprograms.conf @@ -0,0 +1,44 @@ +# Sieve Extprograms plugin configuration + +# Don't forget to add the sieve_extprograms plugin to the sieve_plugins setting. +# Also enable the extensions you need (one or more of vnd.dovecot.pipe, +# vnd.dovecot.filter and vnd.dovecot.execute) by adding these to the +# sieve_extensions or sieve_global_extensions settings. Restricting these +# extensions to a global context using sieve_global_extensions is recommended. + +plugin { + + # The directory where the program sockets are located for the + # vnd.dovecot.pipe, vnd.dovecot.filter and vnd.dovecot.execute extension + # respectively. The name of each unix socket contained in that directory + # directly maps to a program-name referenced from the Sieve script. + #sieve_pipe_socket_dir = sieve-pipe + #sieve_filter_socket_dir = sieve-filter + #sieve_execute_socket_dir = sieve-execute + + # The directory where the scripts are located for direct execution by the + # vnd.dovecot.pipe, vnd.dovecot.filter and vnd.dovecot.execute extension + # respectively. The name of each script contained in that directory + # directly maps to a program-name referenced from the Sieve script. + #sieve_pipe_bin_dir = /usr/lib/dovecot/sieve-pipe + #sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter + #sieve_execute_bin_dir = /usr/lib/dovecot/sieve-execute +} + +# An example program service called 'do-something' to pipe messages to +#service do-something { + # Define the executed script as parameter to the sieve service + #executable = script /usr/lib/dovecot/sieve-pipe/do-something.sh + + # Use some unprivileged user for executing the program + #user = dovenull + + # The unix socket located in the sieve_pipe_socket_dir (as defined in the + # plugin {} section above) + #unix_listener sieve-pipe/do-something { + # LDA/LMTP must have access + # user = vmail + # mode = 0600 + #} +#} + diff --git a/dovecot/conf.d/90-sieve.conf b/dovecot/conf.d/90-sieve.conf new file mode 100644 index 0000000..2902091 --- /dev/null +++ b/dovecot/conf.d/90-sieve.conf @@ -0,0 +1,214 @@ +## +## Settings for the Sieve interpreter +## + +# Do not forget to enable the Sieve plugin in 15-lda.conf and 20-lmtp.conf +# by adding it to the respective mail_plugins= settings. + +# The Sieve interpreter can retrieve Sieve scripts from several types of +# locations. The default `file' location type is a local filesystem path +# pointing to a Sieve script file or a directory containing multiple Sieve +# script files. More complex setups can use other location types such as +# `ldap' or `dict' to fetch Sieve scripts from remote databases. +# +# All settings that specify the location of one ore more Sieve scripts accept +# the following syntax: +# +# location = [:]path[;