fetchmail-friends
[Top] [All Lists]

[fetchmail] POP3 message add an extra LF at the end of message

2003-11-21 02:49:10
Hello,

I use fetchmail to process CSV attachment file with procmail & ripmime.
And i find out a problem (perhaps a bug) :
The CSV file into the mail file (thus before being extracted by ripmime)  get an extra LF (\n) at the end of the attachment file
I checked that it is not a mail server problem with a mail client. (no extra LF inside  the attachment file).
I'm on a HPUX platform 11.00 and tried the latest version of fetchmail (6.2.5) in respect with your FAQ recommandations

This extra LF character is a problem as the extracted file is processed afterwards by an automat written in java that can't handle this extra character ( It's not a custom code)
I found a workaround with the following code in my rc.mime rule for procmail :
#!/bin/sh
mkdir /tmp/$$
ripmime -i - --no-nameless -d /tmp/$$
for x in /tmp/$$/*; do
  cat $x | perl -0777 -pe 's/\n\n$/\n/' > $x.tmp
  mv $x.tmp $x
done
mv /tmp/$$/* /pkg/OAI/dbs/data/mimeDir
Is there someone to decipher what is happening ?  I have attached to this mail a sample mailpack file and the original CSV file (very small indeed)
Regards,

-- 
------------------------------------------
  Olivier Merlin
  MIS Technical Architect
  Gemplus Pic de Bertagne 13881 Gemenos
  Phone : 04 42 36 59 87
  ------------------------------------------

Attachment: fetchmail_2111.zip
Description: Zip compressed data

<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail] POP3 message add an extra LF at the end of message, omerlin <=