Custom Search

SUBSCRIBE

SUBSCRIBE : 300 + Free Video Tutorials Programming (Python, golang, Julia), DevOps

Wednesday, May 28, 2014

How to Setting up Mutt and IMAP for email through Exchange Web Services EWS using DavMail

1)
Setting up the DavMail server
==============================


a)
Download DavMail

http://davmail.sourceforge.net/download.html
http://sourceforge.net/projects/davmail/files/latest/download?source=files

b)
Install DavMail

sudo apt-get install libswt-gtk-3-java
sudo dpkg -i davmail_4.4.1-2225-1_all.deb




c)
Launch DavMail

* You can then launch DavMail via the Applications/Internet menu.
* Or type "davmail" in terminal and press enter

d)
DavMail Settings

* Right Click on "DavMail" icon, select "Settings".
* Then select "EWS" from 'Exchange Protocol' dropdown.
* Then type "https://webmail.your.company.com/EWS/Exchange.asmx" in 'OWA (Exchange) URL' text field.
* The rest of the settings can be left at defaults.
* Click on "save" button

DavMail Tutorial : http://davmail.sourceforge.net/gettingstarted.html

e)
Kill DavMail (Optional)

ps -aux | grep davmail
#Kill all davmail instances
sudo killall -9 java

2)
Setting up msmtp SMTP client
==============================


* Sendmail is the standard for SMTP, but that is not simpler if you’re just setting up a single user local email environment. msmtp is simpler to configure and adequate for single user email needs.

a)
Install msmtp

sudo apt-get install msmtp
touch ~/.msmtprc ~/.msmtp.log
chmod 600 ~/.msmtprc ~/.msmtp.log


b)
Add following lines in ~/.msmtprc
----------------------------------


defaults
logfile ~/.msmtp.log

account default
host localhost
port 1025
protocol smtp
from saju.madhavan@myorg.com
#auth on
user IN\saju.madhavan
password mypassword

#auto_from off
#tls off

#tls on
#tls_starttls on
#tls_certcheck off
auth login


3)
Setting up mutt for email
==============================


a)
Add following lines in ~/.muttrc
----------------------------------

set spoolfile="imap://saju.madhavan:mypassword@127.0.0.1:1143/Inbox"
set folder="imap://saju.madhavan:mypassword@127.0.0.1:1143"
set from="saju.madhavan@myorg.com"
set realname='Saju Madhavan'
set trash="imap://saju.madhavan:mypassword@127.0.0.1:1143/Trash"
set imap_user="saju.madhavan@myorg.com"
set imap_pass="mypassword"
set imap_keepalive=900   # Set lower if connection times out
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies

##SMTP,For Sent mail
set sendmail="/usr/bin/msmtp"
#set envelope_from=yes
my_hdr From: "saju.madhavan@myorg.com"

##Sort by newest conversation first.
set sort = reverse-threads
set sort_aux = last-date-received
















2 comments:

  1. http://www.bryceharrington.org/wordpress/2013/07/setting-up-mutt-and-imap-for-email-through-exchange-ews/

    ReplyDelete
  2. Add following line in ~/.muttrc

    ##Set VIM editor to create new email
    set editor='vim'

    ReplyDelete