Procmail script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Procmail script
# 1  
Old 01-28-2009
Procmail script

Hi,

I need to write a procmail script such that:

- incoming email is scanned to see if it is spam
- if spam deliver to spam folder
- otherwise deliver to inbox and send a copy to another address.

So far I have:

Code:
:0
* ^Subject:.*SPULK
DUMB

I can make a new recipe on to forward mail to the user's inbox and the other address. Since if it is not spam, procmail will just read the next receipe. If it is SPAM procmail will just execute what is in the first recipe and then get out of .procmailrc

Last edited by mojoman; 01-28-2009 at 05:09 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with SendMail Procmail filtering

Hi All, I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9. I need to filter incoming emails based on the sender's email address or domain and forward them to another address on a different domain as well as to the original recipient. Can I achieve this with... (1 Reply)
Discussion started by: simplemind
1 Replies

2. UNIX for Dummies Questions & Answers

Procmail

Hi, I have a few questions. I am new to UNIX/Linux. At work I notice that our mail server uses sendmail. When I looked in the sendmail.cf file I see that it is using PROCMAIL as the Local Delivery Agent. Questions:- I looked for /etc/procmail to see its configuration file but I see none.... (0 Replies)
Discussion started by: mojoman
0 Replies

3. UNIX for Dummies Questions & Answers

a few questions about procmail

Hello, I am running a email server on Centos 5.3 (dovecot, postfix, with emails for a few domains) and I am wondering whether I am using procmail or not. I know procmail is installed because procmail -version returns: Locking strategies: dotlocking, fcntl() Default rcfile: ... (0 Replies)
Discussion started by: JCR
0 Replies

4. UNIX for Dummies Questions & Answers

Procmail or Spamassassin?

Hello, this is my first visit to your forum and I've searched previous threads for my answer but have not been able to find one. Apologies if there is one that I didn't discover. Is there a way of bouncing or deleting spam that contains non-existent addresses in TO: field but is delivered due... (1 Reply)
Discussion started by: WendyTinley
1 Replies

5. Shell Programming and Scripting

Help with procmail mailing list

I need to find out for sure whether or not Solaris 10x86 comes with procmail installed? I only need it for mail subscription "Only" WE have about 51 mailing lists subscriptions from listproc. I need help just doing mailing lists. How to best go about this? I downloaded version for Solaris... (0 Replies)
Discussion started by: parente
0 Replies

6. UNIX for Dummies Questions & Answers

procmail code help

Hello, I was wondering if my code is correct on a procmail recipe I am trying to use. I am trying to set up custom filter for for my email address. What needs to happen is any email NOT addressed to me in the to: or cc: field is deleted. For the time being it is set it up to go to another... (0 Replies)
Discussion started by: Hexabah
0 Replies

7. Email Antispam Techniques and Email Filtering

procmail rule

I can tell this is not a recently active formum, but here goes, "why doesn't this procmail rule block messages with víagra or v1agra appearing in the subject header :0 * ^Subject:.*(víagra¦v1agra¦pénis¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz) { LOG="(THE 7 DIRTY WORDS) " :0 ... (4 Replies)
Discussion started by: jones
4 Replies

8. Email Antispam Techniques and Email Filtering

help requested: procmail receipes

Hello all. I want some help procmail receipe. I tried to get some mails' sender and receiptient. Then tried to send them a bash script. But it didnot work. I try a lot of variation of the below receipe. Could anyone can help what is wrong on my receipe? Or if the recepie is correct what can be... (0 Replies)
Discussion started by: kedi
0 Replies

9. UNIX for Dummies Questions & Answers

Procmail filter

Hello, I want to make a filter with procmail, using the day of the week ant the hour to filter the message. If the day is Tuesday, the message is redirected to one address. On the other days, the message goes to another address. The messages will be redirected at 8 am to 17 pm. I tried... (1 Reply)
Discussion started by: luiz_fer10
1 Replies

10. UNIX for Dummies Questions & Answers

Procmail Tutorial

Hello, Somebody knows a good procmail tutorial in the net? Thanks!:) (1 Reply)
Discussion started by: luiz_fer10
1 Replies
Login or Register to Ask a Question
BOGOTUNE(1)						    Bogofilter Reference Manual 					       BOGOTUNE(1)

NAME
bogotune - find optimum parameter settings for bogofilter SYNOPSIS
bogotune [-v] [-c config] [-C] [-d dir] [-D] [-r value] [-T value] -n okfile [[-n] okfile [...]] -s spamfile [[-s] spamfile [...]] [-M file] bogotune [-h] DESCRIPTION
Bogotune tries to find optimum parameter settings for bogofilter. It needs at least one set each of spam and non-spam messages. The production wordlist is normally used, but it can be directed to read a different wordlist, or to build its own from half the supplied messages. In order to produce useful results, bogotune has minimum message count requirements. The wordlist it uses must have at least 2,000 spam and 2,000 non-spam in it and the message files must contain at least 500 spam and 500 non-spam messages. Also, the ratio of spam to non-spam should be in the range 0.2 to 5. If you direct bogotune to build its own wordlist, it will use the half the input or 2000 messages (whichever is larger) for the wordlist. Message files may be in mbox, maildir, or MH folder or any combination. Msg-count files can also be used, but not mixed with other formats. OPTIONS
The -h option prints the help message and exits. The -v option increases the verbosity level. Level 1 displays the scan output in detail instead of using a progress meter. The -c filename option tells bogofilter to read the config file named. The -C option prevents bogotune from reading a configuration file. The -d dir option specifies the directory for the database. See the ENVIRONMENT section for other directory setting options. The -D option tells bogotune to build a wordlist in memory using the input messages. The messages are read and divided into two groups. The first group is used to build a wordlist (in ram) and the second is used for tuning. To meet the minimum requirements of 2000 messages in the wordlist and 500 messages for testing, when -D is used, there must be 2500 non-spam and 2500 spam in the input files. If there are enough messages (more than 4000), they will be split evenly between wordlist and testing. Otherwise, they will be split proportionately. The -n option tells bogotune that the following argument is a file (or folder) containing non-spam. Since version 1.0.3, multiple arguments to the -n option can be given. All non-option arguments until the next -s option will be treated as though they had been preceded by -n The -s option tells bogotune that the following argument is a file (or folder) containing spam. It can be repeated as often as necessary. Since version 1.0.3, multiple arguments to the -s can be given. All non-option arguments until the next -n option will be treated as though they had been preceded by -s. The -r value option tells bogotune to use the following parameter as the robx value. The -T value option tells bogotune to use the following parameter as fp target value. The -M file option tells bogotune to convert the file to message count format. This format provides a sorted list of each message's unique tokens, along with their ham and spam counts. Sorting hides the sense of the messages quite effectively, thus protecting privacy. The message-count format allows bogotune and bogofilter to score messages quickly without needing the original token database. ENVIRONMENT
Bogofilter uses a database directory, which can be set in the config file. If not set there, bogofilter will use the value of BOGOFILTER_DIR. Both can be overridden by the -ddir option. If none of that is available, bogofilter will use directory $HOME/.bogofilter. BUGS
Bogotune is not particularly robust when presented with garbage input. AUTHOR
The bogofilter developer team. For updates, see the bogofilter project page[1]. SEE ALSO
bogofilter(1), bogolexer(1), bogoupgrade(1), bogoutil(1) NOTES
1. the bogofilter project page http://bogofilter.sourceforge.net/ Bogofilter 10/22/2012 BOGOTUNE(1)