Skip to content

Instantly share code, notes, and snippets.

View timstermatic's full-sized avatar

Tim Roberts timstermatic

View GitHub Profile
@timstermatic
timstermatic / sendmail-fix.sh
Created February 16, 2017 19:24 — forked from dhensby/sendmail-fix.sh
Stop sendmail delivering to localhost when email domain matches hostname, stop sendmail intercepting emails to info@ and others - CentOS, RHEL, Fedora
#!/bin/bash
##
##
## This scipt was inspired by http://serverfault.com/questions/65365/disable-local-delivery-in-sendmail/128450#128450
## It stops webservers sending mail that is addressed to the local hostname to localhost and instead looks remotely for a mail server
##
##
# Install sendmail-cf as this is required to customise the config