LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-15-2015, 06:54 AM   #1
trentfox
Member
 
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 16.04, Unity & Gnome-shell
Posts: 83

Rep: Reputation: 15
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.
 
Old 07-17-2015, 07:02 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.

Head over to this site and read about how to debug Thunderbird email connections: https://wiki.mozilla.org/Thunderbirdebugging

You have not provided (useful) information that would actually allow someone to troubleshoot.
 
Old 07-18-2015, 07:48 AM   #3
trentfox
Member
 
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 16.04, Unity & Gnome-shell
Posts: 83

Original Poster
Rep: Reputation: 15
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.

Last edited by trentfox; 07-18-2015 at 07:56 AM.
 
Old 07-18-2015, 10:37 AM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Quote:
Originally Posted by trentfox View Post
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:

Wifi Analyzer - Androids Apps on Google Play

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.
Be sure to run wireshark as root and this error will go away. This link might also be helpful: https://ask.wireshark.org/questions/...ubuntu-install

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:

https://ask.wireshark.org/questions/...incoming-email

Quote:
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:

Code:
# touch /tmp/imap.log
# export NSPR_LOG_FILE=/tmp/imap.log
# export NSPR_LOG_MODULES=imap:5 
# thunderbird
 
1 members found this post helpful.
Old 07-21-2015, 09:40 PM   #5
trentfox
Member
 
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 16.04, Unity & Gnome-shell
Posts: 83

Original Poster
Rep: Reputation: 15
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!
 
Old 07-21-2015, 09:57 PM   #6
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Happy to help, and glad you were able to resolve you issue.
 
  


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
Email client connect to Microsoft Exchange Server! cnmmd Mandriva 2 05-12-2011 03:07 PM
Linux Email client to send/recive mails from Exchange server Hussain000 Linux - Software 3 01-03-2009 04:12 AM
Linux Email client to send/recive mails from Exchange server Hussain000 Red Hat 1 01-01-2009 05:41 AM
Linux Email client to send/recive mails from Exchange server Hussain000 Linux - General 1 01-01-2009 05:39 AM
Linux as email client on MS exchange server 2000 imsajjadali Red Hat 15 12-19-2005 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:20 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
Open Source Consulting | Domain Registration