Exim just doesn't work. It won't remove Bounce messages no matter what we try putting in the Exim config. I deal with this using CMQ but it adds HOURS to my week as we maintain multiple servers. I asked Configservers and they politely refused to assist since it is free software, and suggested I ask on this or the cPanel forum. I see that these questions have been asked over and over again on this forum, going back 8 years, and no one has provided a solution. So I am not optimistic... but maybe this time will be the one?
What I need is the code that can be run from the command line that will delete BOUNCE messages from the MailScanner queue. Right now this happens with a few radio buttons and checkboxes but I need to set it up so it runs at least daily. Unchecked, these grow to 2000+ messages every 24-48 hours. Multiplied by multiple servers and we are just spending WAY too much time cleaning out the queue because Exim refuses to do what it is told. Surely this is an easy request, if I knew enough to reverse-engineer the CMQ program I would have already done so to extract the command.
So has anybody found a way to do this yet?
Need (desperately) a cron job
Re: Need (desperately) a cron job
This is a lilttle script that may help
Code: Select all
#!/bin/sh
# removebounces.sh - remove bounce emails from email queue
# clear junk from queue
# remove all the [bounce] from the queue
echo "<br>Removing [bounce] emails from queue...";
/usr/sbin/exim -bpa | /bin/grep "<>" | /bin/awk -F" " '{print $3}' | while
read line
do
#/usr/sbin/exim -C /etc/exim_outgoing.conf -Mrm $line
/usr/sbin/exim -Mrm $line
done
echo "<br>Done Removing [bounce] emails from queue...";
Re: Need (desperately) a cron job
Nice one. Thanks Al
Re: Need (desperately) a cron job
This looks interesting. However, I use Mailscanner which moves the outbound queue to another instance of Exim.
Can someone please advise how to change the above script to refer to that instance of Exim?
Can someone please advise how to change the above script to refer to that instance of Exim?
Re: Need (desperately) a cron job
I will also like to delete emails from some addresses (these are autoresponses to spam which will never be delivered).
However, I will like to only delete the mails which are older than 2 hours.
Is it possible?
However, I will like to only delete the mails which are older than 2 hours.
Is it possible?
-
- Junior Member
- Posts: 1
- Joined: 18 Feb 2019, 13:13
Re: Need (desperately) a cron job
Interesting fix. I'll give it a try, since I'm having a similar problem.