[exim] Unable to send emails

Góra strony
Delete this message
Reply to this message
Autor: MaDhAt2r
Data:  
Dla: exim-users
Temat: [exim] Unable to send emails

Hello everyone! This is a newbie problem that I am hoping someone can
give me a hand with.

Overview: I am trying to set up a Exim to be used as a MTA for sending
out my clients marketing and informational emails. These emails will
come from in-house applications either through "sendmail" interface or
via TCP/IP. I will need to support TLS for sending. As such it should
be a fairly simple setup. I have changed my domain to example.com in
the posted information. I am defaulting to giving too much info in
this opening email, as I am not sure what will be of most benefit in
aiding me. As such, I have also posted the complete config file at
the bottom of the email.

Problem: When sending emails as described above, they are not leaving
from Exim to the destination, they are remaining in queue.

Description: Viewing the log does not give me much to go on. In
preparation for this plea for help email I have cleared all logs and
queues to limit all information to just what I am mentioning here. To
reiterate, if I am posting it, or responding to you, the information
will only relate to the two emails I am mentioning herein.


Email One Log Entries:
Below is what sending to an email hosted by google gets.
...
2019-04-23 08:43:08.309 [21288] SMTP connection from [127.0.0.1]:58378 I=[127.0.0.1]:25 (TCP/IP connection count = 1)
2019-04-23 08:43:11.201 [22847] 1hIvhX-0005wV-4z <= micah@??? H=localhost (localhost.localdomain) [127.0.0.1]:58378 I=[127.0.0.1]:25 P=esmtp L- S=19000 M8S=0 RT=0.046s id=HXZGGbkrNB053LjuXuLw.1556026989841@??? T="tester" from <micah@???> for madhat2r@???
2019-04-23 08:43:11.202 [22847] SMTP connection from localhost (localhost.localdomain) [127.0.0.1]:58378 I=[127.0.0.1]:25 closed by QUIT
2019-04-23 08:43:11.215 [22874] cwd=/home/exim/spool 3 args: /usr/bin/exim -Mc 1hIvhX-0005wV-4z
2019-04-23 08:43:19.559 [23071] 1hIvhX-0005wV-4z H=aspmx.l.google.com [2a00:1450:4013:c00::1a]:25 Cannot assign requested address
...

Email Two Log Entries:
Sending to a blackhole.io email address yields:
...
2019-04-23 08:48:12.230 [21288] SMTP connection from [127.0.0.1]:58498 I=[127.0.0.1]:25 (TCP/IP connection count = 1)
2019-04-23 08:48:15.361 [26592] 1hIvmR-0006uu-9z <= micah@??? H=localhost (localhost.localdomain) [127.0.0.1]:58498 I=[127.0.0.1]:25 P=esmtp L- S=18986 M8S=0 RT=0.050s id=cHhmw491slCcDsN3DEueg.1556027294223@??? T="tester_007" from <micah@???> for test@???
2019-04-23 08:48:15.361 [26592] SMTP connection from localhost (localhost.localdomain) [127.0.0.1]:58498 I=[127.0.0.1]:25 closed by QUIT
2019-04-23 08:48:15.373 [26620] cwd=/home/exim/spool 3 args: /usr/bin/exim -Mc 1hIvmR-0006uu-9z
...


exim.cfg (basically default config with options changes and some
comments removed):

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################
#


primary_hostname = example.com



domainlist local_domains = @
domainlist relay_to_domains =
hostlist relay_from_hosts = localhost

acl_smtp_rcpt =         acl_check_rcpt
.ifdef _HAVE_PRDR
acl_smtp_data_prdr =    acl_check_prdr
.endif
acl_smtp_data =         acl_check_data



# Allow any client to use TLS.

tls_advertise_hosts = *

tls_certificate = /etc/letsencrypt/live/example.com/fullchain.pem
tls_privatekey = /etc/letsencrypt/live/example.com/privkey.pem

# For OpenSSL, prefer EC- over RSA-authenticated ciphers
tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465


# never_users = root

host_lookup = *


dns_dnssec_ok = 1

.ifdef _HAVE_PRDR
prdr_enable = true
.endif

# log_selector = +smtp_protocol_error +smtp_syntax_error \
#         +tls_certificate_verified
# Logging: log all events, add syslog to logging path & avoid double entries
log_selector = +all
log_file_path = : syslog
syslog_duplication = false



ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d


spool_directory = /home/exim/spool
split_spool_directory = true

# accept_8bitmime = false


######################################################################
#                       ACL CONFIGURATION                            #
#         Specifies access control lists for incoming SMTP mail      #
######################################################################


begin acl

acl_check_rcpt:
  accept  hosts = :
          control = dkim_disable_verify
  deny    message       = Restricted characters in address
          domains       = +local_domains
          local_parts   = ^[.] : ^.*[@%!/|]
  deny    message       = Restricted characters in address
          domains       = !+local_domains
          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  accept  local_parts   = postmaster
          domains       = +local_domains


  require verify        = sender


  accept  hosts         = +relay_from_hosts
          control       = submission
          control       = dkim_disable_verify


  accept  authenticated = *
          control       = submission
          control       = dkim_disable_verify


  require message       = nice hosts say HELO first
          condition     = ${if def:sender_helo_name}


  require message = relay not permitted
          domains = +local_domains : +relay_to_domains


require verify = recipient

accept


.ifdef _HAVE_PRDR
acl_check_prdr:
warn set acl_m_did_prdr = y
.endif
accept

acl_check_data:
  deny    message    = maximum allowed line length is 998 octets, \
                       got $max_received_linelength
          condition  = ${if > {$max_received_linelength}{998}}


  # Deny if the headers contain badly-formed addresses.
  #
  deny    !verify =     header_syntax
          message =     header syntax
          log_message = header syntax ($acl_verify_message)


accept



######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################


begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
dnssec_request_domains = *
no_more

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/mail/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe


userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
# allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply


localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


begin transports

remote_smtp:
driver = smtp
# message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
# .ifdef _HAVE_DANE
# dnssec_request_domains = *
# hosts_try_dane = *
# .endif
# .ifdef _HAVE_PRDR
# hosts_try_prdr = *
# .endif


local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660


address_pipe:
driver = pipe
return_output


address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add


address_reply:
driver = autoreply



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


begin retry


# Address or Domain    Error       Retries
# -----------------    -----       -------


*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h




######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


begin rewrite



######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################


begin authenticators