测试系统:almxlinux8或almxlinux9、Rocky(8)
硬件基本配置:1核,3G或以上内存,否则不建议安装Amavis和ClamAV
注意:此Amavis不需要dkim所以关闭生成dkim功能
一、升级系统安装模板并安装

yum install epel-release -y
yum update -y
yum install amavis -y
yum install arj bzip2 cpio file gzip nomarch unrar p7zip unzip zip lrzsz lzip lz4 lzop -y

二、配置amavis,配置文件/etc/amavisd/amavisd.conf
把以下的example.com替换成你的域名

$mydomain = 'example.com';
$myhostname = 'mail.example.com';

关闭dkim注释掉$enable_dkim_signing = 1

#$enable_dkim_signing = 1

启动amavis

systemctl start amavisd
systemctl enable amavisd
systemctl status amavisd

三、amavisd与postfix集成
在/etc/postfix/main.cf最后面加入以下内容

#amavis
content_filter = smtp-amavis:[127.0.0.1]:10024
smtpd_proxy_options = speed_adjust

在/etc/postfix/master.cf文件最后面加入以下内容

smtp-amavis   unix   -   -   n   -   2   smtp
     -o syslog_name=postfix/amavis
     -o smtp_data_done_timeout=1200
     -o smtp_send_xforward_command=yes
     -o disable_dns_lookups=yes
     -o max_use=20
     -o smtp_tls_security_level=none
127.0.0.1:10025   inet   n    -     n     -     -    smtpd
     -o syslog_name=postfix/10025
     -o content_filter=
     -o mynetworks_style=host
     -o mynetworks=127.0.0.0/8
     -o local_recipient_maps=
     -o relay_recipient_maps=
     -o strict_rfc821_envelopes=yes
     -o smtp_tls_security_level=none
     -o smtpd_tls_security_level=none
     -o smtpd_restriction_classes=
     -o smtpd_delay_reject=no
     -o smtpd_client_restrictions=permit_mynetworks,reject
     -o smtpd_helo_restrictions=
     -o smtpd_sender_restrictions=
     -o smtpd_recipient_restrictions=permit_mynetworks,reject
     -o smtpd_end_of_data_restrictions=
     -o smtpd_error_sleep_time=0
     -o smtpd_soft_error_limit=1001
     -o smtpd_hard_error_limit=1000
     -o smtpd_client_connection_count_limit=0
     -o smtpd_client_connection_rate_limit=0
     -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings

四、配置ClamAV
1.安装ClamAV

yum install clamav clamav-lib clamav-data clamav-update -y
systemctl start clamav-freshclam
systemctl enable clamav-freshclam
systemctl restart amavisd

编辑 /etc/clamd.d/scan.conf 文件,确保 LocalSocket 指向 Amavis 的路径:

LocalSocket /run/clamd.scan/clamd.sock

Amavis 的配置文件:

$clamd_socket = /run/clamd.scan/clamd.sock";

查看日志

journalctl -eu amavisd

完成

分类: mail使用 标签: almxlinux安装amavisalmxlinux安装clamavOpenCloudOS安装amavisOpenCloudOS安装clamav

评论

暂无评论数据

暂无评论数据

目录