exiqgrep exit with error “Line mismatch”

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 ?

Advertisements

Tags: , ,

11 Responses to “exiqgrep exit with error “Line mismatch””

  1. Amr Hamdy Says:

    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

  2. Vasco Says:

    Cool one a straight soln but quite difficult to guess 😉

  3. val Says:

    just what I needed — thanks!

  4. r0ash Says:

    Thanks it worked for me as well.

  5. subha Says:

    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

  6. sadotmd Says:

    Thanks! it worked for me

  7. defomaz Says:

    thanks it’s work

  8. Exim Command Manual & Menggunakan ExiqGrep Script | Pusat Bantuan Pusat Hosting Says:

    […] – 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 […]

  9. LaiQue Says:

    Worked perfectly for me.

    Thanks

  10. Ian Eiloart Says:

    “xargs exim -Mrm” is much quicker than “xargs -n1 exim -Mrm”, because all the messages are deleted by a single process.

  11. Ian Eiloart Says:

    And, of course, with “xargs exim -Mrm” you don’t need “-P” which isn’t always supported.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: