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 |
From: Rob M. <rob...@gm...> - 2007-02-13 08:21:30
|
On 2/12/07, Alain Chofardet <Ala...@th...> wrote: > > Hi. > > I'm quite a newbie with Fetchmail, and I've read the FAQs before writing to > this list. But apparently not the one that tells you what to report :) > 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. So, how about at least some of the details the FAQ asks for: 1) Version of fetchmail 2) Contents of .fetchmailrc 3) Output of "fetchmail -v -v --nosyslog" (and any other command line arguments you usually use) 4) The OS you're using > The fetch body[text] command seems to be the one used by fetchmail and > doesn't download the file. Correction - results in the IMAP server providing the original email > The "fetch body[]" command works for what I have to do. And in that case the IMAP server seems to be providing the remote part of the message for you (the "missing" body part in the first email is external, so there's nothing for fetchmail to download). I'd say the IMAP server is behaving strangely, but I'm not sure what the expected behavior for external body parts is. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |
From: Alain C. <Ala...@th...> - 2007-02-13 12:03:27
|
Hi. fet...@li... wrote on 13/02/2007 08:20:01: > On 2/12/07, Alain Chofardet <Ala...@th...> wrote: > > > > Hi. > > > > I'm quite a newbie with Fetchmail, and I've read the FAQs before writing to > > this list. > > But apparently not the one that tells you what to report :) > Sorry for that. > > 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. > > So, how about at least some of the details the FAQ asks for: > > 1) Version of fetchmail The one I currently use is 6.3.2. But I've also tried 6.3.6. Exactly same behavior. > > 2) Contents of .fetchmailrc > Quite simple : poll 192.168.1.2 protocol IMAP: user 100 with password 100 options norewrite My first attempt had no option at all. I've also tried options around MIME, but with no success. > 3) Output of "fetchmail -v -v --nosyslog" (and any other command line OK. This is fetchmail -v -v -nosyslog fetchmail: 6.3.2 interroge 192.168.1.2 (protocole IMAP) à mar 13 fév 2007 11:57:00 CET : récupération en cours fetchmail: IMAP< * OK Talk_It IMAP4rev1 v10.210 server ready fetchmail: IMAP> A0001 CAPABILITY fetchmail: IMAP< * CAPABILITY IMAP4 IMAP4REV1 NAMESPACE SCAN SORT X-NBX THREAD=ORDEREDSUBJECT fetchmail: IMAP< A0001 OK CAPABILITY completed fetchmail: Protocole identifié comme étant IMAP4 rev fetchmail: IMAP> A0002 LOGIN * "100" fetchmail: IMAP< A0002 OK LOGIN completed fetchmail: sélection ou re-réception du dossier par défaut fetchmail: IMAP> A0003 SELECT "INBOX" fetchmail: IMAP< * 20 EXISTS fetchmail: IMAP< * OK [UIDVALIDITY 1038355870] UID validity status fetchmail: IMAP< * OK [UIDNEXT 26] Predicted next UID fetchmail: IMAP< * FLAGS (\Answered \Flagged \Deleted \Draft \Seen) fetchmail: IMAP< * OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags fetchmail: IMAP< * OK [UNSEEN 17] 17 is first unseen message in /htfs0/var/mail/uid202 fetchmail: IMAP< * 4 RECENT fetchmail: IMAP< A0003 OK [READ-WRITE] SELECT completed fetchmail: 20 messages en attente après le premier poll fetchmail: IMAP> A0004 EXPUNGE fetchmail: IMAP< A0004 OK Mailbox checkpointed, but no messages deleted fetchmail: 20 messages en attente après la purge fetchmail: IMAP> A0005 SEARCH UNSEEN NOT DELETED fetchmail: IMAP< * SEARCH 17 18 19 20 fetchmail: 17 n'est pas vu fetchmail: 18 n'est pas vu fetchmail: 19 n'est pas vu fetchmail: 20 n'est pas vu fetchmail: IMAP< A0005 OK SEARCH completed fetchmail: 17 est le premier a n'avoir pas été vu 20 messages (16 déjà vus) pour 100 dans 192.168.1.2. message 100@192.168.1.2:1 ignoré non éliminé message 100@192.168.1.2:2 ignoré non éliminé message 100@192.168.1.2:3 ignoré non éliminé message 100@192.168.1.2:4 ignoré non éliminé message 100@192.168.1.2:5 ignoré non éliminé message 100@192.168.1.2:6 ignoré non éliminé message 100@192.168.1.2:7 ignoré non éliminé message 100@192.168.1.2:8 ignoré non éliminé message 100@192.168.1.2:9 ignoré non éliminé message 100@192.168.1.2:10 ignoré non éliminé message 100@192.168.1.2:11 ignoré non éliminé message 100@192.168.1.2:12 ignoré non éliminé message 100@192.168.1.2:13 ignoré non éliminé message 100@192.168.1.2:14 ignoré non éliminé message 100@192.168.1.2:15 ignoré non éliminé message 100@192.168.1.2:16 ignoré non éliminé fetchmail: IMAP> A0006 FETCH 17:20 RFC822.SIZE fetchmail: IMAP< * 17 FETCH (RFC822.SIZE 1117) fetchmail: IMAP< * 18 FETCH (RFC822.SIZE 1116) fetchmail: IMAP< * 19 FETCH (RFC822.SIZE 1116) fetchmail: IMAP< * 20 FETCH (RFC822.SIZE 1116) fetchmail: IMAP< A0006 OK FETCH completed fetchmail: IMAP> A0007 FETCH 17 RFC822.HEADER fetchmail: IMAP< * 17 FETCH (RFC822.HEADER {432} lecture du message 100@192.168.1.2:17 parmi 20 (432 octets dans l'en-tête) fetchmail: SMTP< 220 domino.talk-it.fr ESMTP Service (Lotus Domino Release 7.0.2FP1) ready at Tue, 13 Feb 2007 11:57:01 +0100 fetchmail: SMTP> EHLO Talk-It.talk-it.fr fetchmail: SMTP< 250-domino.talk-it.fr Hello Talk-It.talk-it.fr ([127.0.0.1]), pleased to meet you fetchmail: SMTP< 250-DSN fetchmail: SMTP< 250-SIZE fetchmail: SMTP< 250 PIPELINING fetchmail: réexpédition vers localhost fetchmail: SMTP> MAIL FROM:<101@192.168.1.2> SIZE=1117 fetchmail: SMTP< 250 101@192.168.1.2... Sender OK fetchmail: SMTP> RCPT TO:<notes@localhost> fetchmail: SMTP< 250 notes@localhost... Recipient OK fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter message, end with "." on a line by itself fetchmail: IMAP< ) fetchmail: IMAP< A0007 OK FETCH completed fetchmail: IMAP> A0008 FETCH 17 BODY.PEEK[TEXT] fetchmail: IMAP< * 17 FETCH (BODY[TEXT] {685} (685 octets dans le corps) fetchmail: IMAP< ) fetchmail: IMAP< A0008 OK FETCH completed fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 Message accepted for delivery éliminé fetchmail: IMAP> A0009 STORE 17 +FLAGS (\Seen \Deleted) fetchmail: IMAP< * 17 FETCH (FLAGS (\Recent \Seen \Deleted)) fetchmail: IMAP< A0009 OK STORE completed fetchmail: IMAP> A0010 EXPUNGE fetchmail: IMAP< * 17 EXPUNGE fetchmail: IMAP< * 19 EXISTS fetchmail: IMAP< * 3 RECENT fetchmail: IMAP< A0010 OK Expunged 1 messages fetchmail: IMAP> A0011 FETCH 17 RFC822.HEADER fetchmail: IMAP< * 17 FETCH (RFC822.HEADER {432} lecture du message 100@192.168.1.2:18 parmi 20 (432 octets dans l'en-tête) fetchmail: réexpédition vers localhost fetchmail: SMTP> MAIL FROM:<101@192.168.1.2> SIZE=1116 fetchmail: SMTP< 250 101@192.168.1.2... Sender OK fetchmail: SMTP> RCPT TO:<notes@localhost> fetchmail: SMTP< 250 notes@localhost... Recipient OK fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter message, end with "." on a line by itself fetchmail: IMAP< ) fetchmail: IMAP< A0011 OK FETCH completed fetchmail: IMAP> A0012 FETCH 17 BODY.PEEK[TEXT] fetchmail: IMAP< * 17 FETCH (BODY[TEXT] {684} (684 octets dans le corps) fetchmail: IMAP< ) fetchmail: IMAP< A0012 OK FETCH completed fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 Message accepted for delivery éliminé fetchmail: IMAP> A0013 STORE 17 +FLAGS (\Seen \Deleted) fetchmail: IMAP< * 17 FETCH (FLAGS (\Recent \Seen \Deleted)) fetchmail: IMAP< A0013 OK STORE completed fetchmail: IMAP> A0014 EXPUNGE fetchmail: IMAP< * 17 EXPUNGE fetchmail: IMAP< * 18 EXISTS fetchmail: IMAP< * 2 RECENT fetchmail: IMAP< A0014 OK Expunged 1 messages fetchmail: IMAP> A0015 FETCH 17 RFC822.HEADER fetchmail: IMAP< * 17 FETCH (RFC822.HEADER {432} lecture du message 100@192.168.1.2:19 parmi 20 (432 octets dans l'en-tête) fetchmail: réexpédition vers localhost fetchmail: SMTP> MAIL FROM:<101@192.168.1.2> SIZE=1116 fetchmail: SMTP< 250 101@192.168.1.2... Sender OK fetchmail: SMTP> RCPT TO:<notes@localhost> fetchmail: SMTP< 250 notes@localhost... Recipient OK fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter message, end with "." on a line by itself fetchmail: IMAP< ) fetchmail: IMAP< A0015 OK FETCH completed fetchmail: IMAP> A0016 FETCH 17 BODY.PEEK[TEXT] fetchmail: IMAP< * 17 FETCH (BODY[TEXT] {684} (684 octets dans le corps) fetchmail: IMAP< ) fetchmail: IMAP< A0016 OK FETCH completed fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 Message accepted for delivery éliminé fetchmail: IMAP> A0017 STORE 17 +FLAGS (\Seen \Deleted) fetchmail: IMAP< * 17 FETCH (FLAGS (\Recent \Seen \Deleted)) fetchmail: IMAP< A0017 OK STORE completed fetchmail: IMAP> A0018 EXPUNGE fetchmail: IMAP< * 17 EXPUNGE fetchmail: IMAP< * 17 EXISTS fetchmail: IMAP< * 1 RECENT fetchmail: IMAP< A0018 OK Expunged 1 messages fetchmail: IMAP> A0019 FETCH 17 RFC822.HEADER fetchmail: IMAP< * 17 FETCH (RFC822.HEADER {432} lecture du message 100@192.168.1.2:20 parmi 20 (432 octets dans l'en-tête) fetchmail: réexpédition vers localhost fetchmail: SMTP> MAIL FROM:<101@192.168.1.2> SIZE=1116 fetchmail: SMTP< 250 101@192.168.1.2... Sender OK fetchmail: SMTP> RCPT TO:<notes@localhost> fetchmail: SMTP< 250 notes@localhost... Recipient OK fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter message, end with "." on a line by itself fetchmail: IMAP< ) fetchmail: IMAP< A0019 OK FETCH completed fetchmail: IMAP> A0020 FETCH 17 BODY.PEEK[TEXT] fetchmail: IMAP< * 17 FETCH (BODY[TEXT] {684} (684 octets dans le corps) fetchmail: IMAP< ) fetchmail: IMAP< A0020 OK FETCH completed fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 Message accepted for delivery éliminé fetchmail: IMAP> A0021 STORE 17 +FLAGS (\Seen \Deleted) fetchmail: IMAP< * 17 FETCH (FLAGS (\Recent \Seen \Deleted)) fetchmail: IMAP< A0021 OK STORE completed fetchmail: IMAP> A0022 EXPUNGE fetchmail: IMAP< * 17 EXPUNGE fetchmail: IMAP< * 16 EXISTS fetchmail: IMAP< * 0 RECENT fetchmail: IMAP< A0022 OK Expunged 1 messages fetchmail: sélection ou re-réception du dossier par défaut fetchmail: 0 message en attente après le nouveau poll fetchmail: IMAP> A0023 LOGOUT fetchmail: IMAP< * BYE Talk_It IMAP4rev1 server terminating connection fetchmail: IMAP< A0023 OK LOGOUT completed fetchmail: SMTP> QUIT fetchmail: SMTP< 221 domino.talk-it.fr SMTP Service closing transmission channel fetchmail: 6.3.2 interroge 192.168.1.2 (protocole IMAP) à mar 13 fév 2007 11:57:05 CET : interrogation finie fetchmail: ne permute pas les listes d'UIDs, aucun UID vu dans cette requête fetchmail: Effacement du fichier fetchids. fetchmail: terminaison normale, état 0 fetchmail: Effacement du fichier fetchids. > 4) The OS you're using > The OS is Suse Linux Enterprise Server 10. Regards. Alain CHOFARDET |
From: Rob M. <rob...@gm...> - 2007-02-13 18:24:41
|
On 2/13/07, Alain Chofardet <Ala...@th...> wrote: > > The one I currently use is 6.3.2. But I've also tried 6.3.6. Exactly same > behavior. Well, it looks like fetchmail is doing what it's designed to, but that the IMAP server responds differently according to how it's queried. If you need support for this non-standard system you'll probably have to convince the developers that it's necessary and then provide patches. Alternatively, try using a client that can correctly handle the external body parts. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |