1. 配置安装 procmailr 和 getmail

///////////////////////////////// ignore the follow  /////////////////////////////////////////

$ mkdir mail-setup

$ cd mail-setup/

$ tar xpfv muttrc-out-of-box.tgz

$ cd .mutt/

$ rm muttrc-out-of-box.tgz
$ cd .mutt/
$ cd scripts/
$ cd ..
$ cd misc
$ cd ..
$ cd scripts/
$ vi bootstrapping-mutt.sh
$ ./bootstrapping-mutt.sh

$ cd .mail/
$ cd ..
$ rm .muttrc
$ cd .mail
$ cd ..
$ rm .lbdbrc
$ cat .mailcap
$ rm .mailcap

///////////////////////////////////////////////////////////////////

configure getmail

$ sudo apt install getmail
$ sudo apt install procmail
$ apt search getmail
$ sudo apt install getmail4
$ dpkg -L getmail4
$ getmail
$ mkdir .getmail
$ cd .getmail/
$ ls
$ cp ~/mail-setup/.mutt/misc/getmailrc.template.sample .
$ vi getmailrc.template.sample
$ getmail
$ mv getmailrc.template.sample getmailrc

$ cat ~/.getmail/getmailrc

 [retriever]
type = SimpleIMAPSSLRetriever
server = imapmail.company.com
port =
username = "CCR\name"
password = password
mailboxes = ("Inbox", "Conversation History", ) [destination]
type = MDA_external
path = /usr/bin/procmail [options]
read_all = false
verbose =
delete = false
delivered_to = false
received = false
message_log = ~/.getmail/getmail.intel.log

$ getmail
$ cd ..
$ ls

configure procmail

$ which procmail
$ mv mail-setup/.mutt/misc/procmailrc.sample .procmailrc
$ vi .procmailr
$ vi .procmailrc

$ cat ~/.procmailrc

 # http://gushue.net/mutt/procmailrc
# MAILDIR=$HOME/Mail
#DEFAULT=$MAILDIR/INBOX #completely optional
LOGFILE=$HOME/.getmail/procmail.log
YEAR=`date +%Y` # ----- check for existance of year's directory -----
: ic
* ? test ! -d $YEAR
| mkdir -p $YEAR && chmod $YEAR #:0hc
#* $^(Subject)${URGMATCH}
#| formail -x Subject | growlnotify --sticky --image $HOME/.mutt/misc/mutt-mine-icon.png ::
$YEAR/Inbox/

$ mkdir Mail

$ vi .getmail/getmailrc
$ getmail
$ getmail -v

add getmail in cron

$ crontab -e

$ crontab -l

* * * * * getmail

or

$ while true; do sleep 10; getmail; done &

2. 安装dovecot

$ apt search dovecot

$ sudo apt install dovecot-imapd

$ restart dovecot    # ubuntu use upstart.  but not find dovecot in init.d

$ cd /etc
$ cd dovecot/
$ ls
$ vi dovecot.conf
$ ll
$ vi conf.d/
$ vi dovecot.conf
$ cd conf.d/
$ ls
$ ll
$ vi 10-ssl.conf
$ vi 20-imap.conf
$ grep mail_loca *
$ vi 10-mail.conf
$ sudo vi 10-mail.conf
$ vi 10-mail.conf
$ grep passdb *
$ vi 10-auth.conf

查看状态

$ service --status-all |grep dove

$ dpkg -L dovecot-imapd

配置doveconf

$ doveconf -n

 # 2.2.: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.--generic x86_64 Ubuntu 14.04. LTS
mail_location = maildir:~/Mail/:LAYOUT=fs:INBOX=~/Mail//Inbox:INDEX=~/Mail/.dovecot/indexes:CONTROL=~/Mail/.dovecot/control
maildir_very_dirty_syncs = yes
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
}
protocols = " imap"
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
driver = passwd
}

$ doveadm

add

"mail_location = maildir:~/Mail/Boxes`:LAYOUT=fs:INBOX=~/Mail/Boxes/Inbox:INDEX=~/Mail/.dovecot/indexes:CONTROL=~/Mail/.dovecot/control"

to /etc/dovecot/conf.d/10-mail.conf

debug dovecot

http://www.anta.net/misc/telnet-troubleshooting/imap.shtml (can not open)

http://webcache.googleusercontent.com/search?q=cache:iGfa6OFcHGcJ:wiki.dovecot.org/TestInstallation+&cd=1&hl=zh-CN&ct=clnk&gl=us  (can not open)

https://wiki.dovecot.org/TestInstallation

telnet-troubleshooting imap.shtml

dovecot "Authentication failed"

3. 配置domainname

$ domainname

打造你的办公环境-email篇的更多相关文章

  1. 打造高效的工作环境 – SHELL 篇

    注:本文由雷俊(Javaer/Emacser)和我一起编辑,所以文章版权归雷俊与我共同所有,转载者必需注明出处和我们两位作者.原文最早发于酷壳微信公众号,后来我又做了一些修改,再发到博客这边. 程序员 ...

  2. 打造Linux三流娱乐环境,二流办公环境,一流Java开发环境

    写这篇文章的目的首先是为让自己以后再装linux环境时候,不用再通宵google+百度,做个备忘录,其次,给新入Linux环境的同学分享一点个人经验,再高尚点的动机也算是想做为开源技术的传播布道者.我 ...

  3. vagrant打造自己的开发环境

    vagrant打造自己的开发环境 缘由: 在网上看到斌哥,爽神都写了关于vagrant的博客,都在说很强大,所以很好奇这玩意怎么个强大,然后也就自己来一发玩玩看看. 真实缘由: 说实话是电脑配置太低, ...

  4. git在工作中的用法总结-环境安装篇

    使用git有很长一段时间了 ,平时用到的时候都是直接google,经常用到的一些也记录在笔记中,但有时候笔记太多,实在是太乱了(其实是我太懒~ 哈?),找都要半天的时候还不如直接google,今天有空 ...

  5. 家用PC机打造VSphere5.1 测试环境:之部署VCenter Server 5.1

    家用PC机打造VSphere5.1 测试环境前言:实践出真知,同样学习VMware VSphere 的朋友,也需要不断的测试总结,再测试再总结只有不断的积累才能学好,但是动辄几万的服务器不是所有朋友都 ...

  6. 用固态U盘让你的办公环境随身移动

    有些人因为家中的电脑设备没有办公环境,或者是软件太多装起来麻烦,以及环境不同步等原因上下班总是背着电脑,其实大可不必,只要将系统装进U盘,就可以让你的办公环境随身移动.在公司时启动U盘系统工作,下班后 ...

  7. 打造高效前端工作环境 - tmux

    打造高效前端工作环境 - tmux 前言  现在前端开发可不容易啊,先打开个VIM,然后再打开个lite-server,一不小心写个ES2015还要打开个gulp来做预编译,如果能把这么多个窗口放在一 ...

  8. Ubuntu Desktop基本办公环境搭建

    Ubuntu Desktop基本办公环境搭建 一如前面所强调的, linux系统是面向开发人员友好的,而对office办公人员并不友好 . 如果是重度的office办公需求人员,不建议使用linux ...

  9. 使用 gulp 搭建前端环境入门篇(转载)

    本文转载自: 使用 gulp 搭建前端环境入门篇

随机推荐

  1. YUI的模块化开发

    随着互联网应用越来越重,js代码越来越庞大,如何有效的去组织自己的代码,变得非常重要.我们应该学会去控制自己的代码,而不是到最后一堆bug完全不知道从哪冒出来.前端的模块化开发可以帮助我们有效的去管理 ...

  2. 【Linux CentOS 在虚拟机中XShell出现: (port 22): Connection failed.】

    原因:没安装openssh-server组件!!!!!!!!!! 解决办法:yum install openssh-server 查看openssh-server是否启动: $:ps -ef |gre ...

  3. Activity和View的区别:

    Activity和View的区别: activity相当于控制部分,view相当于显示部分.两者之间是多对多的关系,所有东西必须用view来显示.  viewGroup继承自view,实现了ViewM ...

  4. eclipse/myeclipse使用技巧

    热键篇: Template:Alt + / 修改处:Window->Preference->Workbench->Keys->Command->Edit->Cont ...

  5. ListView嵌套ListView时发生:View too large to fit into drawing cache的问题

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXkxMzg3/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/d ...

  6. UVALive 6665 Dragonas Cruller

    题目链接:https://icpcarchive.ecs.baylor.edu/external/66/6665.pdf 题目大意: 有一个3 * 3 的格子: 每个格子上面的数字能够朝上下左右四个方 ...

  7. Oracle触发器trigger3利用时间限制用户输入

    --触发器的应用限制用户写入 --具体功能:在写入一个表之前,限制必须要在周一到周5和工作时间8:00~18:00 create or replace trigger tri3 before inse ...

  8. 简单的javascript实例一(时钟特效)

    方便以后copy 时钟特效 <html> <head> <meta http-equiv="Content-Type" content="t ...

  9. 使用 hibernate 根据映射文件生成数据库表

    为了更好的显示效果,可以在hibernate.cfg.xml配置文件的<session-factory>标签里加入以下内容: 显示sql语句和格式化显示sql语句: <propert ...

  10. hibernate异常

    <h1> nested exception is org.hibernate.LazyInitializationException:</h1> stackoverflow:h ...