[SOLVED] Difficulty connecting to exchange server using email client on Ubuntu
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Difficulty connecting to exchange server using email client on Ubuntu
The issue mainly occurs on my 2009 Mac mini running Ubuntu 15.04, but it also occurs on my PC laptop running Ubuntu 14.04, so I have not specifically listed it in the Mac section. My university moved its mail server to Microsoft about 6 months ago, so it now has to be accessed through outlook.office365. Accessing my mail from my house or office is 100% reliable on a Mac running OS X using Outlook or Apple Mail clients. It is also 100% reliable on a PC in my university set up with Ubuntu 14.04 (via Thunderbird or Evolution). In the past it used to be 100% reliable at home from my PC laptop running Ubuntu 14.04 (Thunderbird or Evolution), but it hasn't been for the past month or two. When it is not successful, the mail client starts up and shows all my mail folders, but it will not refresh the mail contents, and gives me an error message indicating it cannot connect to the server. The internet is working fine in my house; I can use a browser at the same time that my mail client cannot connect to the server.
The trouble started around the time I set up the Mac mini with Ubuntu 15.04 (Thunderbird and Evolution), but it might have predated that. One difference from the laptop is that on the mini, both mail apps are running with extensions that provide access to my calendars and contacts. Also, I have tried, and eventually removed from the mini, extensions that supposedly provide better support for exchange servers when they weren't 100% reliable either; I'm talking about Exquilla (Thunderbird) and DavMail.
To make matters more complicated, I also have the Geary email client also installed on the mini, and it seems to be 100% reliable. While the solution would seem to be to use Geary only, Geary is pretty basic and doesn't allow one to create local mail folders, which I use in my workflow. One other oddity: accessing my university Outlook exchange mail account with webmail using a link I set up in Chromium is 100% reliable, whereas doing the same in Firefox is only 95% reliable.
This is driving me nuts and delaying my complete move from Mac to Linux. Any suggestions, including how to diagnose the problem, would be appreciated. Incidentally, I did report the problem to IT at my university, but they don't support Linux and couldn't help me because the problem wasn't occurring in Windows or OS X.
If I understand you correctly, email is working in Thunderbird from one location and not the other. Usually this has something to do with a firewall or proxy with Universities.
First, I would run a packet sniffer like wireshark or tcpdump to see what traffic is going where at the location where email is not working.
If it is still unclear as to what is preventing your email client from sending and receiving data, I would debug from the email client itself.
Thank you for the reply. You do understand me correctly, except that in the location where I experience problems (my home), sometimes it runs and sometimes it doesn't. When I get the "cannot connect" problem, it will occur in both Thunderbird and Evolution, but either will run properly in about half of my attempts to connect. So far I haven't been able to define the circumstances where it doesn't run.
Since I posted the original message, I tried one other thing, which was to take the home computer into the university, hook it alternately to ethernet and wifi and try running the mail programs. I never had the connection problem when running under either ethernet or wifi. A colleague from the same university who also runs Ubuntu doesn't experience the same problems I do, suggesting that my problem is something unique either to my email configurations, or to the wifi setup at my house. Evidence points to the later, because the problems I experience occur on two different computers running Ubuntu; a mac mini running 15.04 and a Toshiba laptop running 14.04.
Your two suggestions were helpful, but I am a fairly inexperienced Linux user and was not able to get a wireshark output or to figure out how to set variables and get output in Thunderbird. In the case of wireshark, anything I tried to do gave me the error: "couldn't run /usr/bin/dumpcap in child process: permission denied. I understand the message, but I don't know how to give myself permission to capture something in wireshark.
In the case of Thunderbird debugging, I don't know how to set variables in Thunderbird. The mail/news logging wiki suggested I could get output by typing the following commands in a shell:
export NSPR_LOG_MODULES=imap:5
export NSPR_LOG_FILE=/tmp/imap.log
I tried this with and without root permission. The commands were accepted, but then when I ran Thunderbird and got an error, there was no such /tmp/imap.log file.
Any further help would be most appreciated, including the type of additional information I can provide to help someone help me.
Thank you for the reply. You do understand me correctly, except that in the location where I experience problems (my home), sometimes it runs and sometimes it doesn't. When I get the "cannot connect" problem, it will occur in both Thunderbird and Evolution, but either will run properly in about half of my attempts to connect. So far I haven't been able to define the circumstances where it doesn't run.
Since I posted the original message, I tried one other thing, which was to take the home computer into the university, hook it alternately to ethernet and wifi and try running the mail programs. I never had the connection problem when running under either ethernet or wifi. A colleague from the same university who also runs Ubuntu doesn't experience the same problems I do, suggesting that my problem is something unique either to my email configurations, or to the wifi setup at my house. Evidence points to the later, because the problems I experience occur on two different computers running Ubuntu; a mac mini running 15.04 and a Toshiba laptop running 14.04.
You can easily do a survey of your Wireless access point to be sure it's not a signal problem. If you have an Android Smart Phone, you can use this app:
After that you can, again, use wireshark to troubleshoot packet loss between each machine and your router. A simple way to see if there is packet loss on your network is to use the "ping" command:
Code:
ping -c 50 ipaddress
Be sure to substitute in the IP Address of your router at the end of the command by replacing "ipaddress" with an actual IP Address.
Quote:
Your two suggestions were helpful, but I am a fairly inexperienced Linux user and was not able to get a wireshark output or to figure out how to set variables and get output in Thunderbird. In the case of wireshark, anything I tried to do gave me the error: "couldn't run /usr/bin/dumpcap in child process: permission denied. I understand the message, but I don't know how to give myself permission to capture something in wireshark.
Also, you will want to use a filter for wireshark so that you can see just the email traffic. A search for "wireshark filters for email" yielded the following site:
In the case of Thunderbird debugging, I don't know how to set variables in Thunderbird. The mail/news logging wiki suggested I could get output by typing the following commands in a shell:
export NSPR_LOG_MODULES=imap:5
export NSPR_LOG_FILE=/tmp/imap.log
I tried this with and without root permission. The commands were accepted, but then when I ran Thunderbird and got an error, there was no such /tmp/imap.log file.
Any further help would be most appreciated, including the type of additional information I can provide to help someone help me.
The error you are getting is due to the fact that you did not first create the file you are referring to. You need to run thunderbird from the command line. Run each command in order, like so:
This post was really helpful; thanks! I ran the imap.log on Thunderbird and collected logs where it worked and didn't. The problem was bad character transmission; a "^" where there should have been a "/" for accessing my inbox. I had been having problems at my house with dhcp assignment of my Bell 2wire router, which was also not giving me an ethernet connection to one of my computers. I got Bell to replace the router, and I haven't been having the exchange server connection problems since. (The other problems disappeared as well.) Thanks again!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.