How to Setting up Mutt Email Client with IMAP and SMTP for Receive and Send Email through Exchange Web Services EWS using DavMail
http://fosshelp.blogspot.in/2014/05/setting-up-mutt-and-imap-for-email.html
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
[email protected]
#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:
[email protected]:1143/Inbox"
set folder="imap://saju.madhavan:
[email protected]:1143"
set from="
[email protected]"
set realname='Saju Madhavan'
set trash="imap://saju.madhavan:
[email protected]:1143/Trash"
set imap_user="
[email protected]"
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: "
[email protected]"
##Sort by newest conversation first.
set sort = reverse-threads
set sort_aux = last-date-received