Almost never ending mailqueue after migrating account

Since you say in the new release you will put them first the - ones and then the + ones.... does this make any difference in the working of Exim when putting the - ones first?
Because until now the + ones always were first as far as I can remember?
I believe that order makes no difference; I don't recall seeing documentation anywhere that it does. The reason mine is now a mixed order is simply because I've made changes over the years.

Please feel free to try and let us know :).

Jeff
 
I'll also do that now I dug into exim :-)

I finally removed the thousands of vacation messages from the customers inbox. If someone else has the same problem and finds this thread. Here's how I did it:

First disable the vacation message in DA.

Code:
cd /home/<account>/imap/<domain.tld>/<e-mailaccount name>/Maildir/cur/
find . -exec grep -l 'unique string in vacation message body' '{}' \; -delete
after that I had to give the mail queue a little push
Code:
exim -q -v

and I repeated the find and delete command a couple of time. Now all tenthousands of vacation messages are gone and the mail queue is empty and accessible again.

---

I am still curious to how this could have happened? When i check my exim.conf, there seems to be a filter against this kind of action. But the sender is not included as far as I can see.
Code:
uservacation:  # uservacation reply to all except errors, bounces, lists
  driver = accept
  condition = ${lookup{$local_part} lsearch {/etc/virtual/${domain}/vacation.conf}{yes}{no}}
  require_files = /etc/virtual/${domain}/reply/${local_part}.msg
  # do not reply to errors and bounces or lists
  senders = " ! ^.*-request@.*:\
              ! ^owner-.*@.*:\
              ! ^postmaster@.*:\
              ! ^listmaster@.*:\
              ! ^mailer-daemon@.*\
              ! ^root@.*"
  transport = uservacation
  unseen


userautoreply:
  driver = accept
  condition = ${lookup{$local_part} lsearch {/etc/virtual/${domain}/autoresponder.conf}{yes}{no}}
  require_files = /etc/virtual/${domain}/reply/${local_part}.msg
  # do not reply to errors and bounces or lists
  senders = " ! ^.*-request@.*:\
              ! ^owner-.*@.*:\
              ! ^postmaster@.*:\
              ! ^listmaster@.*:\
              ! ^mailer-daemon@.*\
              ! ^root@.*"
  transport = userautoreply
  unseen
 
Last edited:
@Jeff:
I've already got it running for a couple of years with + first and - laster. Working fine.:)

@ericovk:
Maybe messages got bounced over and over? There is a solution for that.
http://help.directadmin.com/item.php?id=145

However, it also could be something else.
Next to that, there is a command to delete all mail in the mailqueue for a certain receiver or sender.
I use this little script called empty-exim.sh which I found years ago, but is still working.

Code:
#!/bin/sh

if [ $1 ]; then
echo "`exim -bpru | tr '\n' + | sed -e "s/++/=/g" | tr -d + | tr = '\n' | grep "$1" | awk {'print $3'} | xargs exim -Mrm | wc -l` E-Mails deleted"
else
echo "If you want to delete ALL the `exim -bpc` E-Mails on mail queue, give this command:"
echo "exim -bpru | awk {'print $3'} | xargs exim -Mrm"
echo "or even better"
echo "exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash"
echo ""
echo "If you want to delete only mails with an specific sender/recipient, use:"
echo "$0 [sender/recipient]"
fi

Watch that first line, it's very long. But this way it's easy to delete specific users mails in the queue, works even with complete domain names.
 
Thanks for the link, but the messages aren't actually bouncing. I spoke to my customer today and she told me she had send an external mailing list, while she was also in her own list as recipient. She sends the mailing like it's from her own email. So basically she emailed herself and then the vacation messages gone wild.
Maybe there is a possibility to build in exim.conf that you cannot send an autoreply or vacation message to account where you have set the autoreply? I actually don't know how to script this... :(


Your piece of code could come in handy, but isn't it just deleting alle messages to a specific sender? In my case not only the vacation messages get deleted if I would have used it, but also the non-vacation messages. Thanks for sharing the code though :o
 
ut isn't it just deleting alle messages to a specific sender?
That depends on how you are using it. If you put an email adres in there, -all- mail with that email address will be removed, it's not restricted to certain kinds of emails (like only vacation emails).
But it can indeed come in very handy, especially when there is a lot of spam coming or going from one address and you need to remove it quickly.
I like sharing, so you're welcome!:)
 
I am still stuck with a more permanent solution. Can I edit the exim.conf so the vacation message isn't being send if recently a vacation message has been sent to that email address before?
In that way the clients inbox won't be flushed with her own vacation messages.
 
I don't use vacation messages myself, so I'm not sure of how often they are sent, and I can't find any reference with Google but it's my recollection that they're not sent for each email but only once daily. Am I wrong?

Jeff
 
I'm glad you found it. What you call my alter ego is a login I use when I want to reply to a thread or post a new one but don't have time to read all unread messages since my last login. I make it my business to read all posts on DirectAdmin forums (spend on average over an hour a day; sometimes much more) and if I log in using my nobaloney and then log out, the system often loses track of messages unread since my last visit.

Jeff
 
Back
Top