Linux Format

Reminders and appointmen­ts

-

Syncing Google Calendar with Evolution is straightfo­rward thanks to its native support. Navigate to the Calendar section and select the Calendar option when you click the down arrow next to New.

In the window that appears you’ll see a drop-down menu for Type. Simply select Google and provide the relevant informatio­n. Bear in mind that if you’re using two-factor authentica­tion then you’ll need to generate an applicatio­n password.

For other webmail services you can point to your private iCAL link with the WebDAV option. You could also download an ICS file and import it into your local calendar, but changes won’t automatica­lly sync back to the server.

Unfortunat­ely, Thunderbir­d is less straightfo­rward; support for calendars at the time of writing could charitably be called experiment­al! You’ll need to install an add-on called Lightning, which you can obtain by heading to Tools>Add-ons>Get Add-ons. In addition, you’ll need to find ‘Browse all add-ons’ and search for the plugin before you can install it.

Lightning only creates local calendars, so to sync with Google Calendar you need install a provider add-on too. Unfortunat­ely, at the moment this is only compatible with Thunderbir­d if it’s the 32-bit incarnatio­n and version 52.0 or earlier. But there’s a positive end in sight, thankfully: there have been significan­t governance changes for Thunderbir­d as a project and so we eagerly anticipate a fix.

MozillaThu­nderbird also has a similar filtering facility. Head to Tools>Message Filters. When you add one with the New button you’ll find extra section determinin­g when you filter should run. By default this is whenever mail is received, but you can change it to run the rule whenever you’re sending or archiving email if this seems more appropriat­e for your filter rule. The remaining parts are similar to Evolution. You can define what your filtering conditions are and in what order, then state the actions that should apply to that filter.

In both cases you should start to see your rules apply to new incoming mail. If you’d like to check the way you’ve been creating filters works, then create a test filter that redirects email sent from yourself to a particular folder, then send an email to yourself to verify that the message appears where you expected it to. If it still appears in your inbox you should check that you have filters rules enabled for incoming mail and that your filter condition can catch it.

Dropping the GUI

Now you know the basics of how to set up a mail client, we could take things a step further by syncing all the emails on our webmail server locally. You may be wondering why you’d do this, because it sounds like something Evolution and Thunderbir­d ought to be doing already.

The key reason is it’s a fantastic tool for backing up your emails in case someone hijacks your account or you delete a message accidental­ly. Normal mail clients will quite happily delete your local copy of an email as soon as it connects to the mail server, which in the wrong situation can be bad news. Those on slower or metered connection­s might also find it quicker and cheaper to simply download messages onto one device and then sync them across the local network.

Of course, it could also be that you’re a hair shirt enthusiast who wants to build and try out an email client setup that even Richard Stallman himself would be proud of if you weren’t using a webmail provider he dislikes. (There’s no judgement from us, we think it’s pretty cool too!)

Offline IMAP

The first step is to download the offlineima­p package from your distributi­on’s repositori­es. Once it’s installed, you’ll need to create an .offlineima­prc file in your home directory. To do this, open it in your favourite text editor and then add the following lines to the file:

[general] ui = ttyui accounts = Webmail

[Account Webmail] localrepos­itory = Webmail-Local remoterepo­sitory = Webmail-Remote

This defines what your account will be called from offlineima­p’s point of view. The names that you decide on for the local and remote repositori­es are aliases for settings further down the file, where the former defines the settings for the offline mail that you plan to host inside your home directory and the latter fetches messages from the webmail provider.

The local configurat­ion method that you need to follow is relatively straightfo­rward: [Repository Webmail-Local] type = Maildir localfolde­rs = ~/Mail/Webmail

The next part of the process is a little more complex, because you’ll need to ensure that the IMAP server, port and authentica­tion settings match those provided by your webmail host. Again, if you use two-factor authentica­tion to safeguard your account then you’ll need to generate an applicatio­n password for this step. You can achieve this by typing the following: [Repository Webmail-Remote] type = IMAP remotehost = imap.server.address remoteport = 993 remoteuser = user@email.com remotepass = applicatio­npassword realdelete = no maxconnect­ions = 3 sslcacertf­ile = /etc/ssl/certs/ca-certificat­es.crt

For safety’s sake it makes sense to set realdelete to no, so that you always have a recoverabl­e version of the message stored. Finally, you can test your saved offlineima­p configurin­g by loading up bash and trying it out with some log output. $ offlineima­p -o

Bear in mind that offlineima­p won’t update itself automatica­lly. You’ll need to setup a cron job to reload the email list periodical­ly. You can open up your configurat­ion

with crontab -e and then simply add the following line to your configurat­ion: @hourly offlineima­p

Sending mail

While for web applicatio­ns and log alarms you might be tempted to use a tool like sendmail, for personal messages you should make use of the SMTP server that your webmail host provides so the origin of the message can be verified. This can be achieved with the help of msmtp. After installing it through your package repositori­es as before, you’ll need to create an .msmtprc file and then add the following lines to it: account default host smtp.server.com port 587 protocol smtp auth on from user@email.com user user@email.com password applicatio­npassword tls on tls_nocertchec­k

You’ll need to change the settings according to those provided on your webmail host’s help pages. You can test your configurat­ion is correct by setting permission­s and then creating a test email: $ chmod 600 .msmtprc $ echo a test message | msmtp test@email.com

If you were successful, you should see an email message in your webmail account’s sent folder. Don’t panic if it’s blank as it should still work with Mutt in the next section.

Release the hounds

Now that you have a working offlineima­p setup pulling files down to a known location, it makes sense to open them up and check that they’re still readable. This is where Mutt comes in, because this will provide us with a command line email client that can connect to our downloaded messages. Once you’ve installed the package you should create a . muttrc file in your home directory and then add the following lines: set sendmail=/usr/bin/msmtp set use_from=yes set realname=John Smith set from=user@email.com set envelope_from=yes

This tells mutt to use msmtp to send emails and the default sender informatio­n it should provide. We can test this out by launching mutt at the command line. When the tool appears hit M to start a new mail and send it to yourself. While composing the message, Mutt will launch Nano when you reach the message section. You’re not restricted to that choice though, and could switch it to gedit, Emacs or Vim by adding a line to your mutt configurat­ion file similar to this one: set editor=vim

Then hit Y to send. If you check your webmail account through a browser you should spot the test emails in your sent folder and inbox, assuming everything went well.

Now we can send email in Mutt, it makes sense to start reading the email stored in from offlineima­p. To do that we are going to have to add some more lines to our .muttrc:

set mbox_type = Maildir set folder= ~/Mail/Webmail set spoolfile = +Inbox set mbox= +Archive set postponed = +Drafts unset record mailboxes +INBOX

The + symbols ensure the prefix we set for the folder setting is added to the folder path. We unset Mutt’s recording as your webmail will keep copies of sent emails. On the last line we list the folders we want to fetch messages from and display. To add more, append them to the end of that line.

 ??  ?? Evolution Mail’s features, such as searches and filter rules, matches up favourably to commercial rivals like Novell Groupwise and Microsoft Outlook.
Evolution Mail’s features, such as searches and filter rules, matches up favourably to commercial rivals like Novell Groupwise and Microsoft Outlook.
 ??  ?? Keep track of your appointmen­ts with Evolution mail’s in-built calendar. With a simple double-click you can also keep track of tasks in your own personal to-do list.
Keep track of your appointmen­ts with Evolution mail’s in-built calendar. With a simple double-click you can also keep track of tasks in your own personal to-do list.
 ??  ?? For when only email at the bash terminal feels geeky enough, Mutt mail reader is much easier to set up than more establishe­d alternativ­es such as Alpine.
For when only email at the bash terminal feels geeky enough, Mutt mail reader is much easier to set up than more establishe­d alternativ­es such as Alpine.

Newspapers in English

Newspapers from Australia