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. 图片异步加载 ,KVO

    图片异步下载类目: .h #import <UIKit/UIKit.h> typedef void (^ImageBlock)(UIImage *img); @interface UIIm ...

  2. Nginx 配置指令的执行顺序(九)

    紧接在 server-rewrite 阶段后边的是 find-config 阶段.这个阶段并不支持 Nginx 模块注册处理程序,而是由 Nginx 核心来完成当前请求与 location 配置块之间 ...

  3. system.exit(0) vs system.exit(1)

    2.解析 查看java.lang.System的源代码,我们可以找到System.exit(status)这个方法的说明,代码如下: /** * Terminates the currently ru ...

  4. pack布局

    Chapter 2. Geometry Management 第2章 布局管理: 显示部件在屏幕上,他们必须被传递给布局管理器. 布局管理器 控制部件的位置和大小 在显示窗口,几个布局管理器是可用的在 ...

  5. Snippet Compiler——代码段编译工具

    原文地址:http://www.cnblogs.com/conexpress/archive/2011/07/24/2115308.html 不知道大家在工作中是否遇到过下面的情况:在项目中实现了一段 ...

  6. HDU 4721 Food and Productivity (二分+树状数组)

    转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents    by---cxlove 题意 :给出n * m的格子,每个格子有两个属性f ...

  7. http://www.lanceyan.com/tech/mongodb/mongodb_repset1.html

    http://www.lanceyan.com/tech/mongodb/mongodb_repset1.html

  8. Web服务器压力测试一例

    近期部门新上线一个服务,我们使用ab和locust分别测试 目前项目属于demo阶段,对访问量的支持不要求太高,我们暂且设定在500请求,20并发 工具介绍 ab ab全称为:Apache HTTP ...

  9. Applet 数字签名技术全然攻略

      在这里先对大家说声对不起,毕竟2年前就想写这篇文章,但由于自己太懒惰一直没有写,也是为了给自己留点东西好了,前些日子我老大让我又搞这个东西发现我曾经的资料没留,又凭着自己印象从新来过,但发现网上写 ...

  10. To restore the database on a new host-将数据库恢复至一个新的主机上

    To restore the database on a new host:1. Ensure that the backups of the target database are accessib ...