提问者:小点点

Apache James-减少假脱机中的消息时间


我正在使用本地Apache James 2.3.2安装进行开发和自动化测试。它被配置为将所有传入消息转发到单个地址,并且不将电子邮件中继到外部:

     <mailet match="All" class="Forward">
        <forwardto>test@localhost</forwardto>
     </mailet>

一切正常:电子邮件被接受,放置在spool目录中,然后最终移动到收件箱/测试目录,然后由我的自动化测试从中提取以进行验证。

唯一的问题是,这些电子邮件可能需要10到60秒才能从spool目录移动到inbox/test目录,这意味着测试需要等待很长时间才能检索它们并进行检查。

这是可以以其他方式配置的吗?或者我应该简单地移动到不同的电子邮件服务器以进行测试?

谢谢!


共1个答案

匿名用户

不是这个问题的直接答案,但我最终切换到JEShttp://www.ericdaugherty.com/java/mailserver/。您可以配置有多少SMTP和POP3线程完成这项工作,以及这些线程从假脱机中获取消息并尝试发送传递消息的频率

# The server stores incoming SMTP messages on disk before attempting to deliver them.  This
# setting determines how often (in seconds) the server checks the disk for new messages to deliver.  The
# smaller the number, the faster message will be processed.  However, a smaller number will cause
# the server to use more of your system's resources.
smtpdelivery.interval=5

这符合我的需求。