Originally written for Novell Netware V6.5.  I ported about 55% of the code to Linux.

Runs on Linux 64 bit; compiled on openSUSE 13.2 with gcc.

Download here PBRelay Build 0068

  • Found bug if SMTP server in not found.
  • Added exceptions for reverse lookup domains that do not match in PBRelay.cfg.
  • Added not allow domains in PBRelay.cfg file.
  • Fixed thread not shutting down bug.
  • Added MX lookup for ehelo domain
  • Wednesday, March 9, 2016 5:18 pm

Up Next

11.28.2015

I am adding whois lookup for domain names.  It seems many of the SPAM email servers have protected accounts.  I am just figuring out what to do.


Installation

my default installation directories

/opt/PBRelay

/opt/PBRelay/logs

place binary file PBRelay in /opt/PBRelay directory

place PBRelay.cfg file in /etc/PBRelay.cfg

crontab

job to remove files once a day that are more than 7 days old

0 3 * * * find /opt/PBRelay/logs -name '*' -mtime +7 -exec rm {} \;


PBRelay.cfg file

##################
# File: /etc/PBRelay.cfg
# http://www.pbsoftware.com
#
####################
# MAXTHREADS sets the max threads that pbrelay will create.
#
MAXTHREADS=10

####################
# DNS servers PBRelay.NLM uses for rbl Check
#                    and soon other validations.
DNS=123.123.123.11
DNS=123.123.123.13
#
# Turn on RBL Checks
#
CLIENTCHECK=B
RBLCHECK=N
RBLSERVICE=zen.spamhaus.org
RBLSERVICE=spam.dnsbl.sorbs.net
RBLSERVICE=bl.spamcop.net

####################
# Allow the following mail servers in, must match EHELO and reverse lookup
EXCEPTION=outbound.protection.outlook.com
EXCEPTION=fedex.com
EXCEPTION=aol.com
EXCEPTION=apple.com
#
NEVERALLOW=.top


Startup command line

./PBRelay name=firebird.stpeterchanel.com relay=24.144.152.190 dport=8088

./PBRelay : PB Relay application
name=    : EHLO answer name; required but not used.
relay=     : IP Address of destination server ; required
dport=     : destination server port number ; not required; default 25
bind=      : ip address to bind to ; not required
port=       : default listening port; not required; default 25 

This is a console application right now. use screen to detach from console

screen ./PBRelay name=firebird.stpeterchanel.com relay=24.144.152.188 dport=9099

to detach
control + a d

to reattach
screen -r