我们有几个MXlogging的域,指向运行Qmail的网关,我们在networking的边缘有一个网关,它依次转发到基于smtproutes的几个内部邮件服务器之一。
我的问题是,如果我想将每个进入特定域的电子邮件转发到两个单独的服务器,是否有一种简单的方法可以在Qmail中执行此操作? (我们希望在不同步IMAP帐户的情况下从一台机器迁移到另一台机器,所以我们希望邮件能够在两台机器上连续使用几周,以便用户可以在新服务器上安装最近的邮件。
谢谢。
PS,我很抱歉,如果这是一个重复的,我以为我提交了这个,但现在找不到它(不是在我的历史),所以我觉得它一定没有通过。
你可能想看看这个:lifewithqmail.org/lwq.html#dot-forward
这个:greens.org/about/software/qmail/man/man5/dot-qmail.html
QMAIL文件要更改qmail-local的行为,请在主目录中设置一个.qmail文件。
.qmail contains one or more lines. Each line is a delivery instruction. qmail-local follows each instruction in turn. There are five types of delivery instructions: (1) comment; (2) program; (3) forward; (4) mbox; (5) maildir. (3) A forward line begins with an ampersand: &[email protected] qmail-local takes the rest of the line as a mail address; it uses qmail-queue to forward the message to that address. The address must contain a fully qualified domain name; it must not contain extra spaces, angle brackets, or comments: # the following examples are WRONG &me@new &<[email protected]> & [email protected] &[email protected] (New Address) If the address begins with a letter or number, you may leave out the ampersand: [email protected] Note that qmail-local omits its new Return-Path line when forwarding messages.
希望这有助于 – 我没有一个qmail服务器,方便先testing一下。
编辑:
您可能需要使用脚本为每个用户创build这些文件。
涉及多less用户? 是否有可能让他们添加另一个帐户到他们的电子邮件客户端,以开始从新的服务器拉邮件? 如果configuration正确,他们仍然可以访问他们的旧邮件(甚至可以将它移动到新的服务器,如果这两个帐户使用IMAP)。
另外,为什么不愿同步IMAP帐户? 你正在切换到不同的IMAP服务器? 当我过去移动邮件时,我使用rsync将邮件复制到新服务器。 在一个rsync之后,停止旧服务器上的IMAP / SMTP,执行另一个rsync来获取第一个rsync期间所做的更改,然后在新服务器上启动IMAP / SMTP。
更改configuration文件,使邮件被定向到新的服务器,而不是旧的。 提前通知用户,并在半夜进行。 如果你控制你的DNS,你可以提前一个星期降低你的主机logging的TTL,所以当你真正做出改变时,DNS更新会迅速传播。