
exim4 で、127.0.0.1 からのメール送信のみに SMTP 接続を許可するようにする方法。ただし、同時にメールの受信も許可します。dc_local_interfaces
に変更すると127.0.0.1
、メールを受信できず、127.0.0.1 のみが許可されるため、混乱しています。ただし、127.0.0.1 からのメール送信のみを許可しながら、インターネットからのメールも受信したいです。
私は Ubuntu を使用しています。しかし、これはおそらく Ubuntu とはあまり関係ないと思います。
アップデート-exim4.conf.conf
# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'
#
# Please note that this is _not_ a dpkg-conffile and that automatic changes
# to this file might happen. The code handling this will honor your local
# changes, so this is usually fine, but will break local schemes that mess
# around with multiple versions of the file.
#
# update-exim4.conf uses this file to determine variable values to generate
# exim configuration macros for the configuration file.
#
# Most settings found in here do have corresponding questions in the
# Debconf configuration, but not all of them.
#
# This is a Debian specific file
dc_eximconfig_configtype='internet'
dc_other_hostnames='mydomain.com'
dc_local_interfaces='0.0.0.0 ; ::0'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
申し訳ありませんが、StackExchange の文字数制限のため、exim4.conf.template を投稿できません。
答え1
デフォルトの exim4 設定では、relay_from_hosts
リストによってサーバーからメールを送信できるホストが決まります。Exim のドキュメントを参照してください。
- 第7章 - デフォルト設定ファイル典型的な使用法を示します。
- 第44章 アクセス制御リストセクション 52 - ACL を使用してリレーを制御するでは、
relay_from_hosts
アクセス制御リストを使用してリレーを制御するために がどのように使用されるかの詳細を示します。
答え2
このため、postfix に変更しました。