EXIM CONFIGURATION
VestaCP replaces exim.conf with its own version that allows it to properly route emails for VestaCP accounts, so it’s important to be careful when editing. Best practice is to backup exim.conf file before editing it
VestaCP replaces exim.conf with its own version that allows it to properly route emails for VestaCP accounts, so it’s important to be careful when editing. Best practice is to backup exim.conf file before editing it
CODE: SELECT ALL
cp /etc/exim/exim.conf /etc/exim/exim.conf-bkup
1. Open Exim Configuration
CODE: SELECT ALL
nano /etc/exim/exim.conf
2. You must configure Exim to Authenticate when sending email, or else you’ll end up with 550 Authentication errors.
FIND
CODE: SELECT ALL
host_lookup = *
ADD BELOW
CODE: SELECT ALL
auth_advertise_hosts = *
3. SendGrid Entries: Add the Credentials, Route and Transport to exim.conf
FIND
CODE: SELECT ALL
begin authenticators
ADD BELOW
CODE: SELECT ALL
sendgrid_login:
driver = plaintext
public_name = LOGIN
client_send = : sendgridusername : sendgridpassword
replace sendgridusername and sendgridpassword with your SendGrid login credentials.
FIND
CODE: SELECT ALL
begin routers
ADD BELOW
CODE: SELECT ALL
send_via_sendgrid:
driver = manualroute
domains = ! +local_domains
transport = sendgrid_smtp
route_list = "* smtp.sendgrid.net::587 byname"
host_find_failed = defer
no_more
FIND
CODE: SELECT ALL
begin transports
ADD BELOW
CODE: SELECT ALL
sendgrid_smtp:
driver = smtp
hosts = smtp.sendgrid.net
hosts_require_auth = smtp.sendgrid.net
hosts_require_tls = smtp.sendgrid.net
4. Save exim.conf and exit
5. Restart Exim
CODE: SELECT ALL
/etc/init.d/exim restart
You should now be able to successful send emails using the SendGrid service.
Hi good day.
Thank you very much for the information, finally, I was able to solve the problem of sending emails in the "Google Cloud" instances.
Problem derived from blocking these servers from port 25.
It took me a long time to be able to solve it, first find the problem and then be able to solve it, the latter thanks to your article.
Thank you.