From: Alain C. <Ala...@th...> - 2007-02-12 21:33:02
|
Hi. I'm quite a newbie with Fetchmail, and I've read the FAQs before writing to this list. This is my problem : I need to fetch mails from an IMAP account and direct them to the local SMTP port. Fetchmail seems the perfect tool for that. However, the mails I fetch from the IMAP account are mainly composed with an attached file. When using fetchmail, the downloaded mail contains only some text (an hypertext link to the file). When using a mail reader (Outlook or Thunderbird), the mail seems to be complete (ie the file is downloaded). To understand what happened, I ran telnet, and these are some transcriptions for the IMAP dialog : ----------------------------------------------------------------------- Talk-It:~ # telnet 192.168.1.2 143 Trying 192.168.1.2... Connected to 192.168.1.2. Escape character is '^]'. * OK Talk_It IMAP4rev1 v10.210 server ready * BAD Null command login 100 100 login BAD Command unrecognized/login please: 100 LOGIN 100 100 LOGIN BAD Command unrecognized/login please: 100 0001 LOGIN 100 100 0001 OK LOGIN completed 0002 list 0002 BAD Missing required argument to LIST 0002 list "*" "*" * LIST (\NoInferiors) NIL INBOX 0002 OK LIST completed 0003 select INBOX * NO Mailbox is open by another process, access is readonly * 15 EXISTS * OK [UIDVALIDITY 1038355870] UID validity status * OK [UIDNEXT 21] Predicted next UID * FLAGS (\Answered \Flagged \Deleted \Draft \Seen) * OK [PERMANENTFLAGS ()] Permanent flags * 0 RECENT 0003 OK [READ-ONLY] SELECT completed 0004 fetch 1 body[text] * 1 FETCH (BODY[TEXT] {684} This is a multi-part message in MIME format. --Part.0001_32C9D122_000AF8A4.00E0BB00C727 Content-Type: message/external-body; access-type=local-file; name="/htfs0/data/0/5/7/5/8/10517515.113"; size=6472; xtype="audio/wav" Content-Type: audio/wav Content-ID: <0001_32C9D122_000AF8A4.00E0BB00C727> Content-Transfer-Encoding: binary --Part.0001_32C9D122_000AF8A4.00E0BB00C727 Content-Type: application/octet-stream; name="message.url" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="message.url" [InternetShortcut] URL=http://192.168.1.2:8889/htfs0/data/0/5/7/5/8/10517515.113.wav --Part.0001_32C9D122_000AF8A4.00E0BB00C727-- ) 0004 OK FETCH completed ------------------------------------------------------------------------- The fetch body[text] command seems to be the one used by fetchmail and doesn't download the file. Continuing with another fetch command : ----------------------------------------------------------------------------- 0005 fetch BODY[] 0005 BAD Missing required argument to FETCH 0005 fetch 1 BODY[] * 1 FETCH (BODY[] {9885} Received: via tmail-4.1(5) for uid202; Wed, 1 Jan 1997 03:51:15 +0100 (MET) From: <anonymous> To: "Talk-It" <100@192.168.1.2> Date: Wed, 1 Jan 1997 03:51:14 +0100 (MET) Subject: Call Answering Message from Ligne_1/820222180 MIME-Version: 1.0 (Voice 2.0) Content-Type: multipart/voice-message; boundary="Part.0001_32C9D122_000AF8A4.00E0BB00C727" Content-Transfer-Encoding: 7bit Message-ID: <0001_32C9D122_000AF8A4.00E0BB00C727> This is a multi-part message in MIME format. --Part.0001_32C9D122_000AF8A4.00E0BB00C727 Content-Type: audio/wav; name="10517515x113.wav" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="10517515x113.wav" UklGRjQZAABXQVZFZm10IBQAAAARAAEAQB8AANcPAAAAAQQAAgD5AWZhY3QEAAAAUTEAAGRh dGEAGQAAuQEnAMuaMSWRzIoxJZG8m1EkkcyKMCWB25owNJHbmzE1gcyaMDWBvJwwNILrqjBE gdqbMDSC26swJpLLqzE1gtqrIDWC25wgNAHqmhA0Acq7ODaByqs4NQLqqyBEgsm7IEQCyqwg U4LKqyg1EturIEQCypwoQwLaqjlEAcqrKEUBuqwoNAPqmyhEAbqdGDSC2ps4NQHanCAzg+uq (...) MNCAgAQIwIAAAAAECAwIQIAAwIAABAjAgECAAMCAAAQIwIAABAjAgAAECAwIQIAM7P8BADAR DAhAgAAMCAQIwIBACwkAQIDAgECAAAwIQMAACAAEDAMNCEjAAJM80ICABAjAgAAECMCAAAQI DAhAgAAMCAQIwIAABAjAgAAECAwIQIDAgABAgADAgECAAAwIQIDAgECAAAwIBAjAgECAAAwI QIAADAhAgAAMCECAAAwIBAgMCAQIwIBAgAAMCECAAAwIQIAADAhAgAAMCECAAAwIQIDAgECA wIBAgAAMCECAAAwIQIAADAhAgAAMCAAECAAAwIAABAgADEiAAMCAQDvAgAATAZsJEwGbCRMB mwkAEwGwmQATsZkAEwGwmTARAJsJMBEAmwkwEQCwmQATAXJmY3QEAAAAAQAAAA== --Part.0001_32C9D122_000AF8A4.00E0BB00C727 Content-Type: application/octet-stream; name="message.url" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="message.url" [InternetShortcut] URL=http://192.168.1.2:8889/htfs0/data/0/5/7/5/8/10517515.113.wav --Part.0001_32C9D122_000AF8A4.00E0BB00C727-- ) 0005 OK FETCH completed -------------------------------------------------------------------- The "fetch body[]" command works for what I have to do. Well, at this time, I don't really what or who is wrong in my case. Does that mean that the IMAP server is not clean regarding protocol ? Could someone help me to solve my problem. Regards. Alain CHOFARDET |