我有一个名为users
and users的组user1
和user2
. 我已经安装了 postfix,我可以收到user1@example.com
和的邮件user2@example.com
。是否可以将邮件发送到users@examlpe.com
,以便群组成员能够阅读?
postfix 安装在 ubuntu 服务器上并使用几乎默认配置,只需设置域和网络等。用户和组是使用其主目录创建的。
我有一个名为users
and users的组user1
和user2
. 我已经安装了 postfix,我可以收到user1@example.com
和的邮件user2@example.com
。是否可以将邮件发送到users@examlpe.com
,以便群组成员能够阅读?
postfix 安装在 ubuntu 服务器上并使用几乎默认配置,只需设置域和网络等。用户和组是使用其主目录创建的。
From the postfix manual:
# man aliases
...
Aliases
Local Aliases
/etc/mail/aliases is formatted as a series of lines of the
form
aliasname:address[, address]
aliasname is the name of the alias or alias group, and
address is the address of a recipient in the group. Aliases
can be nested. That is, an address can be the name of
another alias group. Because of the way sendmail(1M) per-
forms mapping from upper-case to lower-case, an address that
is the name of another alias group must not contain any
upper-case letters.
Lines beginning with white space are treated as continuation
lines for the preceding alias. Lines beginning with # are
comments.
You would need to manually add each user to the users group within the aliases file on your host (please check the manual for your distribution for that aliases file location).
So, for your given example:
# tail -1 /etc/mail/aliases
users: user1, user2
Once you have made these changes to your aliases file, run the following:
# newaliases