Archive for the 'Email' Category

Take a bite out of your email with mutt.

Mutt

Mutt


I really love text based email clients. They do a wonderful job of keeping distractions out of your way and letting you focus on what’s important – the message! I find that by using a text email client, I save myself probably 30 minutes or more each day (yes, I get a LOT of emails).
For years I advocated and used pine and alpine for my email. I really liked it and still do, however, it just doesn’t perform great with IMAP it seems, and especially multiple IMAP accounts, and that is what the email of today is like. I switched to a more efficient thunderbird email client for a long while, but then thunderbird started addding “features” like local indexing and such. Kind of a turn off.
Recently, I thought I would look around again and landed back on mutt. I had avoided mutt for many years because it used to require you run your own smtp server. That has always been pretty impractical for me. Now, however, I found that mutt does support using an external smtp server and handles IMAP email with ease. Well! It was time to give it a try and boy, I am glad I did. It’s fantastic! It’s very lightweight, fast, powerful and has that manly text based interface that makes you feel like a power user and makes you look like a unix genius.
The key to a good mutt setup is in the config file, and therein lies all the power as well. Here is a peek into my ~/.muttrc file to give you an idea on how to get things going:

set spoolfile=imap://youremailhostaddress.com/
set folder=imap://youremailhostaddress.com/
set record=”=Sent”
set postponed=”=Drafts”
set mark_old=no # does not mark your messages as old
set fast_reply=yes
set include=yes
set imap_user = “yourusername”
set imap_pass = “yourpassword”
set signature=”~/.signature”
set smtp_url=smtp://yoursmtpserver
auto_view text/html
set mail_check=30
set timeout=15
set realname=”your realname”
set from=”your from address”
set use_from=yes
set editor=vim #greatest editor around
unset markers # get rid of those pesky plusses
set ssl_starttls = no # dont use these on my internal srvr
set ssl_force_tls = no # same as above

Those are pretty self explanatory and I find that is a minimum config for me to work with. Now you might (if you are smart and use vim) want to enable a spellchecker in vim as well. That just takes these lines in your ~/.vimrc file:

set spell
set spelllang=en_gb

Once that is in there and you make a spelling error on an email it will be highlighted. Just cursor over the word and press z= for a spelling suggestion.

As for a few tips on actually using mutt, here are some that will get you started:
Cursor up/down and press enter or space to read a mail.
Once in the email space to page/scroll down and – to get back up.
Press v to view attachment list and enter on the one you want to open.
Press m to write a new email.
Press c then tab to change folders and press space to open that email folder.
Press s then ? to save an email to a different folder and select the folder with space.
Press d to delete an email, r to reply to the sender, g to reply to all.
Press a to take an address and save it into your address book. This will make an alias of sorts so that when you create a new mail to an alias of “person” it translates to person@domain.com automatically.
Press D (yes capital) to search for and delete all mail with a subject that matches your expression.
Press D then ~b and expression to do the same within the message bodies.
Press l then expression to filter/search emails.
Press l then ~b and expression to do the same within the message bodies.
Eventually you will want to sync your email and get rid of all the deleted stuff – press $ and enter to do that.
Probably the most helpful is to remember to press ? to get help! :)

I hops that helps getting you all started with using this great client! Enjoy!

TLLTS Email List

Thunderbird

E-Mail


We just mentioned on the last LinuxLink TechShow that we are starting a mailing list. Our intention is to provide a way to more easily disseminate information during the week to our listeners, have a place for some interesting conversation, ideas and help, and have a sort of virtual user group. If you would like to join in on the fun, point your browser to: https://www.thelinuxlink.net/mailman/listinfo/tllts and sign right up! I’ll see you there!

Personal IMAP mail server

What is a personal IMAP mail server and why would you want one? Well, such a server is, like it sounds, your very own mail server that you can access via IMAP. You might want such a thing because, like me, you have a lot of different email accounts in different places and you want to collect them all into one central and easy to manage location. I also like having more direct control over my access to my email. For example, if your email account at somewhere.com stops working because their server is down and you need to reference an email stored there, you are out of luck, unless you store your somewhere.com email on your own email server where you can still access it even though their server is inaccessible.

Since I am doing some personal server upgrades and migration, I thought it would be great to share just how to get this kind of server up and running with the most minimal hassle.

For starters, my new mail server is going to be a 32 bit server install of CentOS 5.3. This OS is not at all difficult to install at all and it’s enterprise ready, so it’s plenty reliable.

When you have a machine ready with CentOS running on it, you will need to install Dovecot to handle your IMAP mail access. This is just an yum install away:

yum -y install dovecot

You will need to configure Dovecot after the install. Edit the /etc/dovecot.conf file and make sure the following is set and uncommented:

protocols = imap imaps
mail_location = maildir:~/Maildir

CentOS uses a sendmail/procmail mail combo by default, so in order to make sure your server and IMAP are both using Maildir (so your email gets delivered to you locally) you’ll need to create a file called /etc/procmailrc and in it put:

DEFAULT=$HOME/Maildir/

And then restart your mail service (just to make sure):

service sendmail restart

Once that is set, you will need to turn on Dovecot!

chkconfig dovecot on
service dovecot start

At this point, you should be able to (firewall issues not withstanding) connect to your new mail server via IMAP and see that you have no mail. I am assuming that you have set up mail clients before, the only difference now is you will point to “YourNewMailServerName” and set it up for IMAP mail and use your account name and password from “YourNewMailServerName”.

For example, I created a new server called “Pukwudgie.linc.lan” and created an account on it called linc and made a supersecret password. When I set up my mail client to test the mailserver setup, I set it up to point to Pukwudgie.linc.lan using my username of linc and my password of supersecret via the IMAP protocol. I was able to log directly into my new mail account, which was completely empty.

At some point, you will want to SEND some mail from this account. Since this personal IMAP server is just a place to HOLD your emails, you will need to configure your email client to use your ISP’s smtp address to send through. Follow their instructions for doing this. Most ISP’s do not allow you to use any smtp server other than their own these days.

Now for the fun part. You wan to collect your mail from other places and store it here. This is accomplished through the use of fetchmail. You will need to place a “~/.fetchmailrc” file in your home directory. Please refer to the fetchmailrc man page for full details, but in essence mine looks a lot like this:

poll lincisgreat.org user "linc" there with password "itsasecret"

And you can have as many of those lines in that file as you have email accounts. After creating the rc file, you can run fetchmail to get your mail and have it delivered locally on your new server, where you can access it via IMAP. There are several methods of running fetchmail. You can run it by itself and watch the output as it goes each time, you can run it in daemon mode by starting it with the -d command line switch and specifying a time interval:

fetchmail -d 60

Will check for and grab your email every 60 seconds. Or you could put fetchmail in your crontab and have cron manage getting your mail like so:

*/5 * * * * /usr/bin/fetchmail &> /dev/null

Which would check your email every 5 minutes.