警告:我总共* nix n00b。 我需要在OpenBSD上设置“全部”邮件设置。 我只是使用预先安装的邮件服务。 特别是我想发送到`abc-123-def-geh @ localhost'的邮件redirect到'user @ localhost'。 有没有使用预装的东西的方式,或者我需要一些其他的软件? 如果是这样的话:关于轻量级,易于configuration的软件的build议?
如果预装的服务是Postfix或者Sendmail,你应该可以编辑/etc/mail/aliases文件来满足你的需求。 它的格式是:
[alias name]:[existing account]
所以,要创build你需要的别名,你需要编辑这个文件来包含:
abc-123-def-geh: user
然后,以root身份运行newaliases命令。
你也可以用这种方式定义组,等等。 看man 5 aliases 。 大多数邮件默认发送到根,所以你可能也想为root定义一个别名。
我安装了postfix(并不那么困难,但花了几个小时),在/ etc / postfix / virtual中添加了“catch-all”别名。 完成 – ta-daa! ;)
而且,在启动postfix之前,我必须杀死sendmail才能够运行postfix for smtp(本地catch-allunit testing需要)。