打造你的办公环境-email篇
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篇的更多相关文章
- 打造高效的工作环境 – SHELL 篇
注:本文由雷俊(Javaer/Emacser)和我一起编辑,所以文章版权归雷俊与我共同所有,转载者必需注明出处和我们两位作者.原文最早发于酷壳微信公众号,后来我又做了一些修改,再发到博客这边. 程序员 ...
- 打造Linux三流娱乐环境,二流办公环境,一流Java开发环境
写这篇文章的目的首先是为让自己以后再装linux环境时候,不用再通宵google+百度,做个备忘录,其次,给新入Linux环境的同学分享一点个人经验,再高尚点的动机也算是想做为开源技术的传播布道者.我 ...
- vagrant打造自己的开发环境
vagrant打造自己的开发环境 缘由: 在网上看到斌哥,爽神都写了关于vagrant的博客,都在说很强大,所以很好奇这玩意怎么个强大,然后也就自己来一发玩玩看看. 真实缘由: 说实话是电脑配置太低, ...
- git在工作中的用法总结-环境安装篇
使用git有很长一段时间了 ,平时用到的时候都是直接google,经常用到的一些也记录在笔记中,但有时候笔记太多,实在是太乱了(其实是我太懒~ 哈?),找都要半天的时候还不如直接google,今天有空 ...
- 家用PC机打造VSphere5.1 测试环境:之部署VCenter Server 5.1
家用PC机打造VSphere5.1 测试环境前言:实践出真知,同样学习VMware VSphere 的朋友,也需要不断的测试总结,再测试再总结只有不断的积累才能学好,但是动辄几万的服务器不是所有朋友都 ...
- 用固态U盘让你的办公环境随身移动
有些人因为家中的电脑设备没有办公环境,或者是软件太多装起来麻烦,以及环境不同步等原因上下班总是背着电脑,其实大可不必,只要将系统装进U盘,就可以让你的办公环境随身移动.在公司时启动U盘系统工作,下班后 ...
- 打造高效前端工作环境 - tmux
打造高效前端工作环境 - tmux 前言 现在前端开发可不容易啊,先打开个VIM,然后再打开个lite-server,一不小心写个ES2015还要打开个gulp来做预编译,如果能把这么多个窗口放在一 ...
- Ubuntu Desktop基本办公环境搭建
Ubuntu Desktop基本办公环境搭建 一如前面所强调的, linux系统是面向开发人员友好的,而对office办公人员并不友好 . 如果是重度的office办公需求人员,不建议使用linux ...
- 使用 gulp 搭建前端环境入门篇(转载)
本文转载自: 使用 gulp 搭建前端环境入门篇
随机推荐
- C语言基础09
指向结构体变量的指针叫做结构体指针: typedef struct { int num; char name[30]; // char *name; 程序会崩溃,*name本身是指针,没有什么空 ...
- stream~filestream
http://blog.csdn.net/feliciafay/article/details/6157356 http://blog.csdn.net/feliciafay/article/deta ...
- :gAudit
http://www.doc88.com/p-0794369847693.html http://baike.baidu.com/link?url=pcOUfBpILuEAPFrBSsSU-6Vzg3 ...
- C#正则表达式匹配任意字符
原文:C#正则表达式匹配任意字符 不得不说正则很强大,尤其在字符串搜索上 匹配任意字符,包括汉字,换行符: [\s\S]*. 版权声明:本文为博主原创文章,未经博主允许不得转载.
- redhat 6.3 64位安装中文输入法全过程记录
首先,修改/etc/profile文件,在末尾增加两行: export LC_ALL="zh_CN.UTF-8" export LANG="zh_CN.UTF-8&quo ...
- bzoj3293 [Cqoi2011]分金币&&bzoj1045 [HAOI2008]糖果传递
Description 圆桌上坐着n个人,每人有一定数量的金币,金币总数能被n整除.每个人可以给他左右相邻的人一些金币,最终使得每个人的金币数目相等.你的任务是求出被转手的金币数量的最小值. Inpu ...
- HDU2084 数塔 (DP入门题)
数塔 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...
- HDOJ-1003 Max Sum(最大连续子段 动态规划)
http://acm.hdu.edu.cn/showproblem.php?pid=1003 给出一个包含n个数字的序列{a1,a2,..,ai,..,an},-1000<=ai<=100 ...
- linux内核--进程地址空间(一)
引言:现代操作系统提供了一种对内存的抽象概念,叫做虚拟存储器,它为每个进程提供了一个大的,一致的,和私有的地址空间.通过一个很清晰的机制,虚拟存储器提供了3个重要的能力: 1)它将主存看成是一个存储在 ...
- Oracle delete input与delete all input
oracle官方文档提示:If you had specified DELETE INPUT rather than DELETE ALL INPUT, then RMAN would have on ...