Command line equivalent for...

4 posts Page 1 of 1
jols
Junior Member
Posts: 111
Joined: 08 May 2007, 04:43


What would be the command line equivalent for the following?

Delivery Queue
From does contain ".link"
Delete Emails

Thanks so much, coming up with a command line (where I could use different "contain" items) would literally save me hours per week.
jols
Junior Member
Posts: 111
Joined: 08 May 2007, 04:43


Possible? I am looking for the same kind of command line equivalent that can easily be generated with your other utility, eXploit Scanner, i.e. Generate CXS Commands. Except in this case I am not look for a front end feature like that, but more of a way to assemble a command line that contains the options I need.

I keep having to delete the same email messages over and over and over again, e.g. from [bounce], or from some "spam name" in the from that shows up again and again and again. I have to do this nightly just to keep the Delivery Queue from filling up with 10,000+ messages that our hosted members have already filtered out, and they are just sitting there.

So if I could just cron 5 or 6 command lines, this would save literally hundreds of hours of work per year having to do this via WHM per the manual method of working with the interface.

I know there must be a way to do this, as pretty much the way WHM works with server utilities is by calling some binary and just feeding it options, which can usually be done per the command line, ala the way your CSX utility works. So..... ?

Thanks very much for any assistance with this!
jols
Junior Member
Posts: 111
Joined: 08 May 2007, 04:43


I think I am getting very close with the following command:

exiqgrep -i|xargs exim -Mrm `grep -lr 'popularfastloans.com' /var/spool/exim/input | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g'` 2> /dev/null

But oddly, this seems to work on the Pending Queue, but not the Delivery Queue.

What's the trick here with this I wonder?
alsmith
Junior Member
Posts: 24
Joined: 10 Dec 2006, 13:13


I thought I would post this since I was needing something to help.
Code: Select all
# Check the Email Delivery queue for From [bounce] and delete them
exim -bpa -C /etc/exim_outgoing.conf | grep "<>" |awk -F" " '{print $3}' | while
 read line
do
     exim -C /etc/exim_outgoing.conf -Mrm $line
done
4 posts Page 1 of 1