使用 procmail 下载 xls 文件时遇到问题
知道为什么我的 xls 附件文件没有被下载吗?谢谢 这是一个为我创建 procmailrc 文件的 perl 包装器。
my $procmailrc =<<EOL;
MAILDIR=$workDir
VERBOSE=on
LOGFILE=$workDir/procmail.log
:0 B
* ^Content-Type.*application.*name=.*\.(xls|rtf)
{
MAILDIR
}
:0
mail/
EOL
Any ideas why my xls attachment files aren't being downloaded? thanks This is a perl wrapper creating the procmailrc file for me.
my $procmailrc =<<EOL;
MAILDIR=$workDir
VERBOSE=on
LOGFILE=$workDir/procmail.log
:0 B
* ^Content-Type.*application.*name=.*\.(xls|rtf)
{
MAILDIR
}
:0
mail/
EOL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
生成的配方在语法上是正确的,但在语义上是假的;这几乎肯定不是您想要的。大括号之间的
MAILDIR
相当于MAILDIR=''
,即您将MAILDIR
变量的值设置为空。这会导致匹配的消息被传递到与其他消息不同的目录,很可能是您需要从日志文件中挖掘出的位置,以便可以恢复放错位置的消息。也许您对最终尝试传递这些消息的目录没有写入权限,这很可能会导致调用进程将它们退回给发件人。不管怎样,既然你有一个日志文件,如果你仍然无法弄清楚这一点,请发布一个相关的片段(三到四行应该是我们所需要的)。
The generated recipe is syntactically correct, but semantically bogus; this is almost certainly not what you want. The
MAILDIR
between the braces is equivalent toMAILDIR=''
i.e. you are setting theMAILDIR
variable's value to nothing. This causes the matching messages to be delivered to a different directory than your other messages, most likely a place you need to dig out from the log files so you can restore the misplaced messages. Perhaps you do not have write access to the directory where you end up trying to deliver those messages, which will most likely cause the calling process to bounce them back to the sender.Anyway, since you have a log file, please post a pertinent snippet (three-four lines should be all we need) if you still cannot figure this out.