Mikmikmikmik
New Member
I have this but grep is not returning the from line. It is something to do with the relay= part of the line.
If I modify it to say relay=exampleXXX111.examplf.ex.examplf.com, it outputs the line just fine.
There are other ways to get this info, but I would like an explanation for this specific example.
Thanks.
echo "Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX111.examplf.ex.example.com [10.100.10.10]" | grep -v "to=.*\.example\.com"
NO OUTPUT
echo "Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX112.examplf.ex.examplf.com [10.100.10.10]" | grep -v "to=.*\.example\.com"
OUTPUT:
Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX112.examplf.ex.examplf.com [10.100.10.10]
Thanks.
If I modify it to say relay=exampleXXX111.examplf.ex.examplf.com, it outputs the line just fine.
There are other ways to get this info, but I would like an explanation for this specific example.
Thanks.
echo "Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX111.examplf.ex.example.com [10.100.10.10]" | grep -v "to=.*\.example\.com"
NO OUTPUT
echo "Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX112.examplf.ex.examplf.com [10.100.10.10]" | grep -v "to=.*\.example\.com"
OUTPUT:
Apr 4 05:00:24 example sendmail[3365]: x3440OxC003366: from=<[email protected]>, size=10181, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=exampleXXX112.examplf.ex.examplf.com [10.100.10.10]
Thanks.