exim4 で他の IP がサーバーを使用してメールを送信することを拒否するにはどうすればよいですか?

exim4 で他の IP がサーバーを使用してメールを送信することを拒否するにはどうすればよいですか?

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 のドキュメントを参照してください。

答え2

このため、postfix に変更しました。

関連情報