cat zimbra.log

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
txerra
Posts: 30
Joined: Sat Sep 13, 2014 3:11 am

cat zimbra.log

Post by txerra »

Hi
I would like to extract from zimbra.log file, something like this:

datetime /Email from / email to / email status ( sent or whatever ) / in not sent message error

Is there any script for that (zmmsgtrace has too many info ).


thank you in advance.
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Re: cat zimbra.log

Post by jorgedlcruz »

Hi txerra,
Or you apply some grep to your tail, or you use an external log system like graylog, or Elasticsearch, etc. Then you will be able to filter better.

Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
txerra
Posts: 30
Joined: Sat Sep 13, 2014 3:11 am

Re: cat zimbra.log

Post by txerra »

Hi Jorge
thank you

but, is there something common in all the traces of an email. ( something like message-id o something like that).
I think that always the first trace starts with: mail postfix/smtpd[75762]: NOQUEUE: filter: RCPT from

But, how can I know where is the last trece of this email?

I say something like
starts emailid xxx
...
...

..
ends emailid xxx


thank you Jorge.
User avatar
Raun
Advanced member
Advanced member
Posts: 75
Joined: Thu Mar 24, 2016 1:22 pm

Re: cat zimbra.log

Post by Raun »

Hi Txerra,

zmmsgtrace can help you trace a message from sender or receiver . I know this may not be what you are looking for but just putting it here in case you find it useful

zmmsgtrace [options] [<mail-syslog-file>...]

--id|i "msgid" # case sensitive regex
--sender|s "user@domain" # case insensitive regex
--recipient|r "user@domain" # case insensitive regex
--srchost|F "hostname_or_ip" # case insensitive regex
--desthost|D "hostname_or_ip" # case insensitive regex
--time|t "start_ts,end_ts" # YYYYMM[DD[HH[MM[SS]]]]
--year "YYYY" # file year if no YYYY in file
--nosort # do not sort @ARGV files by mtime
--debug verbose output useful for debugging
--help display a brief help message
--man display the entire man page

Where:
<mail-syslog-file> defaults to "/var/log/zimbra.log"

Files ending in '.gz', '.bz' or '.bz2' will be read using gzip or
bunzip2.
Post Reply