Forum Moderators: coopster

Message Too Old, No Replies

parse /var/maillog for 550

         

mbhmirc1

6:47 pm on Aug 5, 2006 (gmt 0)

10+ Year Member



I'm looking for something that'll parse /var/maillog for 550 messages and store them either in mysql or a text file so i can remove them from my mailing list (since there obviously dead). Is there any scripts to do this?

coopster

6:28 pm on Aug 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, mbhmirc1.

Sounds like a custom job to me. Have you considered parsing the log file yourself using PHP? pseudocode:

  1. Open the file and read it into memory, each line being a "row"
  2. parse the line into columns
  3. write the columns to your database table

Romeo

2:00 pm on Aug 7, 2006 (gmt 0)

10+ Year Member



Something like
grep 550 /var/maillog > output.txt

Perhaps with a better search argument like, " 550 " or "status=550" or in whatever context that 550 appears in the log.

Kind regards,
R.