Digitalocean with Sendgrid SMTP Relay

Hi,

For those who struggled to integrate sendgrid with mail in a box, you need to edit the contents of main.cf located in /etc/postfix/ like mentioned in the following post:

However i thought that i needed to change the contents of main.cf file to the given details on the tutorial, which is not the case,

you just need to do the following:

  1. change following line in main.cf:
    relayhost = → relayhost = [smtp.sendgrid.net]:587

and append/add the following text block under relayhost

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000

you still need to follow the other steps and it’ll work out.

Kind regards,

AskinSavascisi