Last active
December 11, 2015 03:28
-
-
Save azumakuniyuki/4537611 to your computer and use it in GitHub Desktop.
Sample smtpd.conf on OpenBSD 5.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $OpenBSD: smtpd.conf,v 1.4 2012/07/16 05:56:16 jmc Exp $ | |
# | |
# This is the smtpd server system-wide configuration file. | |
# See smtpd.conf(5) for more information. | |
# See also http://www.opensmtpd.org/smtpd.conf.5.html | |
# ファイル内でマクロが使える | |
if_ext = "pppoe0" | |
if_int = "vr0" | |
hostname "mta.example.jp" | |
# マクロの参照は$マクロ名 | |
listen on lo0 | |
listen on $if_ext | |
listen on $if_int | |
# 外部データベースファイルの定義 | |
map aliases source db "/etc/smtpd/aliases.db" | |
map authinfo source db "/etc/smtpd/authinfo.db" | |
map virtusers source db "/etc/smtpd/virtusers.db" | |
map relayhosts source plain "/etc/smtpd/relay-domains" | |
# local宛(*@mta.example.jp)は~/Maildirへ配送する | |
accept for local alias aliases deliver to maildir | |
# バーチャルドメインの対応 | |
accept from all for virtual map "virtusers" deliver to maildir | |
# 特定ドメイン宛メールのリレー先定義 | |
accept for domain "azumakuniyuki.org" relay via "tls+auth://smtp.sendgrid.net:587" auth "authinfo" | |
accept for domain "*.example.com" relay via "tls+auth://smtp.gmail.com:587" auth "authinfo" | |
accept for domain "example.org" relay via "smtp://relay.example.jp" | |
# relayhostsマップに定義したホストからはリレーを受け付ける | |
accept from map "relayhosts" for all relay | |
# from *を省略するとfrom localとして解釈される | |
# よってlocal(このホスト)からは全部リレーする | |
accept for all relay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment