Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-25-2003, 09:03 AM   #1
Registered: Jul 2001
Location: Morpeth UK
Distribution: Mandrake 10.0
Posts: 51

Rep: Reputation: 15
Spamassassin conf with fetchmail, postfix, procmail, kmail

Hi guys,

Update: I don't seem to have sa-learn and also mail for the inbox is still going to /home/user1/Mail rather than /home/user1/Maildir

I am trying to configure spamassassin to filter the 100's of crap email I get everyday andI am having a few problems. I have it filtering some spam sucessfully so I think I am nearly there. However, some still gets through and also I cannot access the folders I am filtering mail into via procmail. Any help would be greatly appreciated.

I am running Mandrake 9.1 with fetchmail release 6.2.1, procmail 3.22, postfix and kmail

My setup has 2 local users receiving mail from an external smtp server. I have fetchmail set up to run as a daemon from startup and root has a .fetchmailrc as follows

set syslog
set postmaster "user1"
set bouncemail
set spambounce
set properties ""
set daemon 180
poll with proto POP3
user 'removed1' there with password 'removed1' is 'user1 here options fetchall antispam 501
user 'removed2' there with password 'removed2' is 'user2' here options fetchall antispam 501

This has been sucessfully pulling down mail and dropping it into /var/spool/mail from which we have add access from kmail set up to access the mail file. Kmail was then set with folders confirgured to filer mail into using rules.

Postfix is up and running and has been sucessful for ages under this system. is as follows:

#soft_bounce = no
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
myhostname =
mydomain =
inet_interfaces = localhost
unknown_local_recipient_reject_code = 450
alias_maps = hash:/etc/postfix/aliases

home_mailbox = Mailbox
#home_mailbox = Maildir/

mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
debug_peer_level = 2
delay_warning_time = 4
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
readme_directory = /usr/share/doc/postfix-2.0.6/README_FILES
alias_database = hash:/etc/postfix/aliases
myorigin =
notify_classes = resource, software, delay

This has been chopped to what I think is needed to show here, One of the lines I am uncertain about if homemailbox. Should this be set to maildir?

This all worked a treat until I tried to spamassassin on. I installed sa and set up a .procmailrc in /home/user1 as follows:

#Filter out Mails from Newgroups
* ^To:.ipcop-user@*

#Filter out Mail from lfs
* ^To:.*

#Run SpamAssasin
| spamassassin -a -P
* ^Subject:.*\*\*\*\*SPAM\*\*\*\*
# Everything else goes in default mailbox.

I then set up kmail to receive mail from maildir at /home/user1/maildir. I also ran maildirmake++ and created maildir with a .junkmail .lfs and .ipcop folder underneath. This receives email and also appears to filter some span leaving it in .junkmail with spam addedd as a prefix to the message subject. Also stuff like the following appears in teh message headers so that must be working:

-Spam-Status: No, hits=-0.8 required=6.0
Status: R
X-Status: N

This is fine although I need to adjust the scoring as some gets through. However I still have the folders I set up in kmail when using a flat Mail directory. I cannot see the procmail .lfs and .ipcop folders even when I remove the . I really want to use procmail to filter these and others but also access them from kmail.

Can anyone point me in the correct direction. I would also appreciate assistance with score tweaking. A lot of stuff on the web about this is fairly confusing. I think I have posted all the config which will help here but if not please ask for more. Once I have set this up I am going to do the same for user2.



Last edited by iihay; 05-26-2003 at 08:06 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix - procmail, fetchmail varun_saa Mandriva 3 09-11-2005 12:53 AM
fetchmail procmail spamassassin VincentB Linux - Software 4 08-24-2004 01:35 PM
fetchmail + KMail. oh and spamassassin graffitici Linux - Networking 0 01-23-2004 11:01 AM
good email setup? fetchmail -> procmail -> spamassassin -> evolution xmnemonic Linux - Software 0 10-12-2003 04:33 PM
IMAP and fetchmail / postfix / procmail / spamc etc... fordboy0 Linux - Networking 2 09-17-2003 07:51 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration