Parsing maillog postfix into a php Table

Filippo Gaudenzi
Filippo Gaudenzi used Ask the Experts™
on
I would like to make a parse of postfix mail log in an HTML/PHP page with a search bar and then creating a dynamic table with all these tags. when the table is done I should be able to click on the "Date" and another page should open with others info about that log *(2)

I will copy an example of a log

search: from: ...... to: ...... date: from: .... to: ....

Eg Table example: Date | time | from: Jack | to: John | status:

*(2)

client:
message
id:
Size:
relay:
delay(s)
status detail
KLMS:
av-reason:
ap-reason:
as-reason:
cf-reason:
action:
rules:



809318:Jul 11 14:13:50 amail-2014 postfix/smtpd[17127]: 78F5E83F28: client=mx0a-00164e02.pphosted.com[67.231.149.89]
809320:Jul 11 14:13:50 amail-2014 postfix/cleanup[18135]: 78F5E83F28: message-id=<ADR420000021230890209457A56BCF141EE799C64C575B380E1C@molex.com>
809324:Jul 11 14:13:50 amail-2014 postfix/qmgr[27711]: 78F5E83F28: from=<NO-REPLY@MOLEX.COM>, size=30390, nrcpt=1 (queue active)
809325:Jul 11 14:13:50 amail-2014 postfix/smtp[11782]: 78F5E83F28: to=<*****@SYLEX.SK>, relay=mail1.sylex.sk[195.168.126.227]:25, delay=0.73, delays=0.59/0/0.01/0.13, dsn=2.6.0, status=sent (250 2.6.0 <ADR420000021230890209457A56BCF141EE799C64C575B380E1C@molex.com> [InternalId=50607599648815, Hostname=SYXEX01.sylex.sk] Queued mail for delivery)
809326:Jul 11 14:13:50 amail-2014 postfix/qmgr[27711]: 78F5E83F28: removed
809323:Jul 11 14:13:50 amail-2014 KLMS: not processed: message-id="ADR420000021230890209457A56BCF141EE799C64C575B380E1C@molex.com": relay-ip="67.231.149.89": av-reason="whitelist", ap-reason="whitelist", as-reason="whitelist", cf-reason="whitelist": action="Skipped": rules="3": size=30154: mail-from="NO-REPLY@MOLEX.COM": rcpt-to="*****@SYLEX.SK"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
please specify what o/p you want based on your posfix log

Author

Commented:
sorry what is op im not from england?
I mean to say how you want to display the log.
Please insert some sample data from above example so that it would be better to understand or to provide you the script
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
here is a eg
Here is and Exemple of the table and when i click on Datum(date), eg July 11 it should open another page with others details like i wrote above
Its a big script i had written it long back.Hire some developer i could just give you a help on basic level. As this script would take time and effort

Author

Commented:
basicaly i have created on sqlite tables, now i need a php that reads /var/log/mail.log parse it and put it into the tables, and creates a dynamic table, i really dont know khow to create a dynamic table and make only the date but clickable, but its not a problem if the whole line is clickable
i already wrote some codes and phps but i dont know how to put them together

hope u understood
since you are the only one who aswered me and able to help me, maybe we could exchange mails

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial