Page 1 of 1

Command line equivalent for...

Posted: 27 Sep 2014, 08:16
by jols
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.

Re: Command line equivalent for...

Posted: 30 Sep 2014, 08:53
by jols
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!

Re: Command line equivalent for...

Posted: 30 Sep 2014, 10:36
by jols
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?

Re: Command line equivalent for...

Posted: 17 Feb 2015, 18:15
by alsmith
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