When you work in a large company, where Windows OS is mainly on workstations, and you are one of the few Linux users, then you spend a certain amount of your efforts to overcome the resistance of an unfriendly IT environment. Over the years, some problems remain in the past, but new ones appear. So, for example, sites that only sharpened under IE almost disappeared as a class. All the less scary .docx, .xlsx files come in the mail. Somewhere the programs that are necessary for all wonder-yudo, which are written only for Windows, have disappeared. Now almost everything can be opened and edited from a web browser. Much has changed, but not all.
Guess the picture and get baseball cap as a gift prize of the connoisseur of the mail In 2000, it was the PC Magazine mailer of the year, and I myself used it for a couple of years. Only honestly, without searching for pictures.
Speaking of mail, what's wrong with her? In those organizations where Exchange Server is used, events constantly come to the calendar and somehow it is inconvenient to justify that your mailer does not interact with the calendar, and you don’t use Outlook because you don’t have it on Linux. How to set up mail correctly so that everything works on Exchange Server: mail, calendar, address book, work with folders? I write this article about this.
For a decade, I had the opportunity to check Linux mail programs as an Exchange Server client. At various times I used KMail / Kontact and Thunerbird for this purpose. I have to say that the first option almost completely replaced MS Outlook. The second provides no more than half of the required functionality, but it is much simpler in terms of installation and further operation.
So let's get started. Let's start with the difficult: setting up your work email with kdepim / kontact / kmail
to fully replace MS Outlook.
KDEPIM structure. A yellowish fill color indicates Kontact components that interact with the mail server.
As is already clear, this method implies KDE, as a graphical environment, together with the KDEPIM package. In addition, we will need the DavMail mail gateway, which unfortunately is not in the standard Gentoo Linux repositories. Exit the situation using the dpkg
utility and deb package for Debian. It is noteworthy that the development is conducted on SourceForge, and a few days ago a new version of DavMail 4.8 was released.
(4:15)$ wget https://goo.gl/vxEncG -O davmail_4.8.0-2479-1_all.deb (4:16)$ sudo dpkg -i davmail_4.8.0-2479-1_all.deb
DavMail is a program that converts Exchange Web Services to open POP, IMAP, SMTP, Caldav, Carddav, and LDAP.
DavMail architecture, from the project’s home page.
The program pulls all the dependencies to nothing: any open or ajar hypostasis jdk/jre
is fine. Users of the cloud Outlook 365 do not need to configure anything on DavMail, the Exchange Web Services URL is specified in the program initially. If you use a normal internal Exchange Server, then the URL must be specified. And this is almost everything, yet put the daws on the options and DavMail is configured.
For more fine-tuning, you can use the configuration file ~/.davmail.properties
.
Configure ports in the config file.
(5:10)$ grep Port .davmail.properties davmail.caldavPort=1080 davmail.imapPort= davmail.ldapPort= davmail.popPort= davmail.proxyPort= davmail.smtpPort=
Put DavMail into background process mode (X11 is not required).
davmail.server=true
Next, configure KMail and KOrganizer . Since DavMail is difficult to flexibly configure to receive mail, it is preferable to pick up mail directly, and the calendar from the gateway. The difficulty lies in setting up well-known ports, which may require rooting rights, in fussing with SSL certificates when setting up a secure connection.
Hardly Habr's readers need to talk about how to set up an email client to receive and send mail. Just in case there is a link for those who are confused by the KMail interface. I’ll only give you implicit settings, for example, where you should specify the path to the sent folders, templates and drafts, for this you need to open Settings → Identity → Advanced
.
It is noteworthy that you select the folder for the remote from another window: Settings → Configure KMail → Accounts → Receiving tab → (Choose an account) → Modify → Advanced → Trash folder
.
I wrote a separate post about how to glue DavMail and KOrganizer
, so I will not repeat, but instead I will again mention the pitfalls, that is, one rather large reef. Most often, the domain password coincides with the user's password on the Exchange server and at the moment when the domain user changes his domain password, you need to remember to change it to KOrganizer
. If this is not done on time, the account may be blocked , due to persistent calendar attempts to establish a connection with the old password.
It remains to configure LDAP / AD on the address book: Settings → Configure KAddressbook → LDAP Server Settings → Add host
.
The most difficult thing is to set up the DN correctly, for self-checking here you can use the ldapsearch
command. If the command finds a user, then the value of the -b
parameter should be entered in the DN field, in this case, ou=people,o=somehost.com
.
ldapsearch -h ldap.somehost.com -x -b ou=people,o=somehost.com -s sub cn="Ivan Petrov"
What works flawlessly:
Works, but with complaints:
Does not work:
Action Items
in the message header.In addition, a number of both positive and negative properties of Kontact does not depend on the Exchange Server. After KMail, I cannot use email clients that do not have the opportunity to send the sent email again or send an exact copy of it, an elegant and lightweight message editor. On the other hand, the confused S / MIME infrastructure, confusing settings, GHs, due to the interaction with the MS Outlook html parser, get on your nerves.
Akonadi Architecture
In general, this set is rather cumbersome, fragile and requires some attention so that everything continues to work as it should. The weak link here is the Akonadi server, which serves as a repository for all PIM data. Often, Akonadi’s storage data deteriorates and then nothing starts. We have to delete the database and run everything on a new one . After each KDE upgrade, you try to launch KDEPIM applications with bated breath.
With Thunderbird, the situation is different. Such a bulky infrastructure and so much effort are not required, the whole process from the beginning to the end can take no more than 15 minutes, but the end result is more modest. From time to time, you will have to open the Exchange server's web interface in order to accept, reject or change an event in the calendar, delete a message, work with folders. Thunderbird does not know how to do all this when working with Exchange Server through the IMAP protocol.
As in the previous case, I suggest taking mail directly, the calendar through the gateway, and taking contacts from LDAP / AD. I skip the mail setup in Thunderbird, everything is clear. For Office 365, the mail server for incoming and outgoing mail is outlook.office365.com
. I remind you how to configure CalDav:
The procedure will be as follows:
http://localhost:1080/users/username@somehost.com/calendar
.Setting up a calendar in Thunderbird, through the Lightning extension and the DavMail gateway
outlook.office365.com/EWS/Exchange.asmx
is the path to Office 365 web services. For traditional Exchange servers, only the FQDN will be different.Creating a new calendar is also easy after you find how to do it. Do not look in vain in the Thunderbird menu, I give a picture to help. Only the context menu of the right mouse click and only in the specified place highlighted in color will provide an opportunity to create a new calendar.
Lightning extension .
After that, you just need to add the local address from the gateway settings, specifying the path as shown in step 3 above. Again, as a precautionary measure, do not synchronize too often , so that after changing the domain password you do not block the account until the calendar is knocked on the server old password.
The address book remains, no extensions and gateways are required for it. The only thing is that Gentoo Linux users should build a package with the USE
ldap
flag.
[ebuild R ] mail-client/thunderbird-45.8.0::gentoo USE="crypt dbus hardened jemalloc3 ldap minimal pulseaudio -bindist -custom-cflags -custom-optimization -debug -ffmpeg -gstreamer -jit -lightning -mozdom (-neon) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite" L10N="ru -ar -ast -be -bg -bn-BD -br -ca -cs -cy -da -de -el -en-GB -es-AR -es-ES -et -eu -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -hy -id -is -it -ja -ko -lt -nb -nl -nn -pa -pl -pt-BR -pt-PT -rm -ro -si -sk -sl -sq -sr -sv -ta-LK -tr -uk -vi -zh-CN -zh-TW" 0 KiB
From the address book, we call the LDAP server connection settings window: -> -> LDAP
.
In the tab, you can add search filters to your taste, for example:
(objectcategory=person)
or (objectclass=*)
. The entire list is attached .
If to compare Kontact / KMail and Thunderbird , then the first one wins out on suitability in an office environment. Thunberdird
does not have the best IMAP support , but problems arise precisely with viewing and changing Office 365 folders. Microsoft, in turn, cannot boast of adherence to IT standards, so it’s possible that the whole thing is in the IMAP implementation curve on the server side. Organizer also has more features than the Lightning extension. Thanks to Akonadi, KDEPIM has a very convenient background process for receiving mail, registering events and alerts.
On the other hand, all this should be monitored so that the KDEPIM house of cards does not break after each significant upgrade. 2 years ago it was transferred to KDE Frameworks 5 and Qt 5, but it is still far from being present on all Linux distributions. When will appear on Gentoo I will put it first of all and at the same time I will check the account on BugZilla .
Thunderbird impresses with the fact that it is easy to install, configure and maintain, and all that is not enough, you can do on the web client. S / MIME just works, and in KMail, this is something with something. Think for yourself, decide for yourself. As machine translator says, Linux is all about choice.
If it is interesting, next time I will tell you about the young and early Trojita email client, the heavyweight Evolution, and even little things.
Source: https://habr.com/ru/post/324948/
All Articles