On 16/09/05 at 03:24 -0400, Ove Kaaven wrote: > Package: feed2imap > Version: 0.4-4 > Severity: important > > feed2imap doesn't work on a Cyrus IMAP server, because Cyrus rejects > malformed messages. It requires proper CR/LF line endings in them, > not just LF. > > F, [2005-09-16T03:13:18.063970 #26134] FATAL -- : Exception caught while > uploading mail to WorldNews: Message contains bare newlines > /usr/lib/ruby/1.8/feed2imap/rubyimap.rb:971:in `get_tagged_response' > /usr/lib/ruby/1.8/feed2imap/rubyimap.rb:1022:in `send_command' > /usr/lib/ruby/1.8/feed2imap/rubyimap.rb:1007:in `synchronize' > /usr/lib/ruby/1.8/feed2imap/rubyimap.rb:1007:in `send_command' > /usr/lib/ruby/1.8/feed2imap/rubyimap.rb:607:in `append' > /usr/lib/ruby/1.8/feed2imap/imap.rb:98:in `putmail' > /usr/lib/ruby/1.8/feed2imap/feed2imap.rb:130:in `initialize' > /usr/lib/ruby/1.8/feed2imap/feed2imap.rb:130:in `each' > /usr/lib/ruby/1.8/feed2imap/feed2imap.rb:130:in `initialize' > /usr/lib/ruby/1.8/feed2imap/feed2imap.rb:111:in `each' > /usr/lib/ruby/1.8/feed2imap/feed2imap.rb:111:in `initialize' > /usr/bin/feed2imap:34
Hi, Thank you for the report. Can you please check that the following diff fixes the problem ? the file is /usr/lib/ruby/1.8/feed2imap/imap.rb. Index: lib/feed2imap/imap.rb =================================================================== --- lib/feed2imap/imap.rb (revision 61) +++ lib/feed2imap/imap.rb (working copy) @@ -95,7 +95,7 @@ # Put the mail in the given folder # You should check whether the folder exist first. def putmail(folder, mail) - @connection.append(folder, mail) + @connection.append(folder, mail.gsub(/\n/, "\r\n")) end # update a mail @@ -109,7 +109,7 @@ searchres.each { |m| @connection.store(m, "+FLAGS", [:Deleted]) } @connection.expunge end - @connection.append(folder, mail, flags) + @connection.append(folder, mail.gsub(/\n/, "\r\n"), flags) end # convert to string -- | Lucas Nussbaum | [EMAIL PROTECTED] http://www.lucas-nussbaum.net/ | | jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F | -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]