VPS1Euro Dashboard Wiki

Complete client guide: infrastructure, services, account and support.

FR EN

Send emails (SMTP)

Configure Postfix to send emails from the container.

What this tutorial does

The tutorial "Send emails (SMTP)" helps you achieve this goal:

Configure Postfix to send emails from the container.

← Back to tutorials
1 profiles 13 steps 5 commands ~20 min

Postfix + Gmail

  1. Install Postfix: apt install -y postfix libsasl2-modules
  2. Choose “Website” during setup.
  3. Edit /etc/postfix/main.cf and add:
  4. relayhost = [smtp.gmail.com]:587
  5. smtp_sasl_auth_enable = yes
  6. smtp_sasl_security_options = noanonymous
  7. smtp_sasl_password_maps = hash: /etc/postfix/sasl_passwd
  8. smtp_tls_security_level = encrypt
  9. Create /etc/postfix/sasl_passwd with: [smtp.gmail.com]:587 [email protected]:app_password
  10. Protect file: chmod 600 /etc/postfix/sasl_passwd
  11. Generate the hash: postmap /etc/postfix/sasl_passwd
  12. Restart Postfix: systemctl restart postfix
  13. Test: echo "Test" | mail -s "Subject" [email protected]