I am looking for a simple advice what should be essentially (minimally) done to make a default Debian 8 Jessie's exim4-daemon-heavy
installation to actually receive any mail.
Speaking of essential actions after the installation of the package I mean set up MX
records and make initial configuration via dpkg-reconfigure exim4-config
:
- Type: internet site
- System mail name: example.org
- IP to listen for incoming SMTP: empty
- Other destinations: empty
- Domains to relay: empty
- Machines to relay: empty
- DNS-queries minimal: No
- Delivery method: Maildir format
- Split config: Yes
This obviously generates such /etc/exim4/update-exim4.conf.conf
file:
dc_eximconfig_configtype='internet'
dc_other_hostnames=''
dc_local_interfaces=''
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'
The last action is to set /etc/mailname
to example.org
.
All of the aforementioned is sufficient to make Exim send emails, but if someone trying to send you one, you will get this annoying relay not permitted
error:
H=example.net [192.0.2.1] F=<someone@example.net> rejected RCPT <me@example.org>: relay not permitted
This behavior is pretty typical and last time I set up Exim (Debian 7 Wheezy's) I spent a lot of time setting this and that and finally it worked. I don't want to rsync old config, I just want to know what setting enables Exim to receive email.
Exim version for those interested:
me@jessie:~$ exim -bV
Exim version 4.84 #2 built 17-Feb-2015 17:45:46
Copyright (c) University of Cambridge, 1995 - 2014
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2014
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS move_frozen_messages Content_Scanning DKIM Old_Demime PRDR OCSP
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /var/lib/exim4/config.autogenerated
Best Answer
Well, I've performed a thorough
diff
and found these settings, which make Exim receive email:/etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs:
comment out or remove this block (lines 64-66):
and place this instead (note the dot between the address and the port, this is not a typo):
/etc/exim4/conf.d/main/02_exim4-config_options:
comment out or remove this block (lines 90-92):
and place this instead (of course with you real hostname):
I'm not sure which setting resolves the issue, maybe both. Strangely enough, when I tried to revert the behavior, and discarded my edits, Exim didn't stopped receive mails. Probably it learned something useful from these configs (variables have been set).