Skip to content

Instantly share code, notes, and snippets.

@nareshov
Created March 26, 2011 10:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nareshov/be1b531485eaca695ab7 to your computer and use it in GitHub Desktop.
Save nareshov/be1b531485eaca695ab7 to your computer and use it in GitHub Desktop.
postfix patterns
# maillog stuff:
QUEUEID (?:[A-F0-9]+|NOQUEUE)
ADDRESSPART [a-zA-Z0-9_.+-]+
ADDRESS <%{ADDRESSPART:local}@%{ADDRESSPART:remote}>
RELAY (?:%{HOSTNAME}(?:\[%{IP:ip}\]:%{POSREAL:port})|none)
POSREAL [0-9]+(.[0-9]+)?
DELAYS %{POSREAL:a}/%{POSREAL:b}/%{POSREAL:c}/%{POSREAL:d}
DSN %{POSINT}.%{POSINT}.%{POSINT}
STATUS sent|deferred|bounced|expired
PERMERROR 5[0-9]{2}
RESPONSE %{DATA}
COMMAND %{DATA}
POSTFIXSMTPLOG %{SYSLOGBASE2} %{QUEUEID}: to=%{ADDRESS:to}, relay=%{RELAY:relay}, delay=%{POSREAL:delay}, delays=%{DELAYS}, dsn=%{DSN}, status=%{STATUS} \(%{DATA:reason}\)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment