popfile

ref http://getpopfile.org/docs/howtos:ubuntu

apt-get install popfile kakasi libtext-kakasi-perl

config

edit /var/lib/popfile/popfile.cfg

import windows data

cp -R "C:/Docments and Settings/myname/Application Data/POPFile/messages" /Var/lib/popfile/
cp "C:/Docments and Settings/myname/Application Data/POPFile/popfile.db" /var/lib/popfile/
chown -R popfile:popfile /var/lib/popfile

popfile + fetchmail + procmail + mew

/var/lib/popfile/popfile.cfg

...
html_port 7070
...
pop3_port 7071
...


.fetchmailrc

defaults
	protocol pop3
	keep # keep mails on the server #flush delete mail
	no mimedecode
 	mda "/usr/bin/procmail"
poll localhost
     port 7071
     user "mail.example.com:995:myname:ssl"
     password passwd

.procmailrc

MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR
LOGFILE=$MAILDIR/procmail.log 
LOCKFILE=$HOME/.lockmail
DEFAULT=$HOME/Mail/inbox/

## POPFile apply
:0 HBfw :$HOME/.lockmail
* ! ^X-Text-Classification:
| /usr/sbin/popfile-pipe


:0 H :
* ^X-Text-Classification: spam
$MAILDIR/POPFile/spam/.


:0 H :
* ^X-Text-Classification: unclassified
$MAILDIR/POPFile/unclassified/.

:0
inbox/.


.mew.el

(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
(setq mew-auto-get nil)
(setq mew-mailbox-type 'maildir)
(setq mew-mbox-command "incm")

(setq mew-config-alist
      '(
        ("default"
         ("name" . "name name") ;; (user-full-name)
         ("user" . "myname") ;; (user-login-name)
         ("mail-domain" . "example.com")
	 ("mew-smtp-server"  . "mail.example.com")
	 ("mew-smtp-user" . "myname")
         ("mew-smtp-auth-list" . ("CRAM-MD5" "DIGEST-MD5" "PLAIN" "LOGIN"))
	 ("mew-use-smtp-auth" . t)
        )
)) 


.wl.el

;compt mew
(setq elmo-maildir-folder-path "~/Mail/")
(setq mime-edit-split-message nil) 
(setq elmo-imap4-default-server "mail.example.com")
(setq elmo-pop3-default-server "mail.example.com")
(setq elmo-pop3-default-user "myname")
(setq elmo-pop3-default-port 110)
(setq wl-smtp-posting-server "mail.example.com")
(setq wl-pop-before-smtp-user 'myname)

.folders

Mail{
|&myname@mail.example.com|+inbox "inbox"
+backup "backup"
+trash  "trash"
+POPFile/spam "spam"
+POPFile/unclassified "unclassified"
}

gentoo popfile hand run

stop postfix dovecot
then run popfile
# popfile --set pop3_enabled=0 --set IMAP_enabled=1 &
Config disable pop3
# lynx http://127.0.0.1:8080/advanced
restart popfile
restart postfix dovecot
#echo popfile --set pop3_enabled=0 --set IMAP_enabled=1 > /etc/local.d/popfile.start
#chmod a+x /etc/local.d/popfile.start

import other pc file

cp to
/usr/share/popfile/messages
/usr/share/popfile/popfile.db