Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a command within exim4 (4.70-4.71) package (ubuntu) to display the message-id (exim's message-id) of delivered messages? (shows as Completed in /var/log/exim4/mainlog) ?

there is a exim4 -bpu command for undelivered ones.

Purpose: Tell and proof user that his mail was accepted by remote smtp and all problems are not our's :) Size of log ~ 100 MB per day.

share|improve this question
Out of curiosity: why do you actually need this? – Aron Rotteveel Apr 17 '11 at 16:17
up vote 2 down vote accepted

As far as I know, there is no builtin command for this, but you could simply use grep and awk:

grep Completed /var/log/exim4/mainlog | awk '{print $3}'

Which should turn this:

2011-04-17 18:03:58 1QBUS6-0004Gc-1p Completed
2011-04-17 18:04:19 1QBUSQ-0004Lp-LT Completed
2011-04-17 18:05:16 1QBUTM-0004hP-Da Completed
2011-04-17 18:05:33 1QBUTd-0004jB-1M Completed
2011-04-17 18:08:23 1QBUWN-00052T-2E Completed
2011-04-17 18:09:39 1QBUXb-0005Co-Gc Completed
2011-04-17 18:09:51 1QBUXn-0005G0-6L Completed
2011-04-17 18:10:30 1QBUYQ-0005Jo-47 Completed

...into this:

share|improve this answer
Yeah, it is first that gets on mind. But this will parse this log , full log of some hundred MB eachtime. Ive been looking into perl script with File::Tail for this purpose. – MealstroM Apr 18 '11 at 6:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.