Skip to content

Instantly share code, notes, and snippets.

@voutilad
Last active December 5, 2017 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voutilad/68f76d6530876b12d0b19ffe3a60ec83 to your computer and use it in GitHub Desktop.
Save voutilad/68f76d6530876b12d0b19ffe3a60ec83 to your computer and use it in GitHub Desktop.
Example smtpd.conf for relay different Gmail accounts
# $OpenBSD: smtpd.conf,v 1.9 2016/05/03 18:43:45 jung Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
table aliases file:/etc/mail/aliases
table secrets file:/etc/mail/secrets
# To accept external mail, replace with: listen on all
#
listen on lo0
# Uncomment the following to accept external mail for domain "example.org"
#
# accept from any for domain "example.org" alias <aliases> deliver to mbox
accept for local alias <aliases> deliver to mbox
accept sender "alice@gmail.com" for any relay via tls+auth://alice@smtp.gmail.com:587 auth <secrets>
accept sender "alice.smith@xyzzy.com" for any relay via tls+auth://alice.smith@smtp.gmail.com:587 auth <secrets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment