SMTP Redirector

On smtp redirector (VPS):
	Set up dkim, dmarc, etc
	Point domain name on dreamhost here

ServerSetup.sh
https://github.com/n0pe-sled/Postfix-Server-Setup/blob/master/ServerSetup.sh

	run 3, 4, 5

./new-redirector-setup.sh our_domain website_to_copy 

Catagorize the domain: https://github.com/bluscreenofjeff/Red-Team-Infrastructure-Wiki#categorization-and-blacklist-checking-resources

nano /etc/opendkim/TrustedHosts

	add rse server IP

nano /etc/postfix/main.cf

	mynetworks = add rse server ip
	non_smtpd_milters       = $smtpd_milters #(last line)

nano /etc/postfix/header_checks 
	/^Received: from [^ ]+ \([^ ]+ \[[IPv0-9a-f:.]+\]\)\s+(.* \(Postfix\) with .+)$/ REPLACE Received: $1
	/^X-Originating-IP:/    IGNORE
	/^X-Mailer:/ REPLACE X-Mailer: mail (GNU Mailutils 3.4) 
	/^Mime-Version:/        IGNORE

nano /etc/postfix/master.cf
	
	Under cleanup add:
		-o header_checks=regexp:/etc/postfix/header_checks

	postmap /etc/postfix/header_checks
	postfix reload

On backend Server:

ServerSetup.sh

run 3,4,5,8

nano /etc/postfix/main.cf

relayhost = domain of smtp redirector

Last updated

Was this helpful?