Here are the lines for /etc/postfix/main.cf to use SendGrid as a relay host with TLS:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:yourSendgridUsername:yourSendgridPassword
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587

Make sure to restart Postfix once these changes are done.

$ /etc/init.d/postfix restart

Note: If you are getting no mechanism available error messages it generally indicates that you may be missing some SASL authentication libraries. In this case you may want to:

$ apt-get install libsasl2-modules

or on a Yum-based system:

$ yum install cyrus-sasl-plain