Sponsored Content
Full Discussion: procmail rule
Top Forums UNIX for Beginners Questions & Answers Answers to Frequently Asked Questions Email Antispam Techniques and Email Filtering procmail rule Post 47583 by jones on Thursday 12th of February 2004 10:41:36 PM
Old 02-12-2004
[rephrased question: how do you filter 8-bit characters in the subject header via procmail?

It cooks on the í which I believe to be an extended ASCII 161
Note that is an 8-bit character.

This rule breaks on a message with Subject: víagra

:0
* ^Subject:.*(víagra¦v1agra¦pénis¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz)
{
LOG="(THE 7 DIRTY WORDS) "
:0
/dev/null
}

[procmailLOG] --note the Subject header is garbage.
From jones@justjones.edu Thu Feb 12 21:10:19 2004
Subject: =?ISO-8859-1?Q?Fwd:_v=EDagra?=
Folder: /var/spool/mail/jones

This rule works [7-bit ASCII only] with Subject: v1agra

:0
* ^Subject:.*(v1agra¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz)
{
LOG="(THE 7 DIRTY WORDS --) "
:0
/dev/null
}

[procmailLOG]
(THE 7 DIRTY WORDS) From jones@justjones.edu Thu Feb 12 21:03:30 2004
Subject: Fwd: v1agra
Folder: /dev/null

for the record, the word has to be spelled wrong to get on my
7 dirty words list note the zeros insted of O's in prescript0n
reference George Carlin, 1970's, "The 7 Dirty Words"
v\íagra doesn't work either.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. UNIX for Advanced & Expert Users

using procmail to filter content

Hi i would like to find out how can i write a procmail rule to filter based on the email content.i was unable to locate any similar threads that does filtering based on the content.would appreciate any pointers. thanks:0 * ^From: Machine1 <machine1@aaa.com> # i will have a string "machine1.log"... (1 Reply)
Discussion started by: new2ss
1 Replies

5. UNIX and Linux Applications

procmail configuration pronblem?

Hi, I am using "procmail" for triggering an application job which is doing some database operations.The Home directory for my application script has the permissions 2771 which is a policy recommendation. As we know procmail won't accept it's default configuration file $HOME/.procmailrc if... (1 Reply)
Discussion started by: DILEEP410
1 Replies

6. Shell Programming and Scripting

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: :0 * ^Subject:.*SPULK DUMB I can make a new recipe on to forward mail... (0 Replies)
Discussion started by: mojoman
0 Replies

7. UNIX for Dummies Questions & Answers

procmail, backup, ftp

Hello, On a remote server with Centos 5.0, I am running procmail At /var/mail/vhosts/, I can find all the accounts and I was thinking of saving those files on my local machine using ftp. The structure is right and the files containing the emails (most of them stored in the cur folders) appear... (1 Reply)
Discussion started by: JCR
1 Replies

8. 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

9. 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

10. 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
vacation(1)                                                        User Commands                                                       vacation(1)

NAME
vacation - reply to mail automatically SYNOPSIS
vacation [-I] vacation [-a alias] [-e filter_file] [-f database_file] [-j] [-m message_file] [-s sender] [-tN] username DESCRIPTION
The vacation utility automatically replies to incoming mail. Installation The installation consists of an interactive program which sets up vacation's basic configuration. To install vacation, type it with no arguments on the command line. The program creates a .vacation.msg file, which contains the message that is automatically sent to all senders when vacation is enabled, and starts an editor for you to modify the message. (See USAGE sec- tion.) Which editor is invoked is determined by the VISUAL or EDITOR environment variable, or vi(1) if neither of those environment vari- ables are set. A .forward file is also created if one does not exist in your home directory. Once created, the .forward file will contain a line of the form: One copy of an incoming message is sent to the username and another copy is piped into vacation: username, "|/usr/bin/vacation username" If a .forward file is present in your home directory, it will ask whether you want to remove it, which disables vacation and ends the installation. The program automatically creates .vacation.pag and .vacation.dir, which contain a list of senders when vacation is enabled. Activation and Deactivation The presence of the .forward file determines whether or not vacation is disabled or enabled. To disable vacation, remove the .forward file, or move it to a new name. Initialization The -I option clears the vacation log files, .vacation.pag and .vacation.dir, erasing the list of senders from a previous vacation session. (See OPTIONS section.) Additional Configuration vacation provides configuration options that are not part of the installation, these being -a, -e, -f, -j, -m, -s, and -t. (See OPTIONS section.) OPTIONS
The following options are supported: -I Initializes the .vacation.pag and .vacation.dir files and enables vacation. If the -I flag is not specified, and a user argument is given, vacation reads the first line from the standard input (for a From: line, no colon). If absent, it produces an error mes- sage. Options -a, -e, -f, -j, -m, -s, and -t are configuration options to be used in conjunction with vacation in the .forward file, not on the command line. For example, username, "|/usr/bin/vacation -t1m username" repeats replies to the sender every minute. -a alias Indicates that alias is one of the valid aliases for the user running vacation, so that mail addressed to that alias generates a reply. -e filter_file Uses filter_file instead of .vacation.filter as the source of the domain and email address filters. -f database_file Uses database_file instead of .vacation as the base name for the database file. -j Does not check whether the recipient appears in the To: or the Cc: line. Warning: use of this option can result in vacation replies being sent to mailing lists and other inappropriate places; its use is therefore strongly discour- aged. -m message_file Uses ~/message_file as the message to send for the reply instead of ~/.vacation.msg. message_file is a relative path to the desired vacation message file. To prevent directory/file "not found" errors, message_file should be on the same disk partition as ~/.forward. -s sender Replies to sender instead of the value read from the UNIX From line of the incoming message. -tN Changes the interval between repeat replies to the same sender. The default is 1 week. A trailing s, m, h, d, or w scales N to seconds, minutes, hours, days, or weeks, respectively. USAGE
.vacation.msg should include a header with at least a Subject: line (it should not include a To: line). For example: Subject: I am on vacation I am on vacation until July 22. If you have something urgent, please contact Joe Jones (jones@fB0). --John If the string $SUBJECT appears in the .vacation.msg file, it is replaced with the subject of the original message when the reply is sent. Thus, a .vacation.msg file such as Subject: I am on vacation I am on vacation until July 22. Your mail regarding "$SUBJECT" will be read when I return. If you have something urgent, please contact Joe Jones (jones@fB0). --John will include the subject of the message in the reply. No message is sent if the To: or the Cc: line does not list the user to whom the original message was sent or one of a number of aliases for them, if the initial From line includes the string -REQUEST@, or if a Precedence: bulk or Precedence: junk line is included in the header. vacation will also not respond to mail from either postmaster or Mailer-Daemon. In addition to the above criteria, if a .vacation.filter file exists, it is used to constrain further the set of addresses to which a reply is sent. Each line in that file should be either a domain name or an email address. If the incoming sender address matches one of the lines in the file, a reply is sent. If no lines match, no reply is sent. For lines containing an email address, the match must be exact, except for case, which is ignored. For lines containing a domain name, the sender address must be either something@domain-name or something@some- thing.domain-name. A sample filter file might look like the following: sun.com mydomain.com onefriend@hisisp.com anotherfriend@herisp.com Note: Blank lines and lines starting with "#" are ignored. FILES
~/.forward ~/.vacation.filter ~/.vacation.msg A list of senders is kept in the dbm format files .vacation.pag and .vacation.dir in your home directory. These files are dbm files and cannot be viewed directly with text editors. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsndmu | +-----------------------------+-----------------------------+ SEE ALSO
vi(1), sendmail(1M), dbm(3UCB), getusershell(3C), aliases(4), shells(4), attributes(5) SunOS 5.10 19 Mar 2004 vacation(1)
All times are GMT -4. The time now is 09:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy