postfix安装以及配置9

简介:

7、修改postfix的配置,让它能调用amavisd,以实现病毒及垃圾邮件的过滤

1vi /etc/postfix/master.cf
在文末添加如下内容:
##########################################
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
#################################################
amavisfeed unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
#
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-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_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-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_milters
-o local_header_rewrite_clients=
说明:注意每行“-o”前的空格;
 
2#vi /etc/postfix/main.cf
在文末添加如下行:
content_filter=amavisfeed:[127.0.0.1]:10024
 

8、让postfix重新加载主配置文件,并查看启动情况

#service postfix stop
#service postfix start 

9、查看amavisd是否在监听10024端口,并测试服务启动情况:

# netstat -nltp |grep 10024
tcp        0      0 127.0.0.1:10024             0.0.0.0:*                   LISTEN      30744/amavisd (mast

10postfix重新加载配置文件后将授权并激活"127.0.0.1:10025"端口,一个正常的服务连接应该类同下面

# netstat -nltp |grep 10025
tcp        0      0 127.0.0.1:10025             0.0.0.0:*                   LISTEN      30712/master
 
 
后续会贴出来关于过滤垃圾邮件或者其他功能的相关文章.

本文转自wiliiwin 51CTO博客,原文链接:http://blog.51cto.com/wiliiwin/221336

相关文章
|
网络协议 Linux 文件存储
Postfix 邮件服务器的配置
Postfix是一种功能强大且功能多样的邮件传输代理。在本文中,我们已经了解了如何使用postfix 和 dovecot为基于系统用户帐户的单个域实现基本电子邮件服务器。我们几乎没有涉及基于 postfix 的系统的真正功能,但希望能为新用户构建提供坚实的工作基础。
1387 0
|
网络协议 网络安全
RH358配置电子邮件传输--自动化Postfix配置
RH358配置电子邮件传输--自动化Postfix配置
161 0
RH358配置电子邮件传输--自动化Postfix配置
|
网络协议 Linux 网络安全
Linux服务器---邮件服务安装postfix
安装postfix      postfix是一个快速、易于管理、安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器。1、安装postfix       [root@localhost ~]# rpm -qa | grep postfix      [root@localhos...
2303 0
CentOS8配置Postfix开启SASL找不到服务
CentOS8配置Postfix开启SASL找不到服务
CentOS8配置Postfix开启SASL找不到服务
|
开发工具 网络安全 数据安全/隐私保护
Postfix 邮件服务器安装与配置
#!/bin/bash yum -y install postfix dovecot; #/etc/postfix/main.cf #postfix check  postfix start  postfix stop postfix flush  postfixreload #/etc/postfix/main.
1245 0
|
Linux 网络协议 开发工具
|
网络协议 关系型数据库 测试技术
|
Linux 数据安全/隐私保护 Python