Прописываем обратную зону PTR
Я прописал mail.xxx.ru для своего ip
echo "Subject: sendmail test" | sendmail -v [email protected]
для xxx.ru
прописана обратная зона
v=spf1 a mx:mail.xxx.ru ip4:78.47.68.28 -all
xxx.ru IN TXT v=spf1 a mx:mail.xxx.ru ip4:78.47.68.28 -all 21600s (06:00:00)
Для домена xxx1.ru который расположен там же где xxx2.ru
следующие настройки
@ TXT v=spf1 mx a ip4:78.47.68.28 include:_spf.yandex.ru ~all
28.68.47.78.in-addr.arpa IN PTR mail.xxx.ru
Возможна проблема с отправкой почты на локальные домены (если exim и xxx.com на одном впс то для exim по дефолту домен xxx.com является локальным.)
Если нужно отправлять почту на внешние сервера*например яндекс или гугл почтЫ , то нужно локальный домен сделать внешним для exim/
Решается след.образом: конфиг exim
# /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='xxx.com' dc_local_interfaces='127.0.0.1 ; ::1' 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='maildir_home' dc_postmaster='[email protected]'
Поскольку конфиг не делил на части (dc use split config = false) то настройку смотрим в файле
/etc/exim4/exim4.conf.template
в этом файле находим
#domainlist local_domains = MAIN_LOCAL_DOMAINS
комментируем и добавляем
domainlist local_domains = localhost