I would like to extract from my /var/log/maillog files the "From" and "To" entries from my sendmail log file.
I am not good in shell script, since the "From" and "To" is on two separate lines, I am okay with grep but I can only get either "From" or "To".
I would like something like below or close to it
Date/time - From
user@domain.com To
user@dest.domain.com
Date/time - From
user@domain.com To
user@dest.domain.com
Is there any ready script that some expert have done?
I search google and found log analyzer which gave me statistics which is not what I want.
Thank you in advance.