Find the answer to your Linux question:
Results 1 to 2 of 2
I often use the mailq command to see the queue on my Exim mail server. The queue is normally about 500-1000 emails long, due to the fact that there are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    16

    Mailq command - show most recent emails only


    I often use the mailq command to see the queue on my Exim mail server. The queue is normally about 500-1000 emails long, due to the fact that there are thousands of people using the server, and the emails stuck on the queue are having problems with delivery.

    I was wondering if there is some way that I can have the mailq command only show the very last screen of its results, without having to scroll through all of the emails that have been in the queue for hours, or days.

    I could then enter 'watch mailq' and see instant results of new emails coming and going from the mailq in real time.

    Any ideas on whether this is possible?

    Thanks

  2. #2
    Just Joined!
    Join Date
    Feb 2008
    Posts
    16
    Just thought I should let people know that I figured out an easy solution for this:
    exiqgrep -y 300

    The above command shows only those messages in the mailq that are younger than 300 seconds.
    I can now watch the mailq update live by doing:
    watch exiqgrep -y 300

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •