Ref: https://www.linuxbabe.com/mail-server/postfix-smtp-relay-ubuntu-sendinblue
https://oastic.com/posts/configure-postfix-to-send-email-using-sendinblue-as-smtp-server/
Create the Brevo account (https://www.sendinblue.com/)
choose the free plan
FOLLOW THE SETUP IN THE ABOVE REFS
ONLY THE WORKING SETTING FOR ME (localhost) IN /etc/postfix/main.cf
|
1 2 3 4 5 6 7 8 9 10 |
... #smtp_tls_wrappermode = yes ... #sendinblue/brevo setting smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = may header_size_limit = 4096000 relayhost = [smtp-relay.sendinblue.com]:587 |
AND THE SETTING SMTP FOR /etc/postfix/sasl_passwd you can find IN https://app.brevo.com/settings/keys/smtp LIKE
|
1 |
[smtp-relay.sendinblue.com]:587 smtp_username:smtp_password |
NOW:
[smtp-relay.brevo.com]:587 smtp_username:smtp_password
NOW:
TLS = Port 587
THEN TEST
|
1 |
echo "Test Email message body" | mail -s "Email test subject" advcha@yahoo.com |
CHECK IN sudo tail /var/log/mail.log
THE WORKING SMTP WOULD BE LIKE THIS
|
1 2 3 4 5 6 7 8 9 10 |
Jun 1 17:16:18 teddy postfix/qmgr[2394692]: 0A43BC08D1F: from=<satria@teddy.test>, size=371, nrcpt=1 (queue active) Jun 1 17:16:19 teddy postfix/smtp[2394701]: 0A43BC08D1F: to=<advcha@yahoo.com>, relay=smtp-relay.sendinblue.com[1.179.113.51]:587, delay=403, delays=401/0.03/1.4/0.18, dsn=2.0.0, status=sent (250 Message queued as <20230601100937.0A43BC08D1F@teddy.localdomain>) Jun 1 17:16:19 teddy postfix/qmgr[2394692]: 0A43BC08D1F: removed Jun 1 17:16:19 teddy postfix/smtp[2394697]: 6140AC08EB8: to=<advcha@yahoo.com>, relay=smtp-relay.sendinblue.com[1.179.113.51]:587, delay=326, delays=324/0.02/1.4/0.19, dsn=2.0.0, status=sent (250 Message queued as <20230601101054.6140AC08EB8@teddy.localdomain>) Jun 1 17:16:19 teddy postfix/qmgr[2394692]: 6140AC08EB8: removed Jun 1 17:16:21 teddy postfix/pickup[2394691]: 39707C08D20: uid=1000 from=<satria@teddy.test> Jun 1 17:16:21 teddy postfix/cleanup[2394970]: 39707C08D20: message-id=<20230601101621.39707C08D20@teddy.localdomain> Jun 1 17:16:21 teddy postfix/qmgr[2394692]: 39707C08D20: from=<satria@teddy.test>, size=371, nrcpt=1 (queue active) Jun 1 17:16:22 teddy postfix/smtp[2394701]: 39707C08D20: to=<advcha@yahoo.com>, relay=smtp-relay.sendinblue.com[1.179.113.51]:587, delay=1.2, delays=0.02/0/0.99/0.19, dsn=2.0.0, status=sent (250 Message queued as <20230601101621.39707C08D20@teddy.localdomain>) Jun 1 17:16:22 teddy postfix/qmgr[2394692]: 39707C08D20: removed |