Pustaka Taratsa

Baca teks (EPUB): Membuat Account Pelaporan Spam AutoTrain Bogofilter

1 bagian

Teks ini diambil langsung dari berkas EPUB; tata letak dan gambar tidak disertakan. Untuk tampilan lengkap, silakan merujuk pada dokumen asli.

Daftar isi
  1. Membuat Account Pelaporan Spam AutoTrain Bogofilter
  2. Install Procmail dan Account spamreport
  3. Cek Procmail
  4. Check Shell dan bogofilter
  5. Buat ~/.procmailrc
  6. Check lokasi procmail dan ID spamreport
  7. Konfigurasi .forward
  8. Cek permission spamreport
  9. Pranala Menarik

Membuat Account Pelaporan Spam AutoTrain Bogofilter

Sumber: https://onnocenter.or.id/wiki/index.php/Membuat_Account_Pelaporan_Spam_AutoTrain_Bogofilter

Skenario yang di kembangkan adalah sebagai berikut:

Langkah Pembuatan-nya adalah sebagai berikut:

Install Procmail dan Account spamreport

Install procmail dan Membuat account spamreport

apt-get install procmail
adduser spamreport

Login ke account spamreport

ssh spamreport@localhost

Cek Procmail

Cek kondisi procmail

procmail -v
procmail v3.22 2001/09/10
    Copyright (c) 1990-2001, Stephen R. van den Berg	<[email protected]>
    Copyright (c) 1997-2001, Philip A. Guenther		<[email protected]> 

Submit questions/answers to the procmail-related mailinglist by sending to: 
	<[email protected]>

And of course, subscription and information requests for this list to:
	<[email protected]>

Locking strategies:	dotlocking, fcntl()
Default rcfile:		$HOME/.procmailrc
	It may be writable by your primary group
Your system mailbox:	/var/mail/spamreport

Check Shell dan bogofilter

Check shell

which sh

akan keluar

/bin/sh

Check bogofilter

which bogofilter

akan keluar

/usr/bin/bogofilter

Buat ~/.procmailrc

Edit file ~/.procmailrc

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

# Submit to bogofilter to train
:0
| bogofilter -d /home/bogofilter/ -M -s < /var/spool/mail/spamreport && > /var/spool/mail/spamreport

Pastikan spamreport bisa membaca file tersebut

chmod u+r ~/.procmailrc

Check lokasi procmail dan ID spamreport

Cek lokasi procmail

which procmail

keluar

/usr/bin/procmail

Cek ID spamreport

whoami

Keluar

spamreport

Konfigurasi .forward

Edit .forward

vi ~/.forward

masukan kalimat

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

Ubah permission .forward

chmod 644 ~/.forward

Cek permission spamreport

Cek permission home directory spamreport

 ls -lFd ~/

pastikan keluar

drwx--s--x

atau

drwxr-xr-x

Jika tidak lakukan

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

Pranala Menarik