Reply to comment

Help with Postfix rule, PLEASE

I'm trying to get blockhosts.py working on my postfix mail log files. Can anyone help? I am NOT good with regex at all. Here is an example line I want to match:

Jul 21 18:42:30 okie1 postfix/smtpd[15919]: NOQUEUE: reject: RCPT from host2.absolute-hosting.net[209.239.36.202]: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table; from=<> to= proto=ESMTP helo=

Here is the rule I tried to write that doesn't work:

"Postfix": r"""postfix/smtpd\[\d+\].*? NOQUEUE: reject: RCPT from .*? \[(::ffff:)?(?P\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\],.*? """

ANY HELP WOULD BE APPRECIATED.

Thanks,
-Jon

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <b> <span> <pre> <hr>
  • Lines and paragraphs break automatically.
  • You may use [acidfree:xx] tags to display acidfree videos or images inline.
  • [l:URL text] input tags replaced with HTML links. URL may be Drupal internal path. [ Link Filter Tips ]

More information about formatting options