1, Configure smtp service, reject the mail from remote.test
install postfix, installed before.
copy from access,
cd /etc/postfix/
vim accesscopy following lines,
<pre name="code" class="plain"># /etc/postfix/main.cf: # smtpd_client_restrictions = # check_client_access hash: /etc/postfix/access
copy to /etc/postfix/main.cf, and switch on,
/etc/postfix/main.cf: smtpd_client_restrictions = check_client_access hash: /etc/postfix/accessmodify the access document, add one line,
192.168.0.254 REJECT2, Configure the NFS service, make the share folder as masque folder,
create the folder,
Mkdir /data/{read,write} -p
Mkdir /export/{read,write} -pmodify the fstab
vim /etc/fstab/data/read /export/read none bind 0 0
/data/write /export/write none bind 0 0mount all,
mount -amodify the export configuration,
Vim /etc/exportsadd two lines,
/exports/read *.example.com(rw,sync)
/exports/write *.example.com(rw,sync)map all users to anonymous user, add parameter as "all_squash"
allow root user to login as root, and own root user access right, add parameter "no_root_squash"
3, edit the boot parameter, add kernctl=5,
vim /boot/grub/grub.conf
to test the result, reboot the system and use the command,
cat /proc/cmdline

本文介绍了如何配置SMTP服务以拒绝来自特定域名的邮件,并详细说明了安装Postfix及设置访问控制的过程。此外,还提供了配置NFS服务的方法,包括创建共享文件夹、设置挂载选项及权限管理。
383

被折叠的 条评论
为什么被折叠?



