RHCE(postfix——群发)

1、编辑postfix服务的主配置文件

[root@kittod ~]# vim /etc/aliases
#在文件最后面添加以下配置

workgroup: zhangsan,lisi,wangwu
workgroup1: zhangsan,lisi

2、root用户群发邮件

[root@kittod ~]# mail [email protected]
Subject: adfad
adwafa
EOT
[root@kittod ~]# send-mail: warning: /etc/postfix/main.cf, line 135: overriding earlier entry: inet_interfaces=all
postdrop: warning: /etc/postfix/main.cf, line 135: overriding earlier entry: inet_interfaces=all

3、进入lisi用户查看邮件

[lisi@kittod root]$ su - lisi
Password: 
Last login: Mon Nov 29 15:00:17 CST 2021 on pts/0
[lisi@kittod ~]$ mail
Heirloom Mail version 12.5 7/5/10.  Type ? for help.
"/var/spool/mail/lisi": 6 messages 4 new 6 unread
 U  1 root                  Sun Nov 21 16:26  19/539   "asd"
 U  2 root                  Sun Nov 21 16:29  19/554   "qwe"
>N  3 root                  Mon Nov 29 14:54  18/549   "rtyrt"
 N  4 root                  Mon Nov 29 14:56  18/553   "12324213"
 N  5 root                  Mon Nov 29 14:58  18/552   "ibhuef"
 N  6 root                  Mon Nov 29 15:00  18/552   "adfad"
& 6
Message  6:
From [email protected]  Mon Nov 29 15:00:09 2021
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Date: Mon, 29 Nov 2021 15:00:09 +0800
To: [email protected]
Subject: adfad
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: root <[email protected]>
Status: R

adwafa

& Held 6 messages in /var/spool/mail/lisi
You have mail in /var/spool/mail/lisi

同时,在workgroup1组的所有用户都会受到该邮件

おすすめ

転載: blog.csdn.net/weixin_53002381/article/details/121609722