簡體   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