Skip to content

Instantly share code, notes, and snippets.

View olksdr's full-sized avatar
🤖
Change is the essential process of all existence

Alexander olksdr

🤖
Change is the essential process of all existence
  • ~#
View GitHub Profile

Keybase proof

I hereby claim:

  • I am olksdr on github.
  • I am olksdr (https://keybase.io/olksdr) on keybase.
  • I have a public key ASAxbiWvhOSFPG0PNQIKUbJ0ctFVjdjrJ483qpBYKnwqggo

To claim this, I am signing this object:

@olksdr
olksdr / gist:be301d16d14a1bc569b8
Created December 4, 2014 06:38
Postfix grok patterns
QUEUEID (?:[A-F0-9]+|NOQUEUE)
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote}
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?)
POSREAL [0-9]+(.[0-9]+)?
DELAYS (%{POSREAL}[/]*)+
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT}
STATUS sent|deferred|bounced|expired
PERMERROR 5[0-9]{2}
MESSAGELEVEL reject|warning|error|fatal|panic
@olksdr
olksdr / send_mail.sh
Created October 30, 2014 15:12
A simple script to send a mail and check for the exports
#!/bin/bash
mail=$1
exec 3<>/dev/tcp/e3qa2-pmta1/25
echo -ne "helo example.com\r\n" >&3
echo -ne "mail from: test@example.com\r\n" >&3
echo -ne "rcpt to: $mail\r\n" >&3
echo -ne "data\r\n" >&3
@olksdr
olksdr / spam_recovery.pl
Created October 9, 2014 08:47
A small ad-hoc script for spamcomplains recovery from pmta accounting files. Takes files one by one as input to STDIN
#!/usr/bin/env perl
use strict;
use warnings;
use 5.016;
use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error);
while(<>) {
@olksdr
olksdr / bounce_recover_fork.pl
Last active November 22, 2024 09:56
A simple ad-hoc script to parse pmta accounting files to recover bounces..
#!/usr/bin/env perl
use feature qw(say);
use strict;
use warnings;
use utf8;
use 5.16.0;
use IO::Handle;
use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error);