iowaprogrammer
ISP
Running a fairly simple script but not sure how to get the script to display the missing data encapsulated between the < > brackets. I would like to have the page display the results as returned.
Expected results
Apr 18 23:20:25 isp.com postfix/local[4431]: [ID 197553 mail.info] BAD854989F: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.49, delays=0.1/0.01/0/0.39, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:39:03 isp.com postfix/local[11497]: [ID 197553 mail.info] AB1B545964: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.49, delays=0.1/0.01/0/0.38, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:11:04 isp.com postfix/local[21399]: [ID 197553 mail.info] 001A245E12: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.48, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:15:11 isp.com postfix/local[21041]: [ID 197553 mail.info] 45D6A45EBC: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.47, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
As output is displayed in the web it drops the <> information such as to= from=
Apr 18 23:07:17 isp.com postfix/local[21319]: [ID 197553 mail.info] DA43D45541: to=, relay=local, delay=0.22, delays=0.13/0.01/0/0.08, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:11:03 isp.com postfix/local[4619]: [ID 197553 mail.info] 2701449729: to=, orig_to=, relay=local, delay=0.5, delays=0.1/0.01/0/0.4, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:20:25 isp.com postfix/local[4431]: [ID 197553 mail.info] BAD854989F: to=, orig_to=, relay=local, delay=0.49, delays=0.1/0.01/0/0.39, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:39:03 isp.com postfix/local[11497]: [ID 197553 mail.info] AB1B545964: to=, orig_to=, relay=local, delay=0.49, delays=0.1/0.01/0/0.38, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:11:04 isp.com postfix/local[21399]: [ID 197553 mail.info] 001A245E12: to=, orig_to=, relay=local, delay=0.48, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:15:11 isp.com postfix/local[21041]: [ID 197553 mail.info] 45D6A45EBC: to=, orig_to=, relay=local, delay=0.47, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
PHP script
Expected results
Apr 18 23:20:25 isp.com postfix/local[4431]: [ID 197553 mail.info] BAD854989F: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.49, delays=0.1/0.01/0/0.39, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:39:03 isp.com postfix/local[11497]: [ID 197553 mail.info] AB1B545964: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.49, delays=0.1/0.01/0/0.38, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:11:04 isp.com postfix/local[21399]: [ID 197553 mail.info] 001A245E12: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.48, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:15:11 isp.com postfix/local[21041]: [ID 197553 mail.info] 45D6A45EBC: to=<name@isp>, orig_to=<name@isp>, relay=local, delay=0.47, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
As output is displayed in the web it drops the <> information such as to= from=
Apr 18 23:07:17 isp.com postfix/local[21319]: [ID 197553 mail.info] DA43D45541: to=, relay=local, delay=0.22, delays=0.13/0.01/0/0.08, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:11:03 isp.com postfix/local[4619]: [ID 197553 mail.info] 2701449729: to=, orig_to=, relay=local, delay=0.5, delays=0.1/0.01/0/0.4, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:20:25 isp.com postfix/local[4431]: [ID 197553 mail.info] BAD854989F: to=, orig_to=, relay=local, delay=0.49, delays=0.1/0.01/0/0.39, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 18 23:39:03 isp.com postfix/local[11497]: [ID 197553 mail.info] AB1B545964: to=, orig_to=, relay=local, delay=0.49, delays=0.1/0.01/0/0.38, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:11:04 isp.com postfix/local[21399]: [ID 197553 mail.info] 001A245E12: to=, orig_to=, relay=local, delay=0.48, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Apr 19 00:15:11 isp.com postfix/local[21041]: [ID 197553 mail.info] 45D6A45EBC: to=, orig_to=, relay=local, delay=0.47, delays=0.1/0.01/0/0.37, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
PHP script
Code:
<?php
$output = shell_exec('grep name@isp /archive/isp/tools/log/maillog.0');
echo "<pre>$output</pre>";
?>