Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

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
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
add comment

Your Answer

 
discard

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.