Command line mail m...
 
Notifications
Clear all

Command line mail monitoring

4 Posts
2 Users
2 Reactions
359 Views
(@hvillemoes)
Joined: 2 years ago
Posts: 12
Topic starter  

I use this primitive script to get a running display of the mail traffic:

#!/bin/bash

tail -100000f /var/log/carbonio.log | awk '/Passed CLEAN/ { print $1 " " $2 " " $3 " passed: " $12 " " $13 " " $14 " " $15 " " $16 }; /Blocked SPAM/ { print $1 " " $2 " " $3 " BLOCKED " $11 " " $12 " " $13 " " $14 };/blocked using/ { print $1 " " $2 " " $3 " BLOCKED USING: " $20 " " $16 " " $17 " " $18 " " $19 " " $21 " " $22 " " $23 " " $24 " " $25 " " $26 " " $27 " " $28 " " $29 " " $30 " " $31 " " $32 " " $33 " " $34 " " $34 " " $35 " " $36 " " $37 " " $38 " " $39 " " $40 " " $41 " " $42 " " $43 }'

Feel free to use and enhance.


   
Quote
(@hvillemoes)
Joined: 2 years ago
Posts: 12
Topic starter  

Sorry - the original script was the zimbra version. The Carbonio version is shorter:

#!/bin/bash

tail -100000f /var/log/carbonio.log | fgrep -v '127.0.0.1'| awk '/Passed CLEAN/ { print $1 " " $2 " " $3 " passed: " $13 " " $14 " " $15 " " $16 }'


   
ReplyQuote
(@max_s)
Joined: 1 year ago
Posts: 81
 

I tried this but I get nothing.

 

I upgraded from Carbonio CE 23.x to 24.3 with ubuntu 22.04 and your suggestion is not working. I tried you solution on an older log file (carbonio 23.x) of the carbonio.log and there it works. but not with the log it now gets from Carbonio 24.3

Do you know if the carbonio.log logfile is changed in 24.3 ?

 

 


   
ReplyQuote
(@max_s)
Joined: 1 year ago
Posts: 81
 

It works now. Tried to run it directly from cli but now in .sh file and it works. 

 


   
ReplyQuote