configuration of smtp relay between two directadmin server

mohamadsajedi

Verified User
Joined
Sep 10, 2021
Messages
11
Hello my friends
i've got two directadmin server in two different datacenter in A and B locations. one of the datacenters dont allow anyone to send mail and reject all of the mails.
so i need to relay all mails of A server to B server .
i've followed these urls :
but now i've got an error on both sides and this is error body message on server B :
2021-12-11 23:28:40 H=(XXXX.XXXXX.XXX) [server A ip] X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<mail account of sender in A server> rejected RCPT <destination mail account>: relay not permitted, authentication required
so what is wrong
where i must set password on exim of server A.
i've configured the following also on server A in /etc/exim.authenticators.post.conf file :
auth_login:
driver = plaintext
public_name = LOGIN
#replace your@email and yourpass
hide client_send = : mail_account_on_server_B : pass_mail_account_B

Thank you for your help
 

Attachments

  • 1639253811421.png
    1639253811421.png
    326 bytes · Views: 2
So this is the exim ACL you're triggering:

Code:
  # restrict port 587 to authenticated users only
  # see also daemon_smtp_ports above
  accept  hosts = +auth_relay_hosts
          condition = ${if eq {$interface_port}{587} {yes}{no}}
          endpass
          message = RELAY_NOT_PERMITTED_AUTH
          authenticated = *

I would suggest that server A is not authenticating on server B. Do you have hosts_require_auth configured on your transport?
 
@Active8 yes i read all of pages and documentations .
found the problem
this is the answer :
accept hosts = +auth_relay_hosts
condition = ${if eq {$interface_port}{587} {yes}{no}}
endpass
message = RELAY_NOT_PERMITTED_AUTH
accept authenticated = *

you must accept connection from authenticated hosts
now everything is ok
Thanks @mxroute
 
Back
Top