Skip Menu |

This queue is for tickets about the MIME-Lite CPAN distribution.

Report information
The Basics
Id: 43104
Status: open
Priority: 0/
Queue: MIME-Lite

People
Owner: Nobody in particular
Requestors: paul [...] rubin.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.024
Fixed in: (no value)



Subject: End data with <CR><LF>.<CR><LF> Messages
We are using MIME-Lite to send around 500 messages to 1000 subscribers every day via postfix using sending via smtp. This is a redhat enterprise server: 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 athlon i386 GNU/Linux Perl is: This is perl, v5.8.8 built for i686-linux postfix: mail_version = 2.2.10 The messages and the people to send to come from a database. We have a program that merges up the subscribers and the messages and creates a single message for each. The program can easily repeat any combination of message or subscriber from it's command line. I am sending using smtp: MIME::Lite->send('smtp', 'localhost', Timeout=>10, SkipBad => 1); I start a message like this: my $msg = MIME::Lite->new( 'To' => $customerEmail, 'From' => 'yyyyyyyy@yyyyyyyyy.com', 'Subject' => $subject, 'Return-Path' => 'bounce@yyyyyyy.com', 'Reply-To' => $return, 'Type' => 'multipart/related', 'Sender' => 'bounce@yyyyyyyy.com', 'Comments' => "Cust: $customer->{'id'} Msg: $entry-> {'id'}", ); To keep the send from aborting the program I run it in an eval: eval { $msg->send(); }; if ($@) { print STDERR "Error: Broadcast_log $entry->{'id'} customer $customer->{'id'}:$customer->{'email'} \n"; print STDERR "Email: $customerEmail\n"; print STDERR "Subject: $subject\n"; print STDERR "$@\n"; } Out of several hundred recipients on any run, I get a few message that look like: Error: Broadcast_log 268915 customer 45:xxx@xxxxxxxxx.com Email: xxx xxxxxx <xxx@xxxxxxxxx.com> Subject: [yyy-yyyyyy] WTS: 40K1028 IBM HDD Net::CMD (Net::SMTP) DATAEND command failed. Last server message was:End data with <CR><LF>.<CR><LF> This probably represents a problem with newline encoding at /var/lib/Broadcaster/broadcastCron.pl line 108 If I re-run this combination of message and subscriber again I get no error at all. I have tried to match up the exact maillog entries against these errors but it is made tougher by the fact that at any give minute there can be as many a 7 copies of this program running at one time sending different messages to the same person. Initially I am wondering if you can help me gather some better diagnostics about what is actually failing. Thanks.
On 2009-02-07 07:49:31, prubin wrote: Show quoted text
> We are using MIME-Lite to send around 500 messages to 1000 subscribers > every day via postfix using sending via smtp. >
(...) Show quoted text
> Out of several hundred recipients on any run, I get a few message that > look like: > Error: Broadcast_log 268915 customer 45:xxx@xxxxxxxxx.com > Email: xxx xxxxxx <xxx@xxxxxxxxx.com> > Subject: [yyy-yyyyyy] WTS: 40K1028 IBM HDD > Net::CMD (Net::SMTP) DATAEND command failed. > Last server message was:End data with <CR><LF>.<CR><LF> > This probably represents a problem with newline encoding > at /var/lib/Broadcaster/broadcastCron.pl line 108 > > If I re-run this combination of message and subscriber again I get no > error at all. >
I belive this *may* be caused by bug in Net::SMTP/Net::Cmd: https://rt.cpan.org/Ticket/Display.html?id=115025 If you still run into this issue you could use strace to confirm if there were any signals coming in when sending failed.