procmail code help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers procmail code help
# 1  
Old 08-30-2006
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 folder instead of deleting only for testing purposes to make sure it is functioning correctly.

This is what I have

:0
* ! to:.*myemail@domain\.com.*
testdir/

Does this seem correct for what I want it to do?

Thanks,
DD
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Procmail and infinite loop

I wanted to copy (not forward but copy) all incoming email to another address of mine. It worked, but now I encountered an infinite loop problem: When the second address doesn't like the content and bounces the message back, the bounce message will be sent back and forth. So, what I have in... (1 Reply)
Discussion started by: distill
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

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

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

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
Mail::ListDetector(3pm) 				User Contributed Perl Documentation				   Mail::ListDetector(3pm)

NAME
Mail::ListDetector - Perl extension for detecting mailing list messages SYNOPSIS
use Mail::ListDetector; DESCRIPTION
This module analyzes mail objects in any of the classes handled by Email::Abstract. It returns a Mail::ListDetector::List object representing the mailing list. The RFC2369 mailing list detector is also capable of matching some Mailman and Ezmlm messages. It is deliberately checked last to allow the more specific Mailman and Ezmlm parsing to happen first, and more accurately identify the type of mailing list involved. METHODS
new This method is the core of the module. Pass it a mail object, it will either return a Mail::ListDetector::List object that describes the mailing list that the message was posted to, or "undef" if it appears not to have been a mailing list post. register_plugin($plugin_name) Registers a new plugin module that might recognise lists. Should be a subclass of Mail::ListDetector::Detector::Base, and provide the same interface as the other detector modules. You can eval arbitrary perl code with this, so don't do that if that's not what you want. EMAILS USED
This module includes a number of sample emails from various mailing lists. In all cases, mails are used with permission of the author, and must not be distributed separately from this archive. If you believe I may have accidentally used your email or content without permission, contact me, and if this turns out to be the case I will immediately remove it from the latest version of the archive. BUGS
o A lot of the code applies fairly simple regular expressions to email address to extract information. This may fall over for really weird email addresses, but I'm hoping no-one will use those for names of mailing lists. o The majordomo and smartlist recognisers don't have much to go on, and therefore are probably not as reliable as the other detectors. This is liable to be hard to fix. o Forwarding messages (for example using procmail) can sometimes break the "Sender: " header information needed to recognise some list types. AUTHORS
o Michael Stevens - michael@etla.org. o Andy Turner - turner@mikomi.org. o Adam Lazur - adam@lazur.org. o Peter Oliver - p.d.oliver@mavit.freeserve.co.uk o Matthew Walker - matthew@walker.wattle.id.au o Tatsuhiko Miyagawa - miyagawa@bulknews.net o johnnnnnn - john@phaedrusdeinus.org o Mik Firestone - mik@racerx.homedns.org o Simon Cozens - simon@simon-cozens.org SEE ALSO
perl(1). The Mail::Audit::List module, which is a convenient way of using Mail::Audit and Mail::ListDetector together. perl v5.10.1 2010-06-30 Mail::ListDetector(3pm)