Good catch!

Mine is in this format:
Oct 10 11:30:36

-----Original Message-----
From: Jaroslaw Rafa via Postfix-users <postfix-users@postfix.org> 
Sent: Thursday, October 10, 2024 11:28 AM
To: postfix-users@postfix.org
Subject: [pfx] Re: filtering maillog events from yesterday

CAUTION: This email was sent from an external sender. Do not click links or 
open attachments unless you recognize the sender and know the content is safe.

Dnia 10.10.2024 o godz. 15:12:53 Gomes, Rich via Postfix-users pisze:
> I am trying to "trap" certain errors\events in the maillog and send them as a 
> daily report.
> The issue I am having is only trapping the errors from the last 24 hours.
> Here is of the events I am trying, which doesnt show any data when trying to 
> filter the last 24 hours. Removing that displays all the data.
>
>
> sudo grep $(date +"%Y-%m-%d") /var/log/maillog | grep "connect from" | 
> awk '{print $1,$2,$8;}' | sort | uniq -c | sort -nr | head -500

Does your /var/log/maillog *really* contain dates in "%Y-%m-%d" format?
Because mine contains only like "Oct 10" at the beginning.
--
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there was 
a Hushpuppy, and she lived with her daddy in the Bathtub."
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an 
email to postfix-users-le...@postfix.org
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to