Solved

receive email

Posted on 2012-03-22
1
372 Views
Last Modified: 2012-03-23
Hello there,
I have a little script that checks the subject of the email and if its blacklisted it would not deliver the email.. the issue here is that I am trying to blacklist an email subject but each time I get a forum message from a different user it wont work because its different.. here's what I have

[(04:34 PM)][(root@dedico)] [(/home/admin)] $ cat .procmailrc
LOGFILE=$HOME/procmail.log
VERBOSE="on"
:0
*^Subject: (spammingEmails|sent you comment|posted a message)
/dev/null
:0
! myemail@gmail.com


[(04:36 PM)][(root@server)] [(/home/admin)] $ cat procmail.log
procmail: [28023] Thu Mar 22 16:34:59 2012
procmail: No match on "^Subject: (spammingEmails|sent you comment|posted a message)"
procmail: Executing "/usr/sbin/sendmail,-oi,myemail@gmail.com"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi myemail@gmail.com"
procmail: Notified comsat: "admin@:/usr/sbin/sendmail -oi myemail@gmail.com"
From noreply@mysite.com  Thu Mar 22 16:34:59 2012
 Subject: Joseph posted a message
  Folder: /usr/sbin/sendmail -oi myemail@gmail.com

Open in new window

0
Comment
Question by:XK8ER
1 Comment
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 37755912
Note your recipe does not account for the user who
The recipe

:0H
*^Subject: .* (spammingEmail|sent you comment|posted a message)
/dev/null

Your redirect
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now