我有一些我没有编写的脚本...它们搜索 Squid 日志数据库,然后创建一个电子表格并通过电子邮件发送,然后删除它创建的 .pid 和 .xls 文件。
这些脚本使用 NTLM 作为其变量之一(request_user)...我将其更改为手动输入的文本字段。
我不知道 perl 并且脚本无法工作。
.pid 和 .xls 正在创建,但没有通过电子邮件发送任何内容,文件也不会被删除(取消链接)。
这是请求和生成文件的链接
http://www.the-greenes.net/spreadsheet_request-test.txt
http://www.the-greenes.net/spreadsheet_gen.txt
任何人都可以帮助一个 Perl 技能非常有限的人吗?
谢谢
I have some scripts that I didn't write... they search a Squid log database and then create a spreadsheet and email it and then delete the .pid and .xls files it created.
The scripts were using NTLM for one of it's variables (request_user)... I changed it to a manually entered text field.
I don't know perl and the scripts are not working.
The .pid and .xls are getting created but nothing gets emailed and the files don't get deleted (unlink)
Here is are the links to the request and generate files
http://www.the-greenes.net/spreadsheet_request-test.txt
http://www.the-greenes.net/spreadsheet_gen.txt
Can anyone help a limited guy with very limited perl skills?
Thanks
发布评论
评论(1)
在
spreadsheet_gen
脚本中,您可以使用以下行来设置 smtp 服务器的地址:使用反引号使其运行名为
10.0.1.98
的命令并将其输出分配给$mail_server< /代码> 变量。这很可能是错误的,尝试用常规撇号替换反引号来创建字符串:
您能在
error.log
中看到任何错误吗?如果 $message->send ... 失败,它会因错误消息而终止,并且不会发送任何内容或取消链接。In the
spreadsheet_gen
script you have this line to setup address to smtp server:Using backticks make it run command named
10.0.1.98
and assign its output into$mail_server
variable. This is most likely wrong, try to replace backticks with regular apostrophes to create string:Can you see any error in your
error.log
? If$message->send ...
fails, it dies with error message and nothing gets sent nor unlinked.