ColdFusion 邮件队列停止处理 [英] ColdFusion mail queue stops processing

查看:28
本文介绍了ColdFusion 邮件队列停止处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的 CF 服务器偶尔会停止处理邮件.这是有问题的,因为我们的许多客户都依赖它.

Our CF server occasionally stops processing mail. This is problematic, as many of our clients depend on it.

我们在网上找到了一些建议,其中提到了无法投递文件夹中的零字节文件,因此我创建了一个任务,每三分钟删除一次.然而,停止又发生了.

We found suggestions online that mention zero-byte files in the undeliverable folder, so I created a task that removes them every three minutes. However, the stoppage has occurred again.

我正在寻找诊断和解决此问题的建议.

I am looking for suggestions for diagnosing and fixing this issue.

  • CF 8 标准
  • Win2k3

添加:

  • 队列失败时邮件日志中没有错误
  • 由于我们发送大量邮件,我们没有尝试在不使用队列的情况下运行它

添加 2:

  • spool 文件夹中的任何文件似乎都没有问题.当我们重新启动邮件队列时,它们似乎都可以正确处理.

添加 3:

  • 我们没有使用附件.

推荐答案

我们最终做了什么:

我写了两个计划任务.第一个检查队列文件夹中是否有任何消息早于 n 分钟(当前设置为 30).第二个在使用率低时每晚重置队列.

I wrote two scheduled tasks. The first checked to see if there were any messages in the queue folder older than n minues (currently set to 30). The second reset the queue every night during low usage.

不幸的是,我们从未真正发现为什么队列会脱轨,但似乎只有在我们使用 Exchange 时才会发生——我们尝试过的其他邮件服务器没有这个问题.

Unfortunately, we never really discovered why the queue would come off the rails, but it only seems to happen when we use Exchange -- other mail servers we've tried do not have this issue.

我被要求发布我的代码,所以这是找到旧邮件时重新启动的代码:

I was asked to post my code, so here's the one to restart when old mail is found:

<cfdirectory action="list" directory="c:coldfusion8mailspool" name="spool" sort="datelastmodified">
<cfset restart = 0>
<cfif datediff('n', spool.datelastmodified, now()) gt 30>
    <cfset restart = 1>
</cfif>
<cfif restart>
    <cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
    <cfset MailSpoolService = sFactory.mailSpoolService>
    <cfset MailSpoolService.stop()>
    <cfset MailSpoolService.start()>
</cfif>

这篇关于ColdFusion 邮件队列停止处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆