繁体   English   中英

通过sendmail服务器发送邮件时出现sasl_decode错误

[英]Hit sasl_decode error while sending mail through sendmail server

在RHEL工作站6.3上安装了sendmail和openwebmail之后,我可以通过webmail(cgi-bin / openwebmail / openwebmail.pl)发送电子邮件,但无法在Perl脚本中与sendmail服务器进行交互,如下所示:

use Net::SMTP;

my $smtpserver = 'mail.server.com';
my $smtpport = 25;
my $smtpuser   = 'test';
my $smtppassword = 'test';
my $smtp = Net::SMTP->new($smtpserver, Port=>$smtpport, Timeout => 10, Debug => 1);
die "Could not connect to server!\n" unless $smtp;
$smtp->auth($smtpuser, $smtppassword);
$smtp->mail("Ann");
$smtp->to("hello\@world.com");
$smtp->data();
$smtp->datasend("To: hello\@world.com\n");
$smtp->quit;

在Windows 7上运行此Perl脚本时,输出如下:

Net::SMTP>>> Net::SMTP(2.31)
Net::SMTP>>>   Net::Cmd(2.29)
Net::SMTP>>>     Exporter(5.64_01)
Net::SMTP>>>   IO::Socket::INET(1.31)
Net::SMTP>>>     IO::Socket(1.31)
Net::SMTP>>>       IO::Handle(1.28)
Net::SMTP=GLOB(0x2be1e80)<<< 220 mail.server.com ESMTP Sendmail 8.14.4/8.14.4
; Fri, 11 Apr 2014 19:48:30 +0800
Net::SMTP=GLOB(0x2be1e80)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x2be1e80)<<< 250-mail.server.com Hello [9.110.10.236], please
d to meet you
Net::SMTP=GLOB(0x2be1e80)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x2be1e80)<<< 250-PIPELINING
Net::SMTP=GLOB(0x2be1e80)<<< 250-8BITMIME
Net::SMTP=GLOB(0x2be1e80)<<< 250-SIZE
Net::SMTP=GLOB(0x2be1e80)<<< 250-DSN
Net::SMTP=GLOB(0x2be1e80)<<< 250-ETRN
Net::SMTP=GLOB(0x2be1e80)<<< 250-AUTH DIGEST-MD5 PLAIN
Net::SMTP=GLOB(0x2be1e80)<<< 250-DELIVERBY
Net::SMTP=GLOB(0x2be1e80)<<< 250 HELP
Net::SMTP=GLOB(0x2be1e80)>>> AUTH DIGEST-MD5
Net::SMTP=GLOB(0x2be1e80)<<< 334 bm9u...
3VnV5VXB6MlBJeHY5TVE9IixyZWFsbT0iaHV...
Net::SMTP=GLOB(0x2be1e80)>>> YXV0a...
Net::SMTP=GLOB(0x2be1e80)<<< 334 cnNwYXV0axODVhOA==
Net::SMTP=GLOB(0x2be1e80)>>>
Net::SMTP=GLOB(0x2be1e80)<<< 235 2.0.0 OK Authenticated
Net::SMTP=GLOB(0x2be1e80)>>> MAIL FROM:<hello>
Net::SMTP: Unexpected EOF on command channel at E:\tool\smtp.pl line 35

它表明客户端已通过身份验证,但在调用“ $ smtp-> mail()”后未收到任何数据,这似乎服务器已关闭连接。

在服务器端,有一些错误消息写入/ var / log / maillog:

Apr 11 19:48:30 bill sendmail[16761]: AUTH=server, relay=[9.110.10.6], authid=test, mech=DIGEST-MD5, bits=128
Apr 11 19:48:30 bill sendmail[16761]: AUTH: sasl_decode error=-1
Apr 11 19:48:30 bill sendmail[16761]: s3BBmUQj016761: [9.110.10.236] did not issue MAIL/EXPN/VRFY/ETRN    during connection to MTA

maillog显示认证方法为DIGEST-MD5,但无法调用sasl_decode。

任何人都可以为这个问题提供任何线索吗? 非常感谢。

PS:我的sendmail.mc粘贴在github上

在这里,我猜测旧版本存在错误。 请检查此CPAN RT

https://rt.cpan.org/Public/Bug/Display.html?id=58002

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM