LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2008, 06:18 AM   #1
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Rep: Reputation: 0
Cannot download any email attachments; imap


Hi all,

the situation:
I can not download any email attachments from our company imap server. It doesn't matter which email client I use. Email reception and sending (without attachments) works just fine.

Using exactly the same email configurations in windows/thunderbird works just fine, hence all these funky advanced options in thunderbird are not an issue here.

It seems that my Ubuntu (hardy) system is somehow blocking the download of those attachments.

The firewall seems to be off, or rather permitting everything:

Code:
iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Are there any other scripts/files etc which I could check that might be causing this problem?
Any help is greatly appreciated.
 
Old 05-19-2008, 06:47 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
what is the error message?
 
Old 05-19-2008, 07:18 AM   #3
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
no error message, just hanging

Quote:
Originally Posted by Nathanael View Post
what is the error message?
In fact there is no error message. Thunderbird just tells me it is loading the message and then it never stops loading.....

I did a log of thunderbird. This is the section where I started dowloading a pdf attachment:

Code:
1129732432[1787e90]: 1786d60:mail2:S-INBOX:ProcessSelectedStateURL: current folder read only
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL: Loading Part, using cached shell.
1129732432[1787e90]: 1786d60:mail2:S-INBOX:STREAM:OPEN Size: 146861: Begin Message Download Stream
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-MessageRFC822: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-MessageHeaders: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Part-Prefetched: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Multipart: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Boundary: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Leaf: 1
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-XHeader: 1
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-MIMEHeader: 1
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Filling: 1
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Boundary: 0
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Leaf: 2
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-MIMEHeader: 2
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SHELL:GENERATE-Part-Inline: 2
1129732432[1787e90]: 1786d60:mail2:S-INBOX:SendData: 20 UID fetch 1271 (BODY.PEEK[2])

1129732432[1787e90]: ReadNextLine [stream=17acad0 nb=39 needmore=0]
1129732432[1787e90]: 1786d60:mail2:S-INBOX:CreateNewLineFromSocket: * 32 FETCH (UID 1271 BODY[2] {144296}

1129732432[1787e90]: ReadNextLine [stream=17acad0 nb=78 needmore=0]
1129732432[1787e90]: 1786d60:mail2:S-INBOX:CreateNewLineFromSocket: JVBERi0xLjQNJeLjz9MNCjQ3IDAgb2JqIDw8L0xpbmVhcml6ZWQgMS9MIDEwNTQ0Ni9PIDQ5L0Ug
The last line is then repeating forever and ever (with different contents though).
 
Old 05-19-2008, 07:21 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
exactly the same line?
not even the JVBERi0xLjQNJeLjz9MNCjQ3IDAgb2JqIDw8L0xpbmVhcml6ZWQgMS9MIDEwNTQ0Ni9PIDQ5L0Ug part changing?
 
Old 05-19-2008, 08:22 AM   #5
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
the line IS changing...

Quote:
Originally Posted by Nathanael View Post
exactly the same line?
not even the JVBERi0xLjQNJeLjz9MNCjQ3IDAgb2JqIDw8L0xpbmVhcml6ZWQgMS9MIDEwNTQ0Ni9PIDQ5L0Ug part changing?
sorry, I was not precise. The line IS changing, i.e. there are different characters and numbers.
But it goes on forever. Also, the file on the disk (the attachment I try to download) does not increase in size, it rests at 0k all the time.

I believe that there is some funny firewall related stuff which is preventing the download.
 
Old 05-19-2008, 08:27 AM   #6
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
the line looks like a base64 encoded something, hence i asked, and you should be able to find those lines in the mail source.

i am guessing the mail client needs to download the base64 encoded string, and decoded it once it has the entire string.
so - depending on the size of the attachment, that could take a bit (also depending on your internet connection)

what you could do would be sending yourself a mail with a very small attachment, and try downloading that.

another thing to check is write permission and quote usage on the disk (though i am doubting that will be the cause of the issue).

i believe as long as you see those debug messages ("CreateNewLineFromSocket") thunderbird is fetching the attachment and _not_ failing.

how long have you let it run for?
 
Old 05-19-2008, 08:44 AM   #7
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Nathanael View Post
the line looks like a base64 encoded something, hence i asked, and you should be able to find those lines in the mail source.

i am guessing the mail client needs to download the base64 encoded string, and decoded it once it has the entire string.
so - depending on the size of the attachment, that could take a bit (also depending on your internet connection)

what you could do would be sending yourself a mail with a very small attachment, and try downloading that.

another thing to check is write permission and quote usage on the disk (though i am doubting that will be the cause of the issue).

i believe as long as you see those debug messages ("CreateNewLineFromSocket") thunderbird is fetching the attachment and _not_ failing.

how long have you let it run for?
I did now send a very small pdf attachment (3.3k) to myself and I was able to download it in almost no time.

Moreover, I tried to (or rather am still trying) download a 390k pdf attachment....without any success. File size stays the same on disk and thunderbird keeps telling me: "Downloading message..." since 10min.

It is not a problem of internet connection speed because with the windows machine (in the same LAN) I am downloading such attachments in no time.

Concerning base64: I am on an ASUS AMD Turion64...but that shouldn't pose too much of a problem I think.

Thanks for your responses!!
 
Old 05-19-2008, 08:49 AM   #8
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
base64 has nothing to do with a 64bit processor :-)
http://en.wikipedia.org/wiki/Base64

what you could try, would be storing the entire message on your computer (the *.eml file, not just the attachment), then open the .eml file and save the attachment from there, as like i said, attachments are stored in the raw mail message.
 
Old 05-19-2008, 09:04 AM   #9
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Nathanael View Post
base64 has nothing to do with a 64bit processor :-)
http://en.wikipedia.org/wiki/Base64

what you could try, would be storing the entire message on your computer (the *.eml file, not just the attachment), then open the .eml file and save the attachment from there, as like i said, attachments are stored in the raw mail message.
Going to Thunderbird/View/Message source shows me instantly the whole message, i.e. the text as well as the pdf attachment in line which looks like this:
Code:
JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PC9UeXBlL1BhZ2VzL0NvdW50IDE3L0tpZHNbNCAwIFIg
MTQgMCBSIDMwIDAgUiAzOCAwIFIgNDcgMCBSIDU1IDAgUiA2MyAwIFIgNzEgMCBSIDc5IDAgUiA4
NyAwIFIgOTUgMCBSIDEwMyAwIFIgMTExIDAgUiAxMTkgMCBSIDEyNyAwIFIgMTM1IDAgUiAxNDMg
MCBSXT4+CmVuZG9iagoyIDAgb2JqCjw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAxIDAgUj4+CmVuZG9i
agozIDAgb2JqCjw8L1RpdGxlIChNaWNyb3NvZnQgV29yZCAtIFNPLU1OLUFSRy1HUy0wMDAyX0wy
T1MtTWludXRlcy1BbGdvVmFsMTBfdjEuMV8wODA1MTYuZG9jKS9DcmVhdG9yIChXaW4yUERGIDMu
MzAgaHR0cDovL3d3dy53aW4ycGRmLmNvbSkvQXV0aG9yIChQYXVsKS9DcmVhdGlvbkRhdGUgKEQ6
MjAwODA1MTYxNDMwMjAtMjMnMDAnKS9Qcm9kdWNlciAoUERGbGliIDMuMDMgXChXaW4zMlwpKT4+
CmVuZG9iago0IDAgb2JqCjw8L1R5cGUvUGFnZS9QYXJlbnQgMSAwIFIvUmVzb3VyY2VzIDEzIDAg
Ui9NZWRpYUJveFswIDAgNTk1LjI3IDg0MS44OF0vQ29udGVudHNbNSAwIFIgOSAwIFJdPj4KZW5k
b2JqCjUgMCBvYmoKPDwvTGVuZ3RoIDU1L0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp42ivk
MlQwAEJDILQwMVRIzuUy0DMwMzAwAAvrInOAcoVw5eZmZgqmlpYgQROwkAlMDQCODw+4ZW5kc3Ry
ZWFtCmVuZG9iago5IDAgb2JqCjw8L0xlbmd0aCAyNjM1L0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0
cmVhbQp42q1b21IbuRZ991fokTmVGN0veSOEMORwC6aSqlN58UADnnHspDGZynz92bp0u7e6HeTB
oRLMYu2LpKWtrbbzfSSlJBS+uHTh+83X0f4JJe+Wo4/w9R2+uAIKk9wQzQgzlNTV6GH0+T9kMXp7
Pdp/D7ZUWnJ9N4rfT0d75LfrP0dH1+AAXI45hT/
...and so on.
Hence, there is a problem decoding the base64 encoded message on my 64bit machine ;-)
Which is somehow strange because the smaller attachments are decoded just fine.

I also realized that the message source for the smaller attachment terminates with:
Code:
.......andsomenumber
while for the larger attachment mail it doesn't have any proper ending.

This is all very strange.
 
Old 05-22-2008, 08:58 AM   #10
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
I do now believe that this is all related to my network NIS/NFS settings. Unfortunately though, I don't really know where to start checking which things could be causing my attachment troubles.

Any hints on what and how to check NIS/NFS settings are very welcome ;-)
 
Old 06-13-2008, 06:03 AM   #11
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Well, I have completely run out of ideas of how to resolve that problem. Ubuntu is really wasting my time...
 
Old 06-13-2008, 09:45 AM   #12
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
if you give up on a distro that easily + if you make ubuntu responsible for a mail client issue you are having, then sorry, i dont think you are ready for linux!
 
Old 06-13-2008, 10:27 AM   #13
nogismo
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hmm, yes but it's not a mail client issue. I tried kmail, mutt, claws-mail, thunderbird, the webmail interface... always the same problem.

If I connect to one of our network servers and launch a mail client (no matter which one), voila it works. Thus I suspect there is something inherent in my Ubuntu installation which is preventing my attachment downloads.

And yes, maybe I am not ready for Linux...which is kind of a shame because I've been using it since a few years now and didn't stumble upon such a persistent problem so far.

Anyway, thank's for your reply's to my post!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple email attachments ehedman Linux - Software 1 06-20-2007 07:13 PM
Saving Email Attachments kdmcdrm Linux - Software 6 07-19-2006 10:13 AM
postfix IMAP server attachments lmcilwain Linux - Software 0 11-16-2005 07:21 PM
email attachments rhb327 Linux - Software 2 11-13-2004 10:08 AM
imap script needed: download attachments Samsara Linux - Software 1 10-23-2004 05:27 PM


All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration