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.

link|improve this question

Out of curiosity: why do you actually need this? – Aron Rotteveel Apr 17 '11 at 16:17
feedback

1 Answer

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:

1QBUS6-0004Gc-1p
1QBUSQ-0004Lp-LT
1QBUTM-0004hP-Da
1QBUTd-0004jB-1M
1QBUWN-00052T-2E
1QBUXb-0005Co-Gc
1QBUXn-0005G0-6L
1QBUYQ-0005Jo-47
link|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
feedback

Your Answer

 
or
required, but never shown

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