Sometime exiqgrep exit with error Line mismatch when you try to remove emails with the -Mrm option
#exiqgrep -o 604800
Line mismatch: 170d 1IGLxw-0004Tw-Ne
You can remove the particular entry that errors out as follows.
# exim -bpru | grep “170d” | awk ‘{print $2}’
1IGLxw-0004Tw-Ne
1IGTFn-0000VM-UI
#exim -bpru | grep “170d” | awk ‘{print $2}’ | xargs -n 1 -P 20 exim -Mrm
You will see something like,
–
Spool data file for 1IGLxw-0004Tw-Ne does not exist
Spool data file for 1IGTFn-0000VM-UI does not exist
Continuing, to ensure all files removed
Continuing, to ensure all files removed
Message 1IGTFn-0000VM-UI has been removed or did not exist
Message 1IGLxw-0004Tw-Ne has been removed or did not exist
–
Nevermind, those messages should be removed now 🙂
Repeat the process until all the mal-formated entries are removed.
Did that work for you ?
Tags: Exim, exiqgrep, Line mismatch
January 24, 2009 at 11:36 am |
You can use such this script to delete all mails older than 1 day… It’s easy to modify the time ..
exim -bpru |awk ‘/</ && $1 ~ "^[1-9]d|^[0-9]+d"’ |egrep -o ‘.{6}-.{6}-.{2}’ |while read id; do exim -Mrm $id ; done
April 18, 2009 at 10:43 am |
Cool one a straight soln but quite difficult to guess 😉
September 25, 2009 at 7:56 pm |
just what I needed — thanks!
November 7, 2009 at 4:23 pm |
Thanks it worked for me as well.
January 3, 2010 at 11:31 am |
I tried the above commands several times but the error that i still got was
exim: malformed message id after -Mrm option
Is there any solution
September 7, 2010 at 7:41 am |
Thanks! it worked for me
April 22, 2011 at 2:40 pm |
thanks it’s work
April 22, 2011 at 3:32 pm |
[…] – Spool data file for 1IGLxw-0004Tw-Ne does not exist Spool data file for 1IGTFn-0000VM-UI does not exist Continuing, to ensure all files removed Continuing, to ensure all files removed Message 1IGTFn-0000VM-UI has been removed or did not exist Message 1IGLxw-0004Tw-Ne has been removed or did not exist Sumber : https://adminuser.wordpress.com/2008/01/16/exiqgrep-exit-with-error-line-mismatch/#comment-242 […]
April 2, 2012 at 7:36 am |
Worked perfectly for me.
Thanks
June 11, 2014 at 5:47 pm |
“xargs exim -Mrm” is much quicker than “xargs -n1 exim -Mrm”, because all the messages are deleted by a single process.
June 11, 2014 at 5:51 pm |
And, of course, with “xargs exim -Mrm” you don’t need “-P” which isn’t always supported.