如何设定procmail?

上网、浏览、聊天、下载等
回复
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44
送出感谢: 1 次
接收感谢: 2 次

如何设定procmail?

#1

帖子 罗非鱼 » 2013-02-13 21:10

getmail的安装以及配置使用
1.安装
sudo apt-get install getmail4
2.配置
mkdir /home/debian/.getmail
cd /home/debian/.getmail
mkdir maildir
cd maildir
mkdir new cur tmp

3.配置文件
nano /home/debian/.getmail/getmailrc.163
文件内容如下:

# This is a configuration file for buddha@qq.com
[retriever]
type = SimplePOP3Retriever
server = pop.163.com
username = x1
password = x2

[destination]
type = Maildir
path = /home/debian/.getmail/maildir/

[options]
read_all = False
delete = False
# configuration file ends here

4.运行
getmail --rcfile=getmailrc.163

getmail会自动收取邮件,下载的邮件会保存在~/.getmail/maildir/new/下。

procmail的安装配置
1.sudo apt-get install procmail
2.配置文件
nano /home/debian/.procmailrc
#Preliminaries
SHELL=/bin/sh #Use the Bourne shell (check your path!)
MAILDIR=${HOME}/.getmail/maildir #First check what your mail directory is!
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

:0
* ^From: x1@qq\.com
/dev/null


nano /home/debian/.forward

"|IFS=' ' && exec /usr/bin/procmail || exit 75 #debian"


全部完成后,重新启动,我从x1@qq.com发送邮件,发现根本不能阻止它接收邮件,请问,我的错误在哪里?
回复

回到 “因特网相关软件”