Difference between revisions of "Procmail: Edit .procmailrc"

From OnnoWiki
Jump to navigation Jump to search
(New page: Check shell which sh biasanya keluar /bin/sh Konfigurasi default ada di ~/.procmailrc #Preliminaries SHELL=/bin/sh #Use the Bourne shell (check your path!) MAILDIR=...)
 
Line 1: Line 1:
 +
===Check Shell===
 +
 
Check shell
 
Check shell
  
 
  which sh
 
  which sh
  
biasanya keluar
+
akan keluar
  
 
  /bin/sh
 
  /bin/sh
  
Konfigurasi default ada di ~/.procmailrc
+
===Buat ~/.procmailrc===
 +
 
 +
Edit file ~/.procmailrc
 +
 
 +
vi ~/.procmailrc
  
 
  #Preliminaries
 
  #Preliminaries
Line 25: Line 31:
 
  ${DEFAULT}
 
  ${DEFAULT}
  
 +
 +
Pastikan spamreport bisa membaca file tersebut
 +
 +
chmod u+r ~/.procmailrc
 +
 +
===Check lokasi procmail dan ID myid===
 +
 +
Cek lokasi procmail
 +
 +
which procmail
 +
 +
keluar
 +
 +
/usr/bin/procmail
 +
 +
Cek ID myid
 +
 +
whoami
 +
 +
Keluar
 +
 +
myid
 +
 +
===Konfigurasi .forward===
 +
 +
Edit .forward
 +
 +
vi ~/.forward
 +
 +
masukan kalimat
 +
 +
"|IFS=' ' && exec /usr/bin/procmail || exit 75 #myid"
 +
 +
Ubah permission .forward
 +
 +
chmod 644 ~/.forward
 +
 +
==Cek permission myid==
 +
 +
Cek permission home directory myid
 +
 +
  ls -lFd ~/
 +
 +
pastikan keluar
 +
 +
drwx--s--x
 +
atau
 +
drwxr-xr-x
 +
 +
Jika tidak lakukan
 +
 +
chmod u+rwx ~/
 +
chmod og+x ~/
 +
ls -lFd ~/
  
 
==Pranala Menarik==
 
==Pranala Menarik==

Revision as of 10:05, 7 January 2011

Check Shell

Check shell

which sh

akan keluar

/bin/sh

Buat ~/.procmailrc

Edit file ~/.procmailrc

vi ~/.procmailrc
#Preliminaries
SHELL=/bin/sh               #Use the Bourne shell (check your path!)
MAILDIR=/var/spool/mail/        #First check what your mail directory is!
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

#Whatever recipes you'll use
#The order of the recipes is significant
:0
* ^From: scam@cyberspam\.com
/dev/null

# Accept all the rest to your default mailbox
:0:
${DEFAULT}


Pastikan spamreport bisa membaca file tersebut

chmod u+r ~/.procmailrc

Check lokasi procmail dan ID myid

Cek lokasi procmail

which procmail

keluar

/usr/bin/procmail

Cek ID myid

whoami

Keluar

myid

Konfigurasi .forward

Edit .forward

vi ~/.forward

masukan kalimat

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

Ubah permission .forward

chmod 644 ~/.forward

Cek permission myid

Cek permission home directory myid

 ls -lFd ~/

pastikan keluar

drwx--s--x

atau

drwxr-xr-x

Jika tidak lakukan

chmod u+rwx ~/
chmod og+x ~/
ls -lFd ~/

Pranala Menarik