我需要使用fetchmail从邮件帐户下载所有邮件。使用IMAP和fetchmail下载邮件
当我试着使用POP3我可以在这个格式正确下载所有邮件:
[[email protected] root]# ls /home/mail_import/MAIL_USER/new/
1453828024.7837_0.srv
1453828029.7843_0.srv
但POP3协议不允许选择一个文件夹,所以我需要使用IMAP。
使用IMAP时,我无法单独下载邮件。我试过了,我有一个包含所有邮件的单个文件。
如:
[[email protected] home]# stat /home/mail_import/MAIL_USER/teste
File: ‘/home/mail_import/MAIL_USER/teste’
[[email protected] home]# head /home/mail_import/MAIL_USER/teste
From [email protected] Tue Jan 26 18:56:31 2016
Return-path: <[email protected] >
Envelope-to: [email protected]
Delivery-date: Wed, 02 Dec 2015 15:47:00 -0500
我需要下载像POP3单独的文件中使用IMAP的所有邮件。
我的.fetchmailrc是:
set bouncemail
set no spambounce
set softbounce
set properties ""
defaults:
antispam -1
batchlimit 100
poll DOMAIN with proto IMAP
user 'USER' there with password 'PASS' is 'MAIL' here
options keep fetchall ssl mda "/usr/bin/procmail -f %F -d %T";
folder INBOX
和我的.procmailrc文件为:
MAILDIR=/home/mail_import/MAIL_ACCOUNT
DEFAULT=$MAILDIR/INBOX
LOGFILE=/var/log/procmail
LOCKFILE=$MAILDIR/.default.lock
VERBOSE=on
:0 fhw
|formail
#
## Any other rules the user wishes to either include with INCLUDERC,
## or hardcode into this file, would go here.
## --------------------------------------------------------------------------
## If we're here, the mail didn't match any other rules, so deliver normally.
:0:
$DEFAULT
## If that fails, report an error and throw the mail away.
EXITCODE=75
:0
/dev/null
有下载使用IMAP分别等于POP3电子邮件一些正确的选择吗?
赫姆我改变的procmail到: CORRECTHOME = /家庭/ mail_import/ MAILDIR = $ CORRECTHOME/ PMDIR = /家庭/ mail_import/ LOGFILE = $ PMDIR /日志 VERBOSE =上 :0 邮件/ 和mda到mda“/ usr/bin/procmail” 和workds:D –
不是一个编程问题;提名迁移到https://superuser.com/ – tripleee