I want to set up Exim to send the mails through my gmail (actually my domains google apps).
I have added the router, transport and authenticator. Specifically:
gmail_route:
driver = manualroute
transport = gmail_relay
route_list = * smtp.gmail.com
gmail_relay:
driver = smtp
port = 587
hosts_require_auth = $host_address
hosts_require_tls = $host_address
gmail_login:
driver = plaintext
public_name = LOGIN
hide client_send = :me@domain.com:mypassword
I was able to set this up for Exim on Debian but I can't figure it out on Centos.
When I try and send while monitoring the logs it tells me "no IP address found…" and then "SMTP error from remote mail server…". It also says "Authentication required".
Here is more detail: Pretend I am sending to someone@gmail.com
someone@gmail.com R=gmail_route T=gmail_relay: SMTP error from remote mail server after MAIL FROM:<me@domain.com> SIZE=1492:
host gmail-smtp-msa.l.google.com [2a00:1450:4001:c02::6d]:
530-5.5.1 Authentication Required. Learn more at\n530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 k41sm12066343een.19 - gsmtp
Is there anything I can try to fix this? I am planning on using it mostly to send alert emails to myself (fail2ban, logwatch etc). And the default Exim setup seems to work but I would prefer to use my gapps email like hostname@mydomain.com – For one thing the emails went to spam before I trained my email account to put them in the inbox…
Thanks,
Best Answer
I have used the following config
ROUTER
TRANSPORT
AUTHENTICATOR
Some simple test
Check maillog file
You can run exim in debug mode
After that you get a lot of data. Add the output to the question