Re­minders and ap­point­ments

Linux Format - - TUTORIAL EMAIL -

Sync­ing Google Cal­en­dar with Evo­lu­tion is straight­for­ward thanks to its na­tive sup­port. Nav­i­gate to the Cal­en­dar sec­tion and se­lect the Cal­en­dar op­tion when you click the down ar­row next to New.

In the win­dow that ap­pears you’ll see a drop-down menu for Type. Sim­ply se­lect Google and pro­vide the rel­e­vant in­for­ma­tion. Bear in mind that if you’re us­ing two-fac­tor au­then­ti­ca­tion then you’ll need to gen­er­ate an ap­pli­ca­tion password.

For other web­mail ser­vices you can point to your pri­vate iCAL link with the We­bDAV op­tion. You could also down­load an ICS file and im­port it into your lo­cal cal­en­dar, but changes won’t au­to­mat­i­cally sync back to the server.

Un­for­tu­nately, Thun­der­bird is less straight­for­ward; sup­port for cal­en­dars at the time of writ­ing could char­i­ta­bly be called ex­per­i­men­tal! You’ll need to in­stall an add-on called Lightning, which you can ob­tain by head­ing to Tools>Add-ons>Get Add-ons. In ad­di­tion, you’ll need to find ‘Browse all add-ons’ and search for the plugin be­fore you can in­stall it.

Lightning only cre­ates lo­cal cal­en­dars, so to sync with Google Cal­en­dar you need in­stall a provider add-on too. Un­for­tu­nately, at the mo­ment this is only com­pat­i­ble with Thun­der­bird if it’s the 32-bit in­car­na­tion and ver­sion 52.0 or ear­lier. But there’s a pos­i­tive end in sight, thankfully: there have been sig­nif­i­cant gov­er­nance changes for Thun­der­bird as a project and so we ea­gerly an­tic­i­pate a fix.

Mozil­laThun­der­bird also has a sim­i­lar fil­ter­ing fa­cil­ity. Head to Tools>Mes­sage Fil­ters. When you add one with the New but­ton you’ll find extra sec­tion de­ter­min­ing when you fil­ter should run. By de­fault this is when­ever mail is re­ceived, but you can change it to run the rule when­ever you’re send­ing or ar­chiv­ing email if this seems more ap­pro­pri­ate for your fil­ter rule. The re­main­ing parts are sim­i­lar to Evo­lu­tion. You can de­fine what your fil­ter­ing con­di­tions are and in what order, then state the ac­tions that should ap­ply to that fil­ter.

In both cases you should start to see your rules ap­ply to new in­com­ing mail. If you’d like to check the way you’ve been cre­at­ing fil­ters works, then cre­ate a test fil­ter that redi­rects email sent from your­self to a par­tic­u­lar folder, then send an email to your­self to ver­ify that the mes­sage ap­pears where you ex­pected it to. If it still ap­pears in your in­box you should check that you have fil­ters rules en­abled for in­com­ing mail and that your fil­ter con­di­tion can catch it.

Drop­ping the GUI

Now you know the ba­sics of how to set up a mail client, we could take things a step fur­ther by sync­ing all the emails on our web­mail server lo­cally. You may be won­der­ing why you’d do this, be­cause it sounds like some­thing Evo­lu­tion and Thun­der­bird ought to be do­ing al­ready.

The key rea­son is it’s a fan­tas­tic tool for back­ing up your emails in case some­one hi­jacks your ac­count or you delete a mes­sage ac­ci­den­tally. Nor­mal mail clients will quite hap­pily delete your lo­cal copy of an email as soon as it con­nects to the mail server, which in the wrong sit­u­a­tion can be bad news. Those on slower or me­tered con­nec­tions might also find it quicker and cheaper to sim­ply down­load mes­sages onto one de­vice and then sync them across the lo­cal net­work.

Of course, it could also be that you’re a hair shirt en­thu­si­ast who wants to build and try out an email client setup that even Richard Stall­man him­self would be proud of if you weren’t us­ing a web­mail provider he dis­likes. (There’s no judge­ment from us, we think it’s pretty cool too!)

Off­line IMAP

The first step is to down­load the of­flineimap pack­age from your dis­tri­bu­tion’s repos­i­to­ries. Once it’s in­stalled, you’ll need to cre­ate an .of­flineimaprc file in your home di­rec­tory. To do this, open it in your favourite text ed­i­tor and then add the fol­low­ing lines to the file:

[gen­eral] ui = ttyui ac­counts = Web­mail

[Ac­count Web­mail] lo­cal­repos­i­tory = Web­mail-Lo­cal re­moterepos­i­tory = Web­mail-Re­mote

This de­fines what your ac­count will be called from of­flineimap’s point of view. The names that you de­cide on for the lo­cal and re­mote repos­i­to­ries are aliases for set­tings fur­ther down the file, where the for­mer de­fines the set­tings for the off­line mail that you plan to host in­side your home di­rec­tory and the lat­ter fetches mes­sages from the web­mail provider.

The lo­cal con­fig­u­ra­tion method that you need to fol­low is rel­a­tively straight­for­ward: [Repos­i­tory Web­mail-Lo­cal] type = Maildir lo­cal­fold­ers = ~/Mail/Web­mail

The next part of the process is a lit­tle more com­plex, be­cause you’ll need to en­sure that the IMAP server, port and au­then­ti­ca­tion set­tings match those pro­vided by your web­mail host. Again, if you use two-fac­tor au­then­ti­ca­tion to safe­guard your ac­count then you’ll need to gen­er­ate an ap­pli­ca­tion password for this step. You can achieve this by typ­ing the fol­low­ing: [Repos­i­tory Web­mail-Re­mote] type = IMAP re­mote­host =­dress re­moteport = 993 re­mo­teuser = re­motepass = ap­pli­ca­tion­pass­word re­aldelete = no max­con­nec­tions = 3 sslcac­ert­file = /etc/ssl/certs/ca-cer­tifi­cates.crt

For safety’s sake it makes sense to set re­aldelete to no, so that you al­ways have a re­cov­er­able ver­sion of the mes­sage stored. Fi­nally, you can test your saved of­flineimap con­fig­ur­ing by load­ing up bash and try­ing it out with some log out­put. $ of­flineimap -o

Bear in mind that of­flineimap won’t up­date it­self au­to­mat­i­cally. You’ll need to setup a cron job to reload the email list pe­ri­od­i­cally. You can open up your con­fig­u­ra­tion

with crontab -e and then sim­ply add the fol­low­ing line to your con­fig­u­ra­tion: @hourly of­flineimap

Send­ing mail

While for web ap­pli­ca­tions and log alarms you might be tempted to use a tool like send­mail, for per­sonal mes­sages you should make use of the SMTP server that your web­mail host pro­vides so the ori­gin of the mes­sage can be ver­i­fied. This can be achieved with the help of msmtp. Af­ter in­stalling it through your pack­age repos­i­to­ries as be­fore, you’ll need to cre­ate an .msmt­prc file and then add the fol­low­ing lines to it: ac­count de­fault host port 587 pro­to­col smtp auth on from user password ap­pli­ca­tion­pass­word tls on tl­s_no­certcheck

You’ll need to change the set­tings ac­cord­ing to those pro­vided on your web­mail host’s help pages. You can test your con­fig­u­ra­tion is cor­rect by set­ting per­mis­sions and then cre­at­ing a test email: $ chmod 600 .msmt­prc $ echo a test mes­sage | msmtp

If you were suc­cess­ful, you should see an email mes­sage in your web­mail ac­count’s sent folder. Don’t panic if it’s blank as it should still work with Mutt in the next sec­tion.

Re­lease the hounds

Now that you have a work­ing of­flineimap setup pulling files down to a known lo­ca­tion, it makes sense to open them up and check that they’re still read­able. This is where Mutt comes in, be­cause this will pro­vide us with a com­mand line email client that can con­nect to our down­loaded mes­sages. Once you’ve in­stalled the pack­age you should cre­ate a . mut­trc file in your home di­rec­tory and then add the fol­low­ing lines: set send­mail=/usr/bin/msmtp set use_from=yes set re­al­name=John Smith set set en­velope_from=yes

This tells mutt to use msmtp to send emails and the de­fault sen­der in­for­ma­tion it should pro­vide. We can test this out by launch­ing mutt at the com­mand line. When the tool ap­pears hit M to start a new mail and send it to your­self. While com­pos­ing the mes­sage, Mutt will launch Nano when you reach the mes­sage sec­tion. You’re not re­stricted to that choice though, and could switch it to gedit, Emacs or Vim by ad­ding a line to your mutt con­fig­u­ra­tion file sim­i­lar to this one: set ed­i­tor=vim

Then hit Y to send. If you check your web­mail ac­count through a browser you should spot the test emails in your sent folder and in­box, as­sum­ing ev­ery­thing went well.

Now we can send email in Mutt, it makes sense to start read­ing the email stored in from of­flineimap. To do that we are go­ing to have to add some more lines to our .mut­trc:

set mbox_­type = Maildir set folder= ~/Mail/Web­mail set spoolfile = +In­box set mbox= +Archive set post­poned = +Drafts un­set record mail­boxes +IN­BOX

The + sym­bols en­sure the pre­fix we set for the folder set­ting is added to the folder path. We un­set Mutt’s record­ing as your web­mail will keep copies of sent emails. On the last line we list the fold­ers we want to fetch mes­sages from and dis­play. To add more, ap­pend them to the end of that line.

Evo­lu­tion Mail’s fea­tures, such as searches and fil­ter rules, matches up favourably to com­mer­cial ri­vals like Novell Group­wise and Mi­crosoft Out­look.

Keep track of your ap­point­ments with Evo­lu­tion mail’s in-built cal­en­dar. With a sim­ple dou­ble-click you can also keep track of tasks in your own per­sonal to-do list.

For when only email at the bash ter­mi­nal feels geeky enough, Mutt mail reader is much eas­ier to set up than more es­tab­lished al­ter­na­tives such as Alpine.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.