Konfigurasi Fetchmail dan Procmail

22 04 2010

Sebelum upgrade PC biasaya kita lupa untuk membackup data email sebelumnya dan lupa (kalo nggak mau dibilang malas :) ) untuk mensetup ulang data email sebelumnya. Biar nggak lupa.. saya coba mendokumentasikan konfigurasi aplikasi email yang pernah diinstall di PC jadul saya.. maklum.. mau dapet PC baru..

Berikut contoh dokumentasi Fetchmail sebagai Mail Retrieval Agent (MRA) yang terinstall pada mesin pc saya.. sedangkan untuk aplikasi mail-client-nya saya menggunakan Cone. Untuk filtering email saya menggunakan procmail.

Sebelumnya seperti biasa install aplikasi berikut melalui apt-get :

$ sudo apt-get install fetchmail cone

Berikut isi dari .fetchmailrc yang ada pada pc jadul saya :)

$ sudo vim .fetchmailrc

set daemon 300

#poll imap.gmail.com with proto imap user abi.at.bb@xxx.com there with password xxxxxx is yyyyy mda "/usr/bin/procmail -d %T"ssl

poll pop.cbn.net.id proto POP3 user xxx@cbn.xxx there with password xxx is yyyy mda "/usr/bin/procmail -d %s"

poll pop.cbn.co.id proto POP3 user xxx@cbn.xxx there with password xxx is yyyy mda "/usr/bin/procmail -d %s"

Untuk konfigurasi procmail-nya :

PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Maildir/                ##you better make sure it exists
DEFAULT=$HOME/Maildir/
LOGFILE=$HOME/Maildir/procmail.log
#LOGABSTRACT=no
#VERBOSE=on...is only used for debugging
#VERBOSE=off

##recipe lines begin with :0
##dont put comments on recipe lines
##disable a recipe with the false condition !
##condition lines begin with * and regex is your friend
##conditions are anded and everything after * is fed straight into egrep
##one action line follows the conditions, in this case it is a mailbox name

#catch duplicates using formail
#:0 Whc: .msgid.lock
#| $FORMAIL -D 16384 .msgid.cache

#:0 a
#$Maildir/.duplicates

#people we always allow mail from
:0
* ^From:.*(olixx.saxxx\@cbn|adx.xxx\@cbn|suxxx\@cbn.*)
$HOME/Maildir/.hotxxx-vouchxxx/

:0
* ^From:.*intraxxx@cbn.xxx
$HOME/Maildir/.intraxxx/

#now flush some spam out
:0
* ^Subject:.*(credit|spam|cash|money|debt|sex|sale|loan)
$HOME/Maildir/.spam/

:0
* ^Subject:.*(prexxx|pakubuwono)
$HOME/Maildir/.hotxxx-vouchxxx/

#no more html messages
:0
* ^Content-Type:.*html
$HOME/Maildir/.junk/

#now put my mail lists into mailboxes
:0
* ^List-Id:.*thexxx
$HOME/Maildir/.thexxx/

:0
* ^List-Id:.*wongxxx
$HOME/Maildir/.wongxxx/

:0
* ^List-Id:.*int-xxx
$HOME/Maildir/.int-xxx/

:0
* ^List-Id:.*int-xxx
$HOME/Maildir/.int-xxx/

:0
* ^List-Id:.*domainadm
$HOME/Maildir/.domainadm/

:0
* ^List-id:.*an_nahala
$HOME/Maildir/.an_nahala

:0
* ^List-Id:.*id-bb
$HOME/Maildir/.id-bb

#catch any other gentoo mail
#:0
#* ^From:.*gentoo.org
#gentoo

#:0
#* ^From:.*@freshmeat\.net
#freshmeat
################################
# Last rule: mail that gets    #
# this far goes in default box #
################################
#:0
#* .*
#default

# End of file

Cone - mail transfer agent

done.. :D

Advertisement

Actions

Information

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.