Solved

receive email

Posted on 2012-03-22
1
374 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 77

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

810 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