= Postfix Relaying = Postfix is capable of relaying to other [[Email/SMTP|SMTP]] mail servers, either unconditionally or conditional on the destination. <> ---- == Example == The `relay` instruction in a `transport(5)` file causes mail to be relayed to another SMTP server. For example: {{{ localhost local .localdomain local * relay:[smtp.gmail.com]:587 }}} ---- == Configuration == Use of a relay server often requires [[Postfix/Authentication|authentication]] and [[Postfix/Encryption|encryption]]. As an example, for GMail, try: {{{ smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = lmdb:/etc/postfix/sasl/sasl_passwd smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt }}} `/etc/postfix/sasl/sasl_passwd` should look like: {{{ [smtp.gmail.com]:587 alias@gmail.com:wwwwxxxxyyyyzzzz }}} Run `postmap /etc/postfix/sasl/sasl_passwd` and a hashed file will be produced. If your `postmap(1)` does not use LMDB, replace the `lmdb:` with whatever algorithm ''was'' used. ---- CategoryRicottone