Solved

receive email

Posted on 2012-03-22
1
376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 78

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

762 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