一段时间以来,我一直在对腐败的安装进行故障排除。更改别名后,我无法将 rancid 发送到正确的电子邮件地址 设置变量LIST_OF_GROUPS="mygroup"
并设置文件/etc/rancid/rancid.config
中相应的别名记录: 。我已经多次运行 newaliases 命令。以下是邮件日志。/etc/aliases
rancid-mygroup: [email protected]
需要明确的是,它会提取配置并发送电子邮件,但由于电子邮件/组内容不正确,因此它们会被丢弃。
Jun 13 12:15:42 rancid postfix/pickup[27906]: 3B69A214FC: uid=498 from=<rancid>
Jun 13 12:15:42 rancid postfix/cleanup[28607]: 3B69A214FC: message-id=<[email protected]>
Jun 13 12:15:42 rancid postfix/qmgr[22342]: 3B69A214FC: from=<[email protected]>, size=4194, nrcpt=1 (queue active)
Jun 13 12:15:42 rancid postfix/smtp[28615]: 3B69A214FC: to=<[email protected]>, orig_to=<rancid-mygroup>, relay=192.168.40.74[192.168.40.74]:25, delay=0.13, delays=0.02/0.01/0/0.1, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> Queued mail for delivery)
Jun 13 12:15:42 rancid postfix/qmgr[22342]: 3B69A214FC: removed
版本:rancid 版本 3.1-3.el6 -- postfix 版本-2.6.6-6.el6_5 -- cetnos 6.6 --
答案1
/etc/aliases 用于本地传递。请注意 /etc/postfix/virtual 顶部的注释:
# The optional virtual(5) alias table rewrites recipient
# addresses for all local, all virtual, and all remote mail
# destinations. This is unlike the aliases(5) table which
# is used only for local(8) delivery. Virtual aliasing is
# recursive, and is implemented by the Postfix cleanup(8)
# daemon before mail is queued.
您想要添加到 /etc/postfix/virtual 行(注意,没有冒号):
rancid-mygroup [email protected]
# You may also need
[email protected] [email protected]
然后创建哈希:
postmap hash:/etc/postfix/virtual
然后将行添加到/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
重新启动 Postfix 并测试。发送至 rancip-mygroup 的电子邮件应发送至[电子邮件受保护]。