When I searched for configuring sendmail on ubuntu I din't get any clear answer, each of them assume I know what they are talking about,
I just wanna know how to configure sendmail with custom smtp relay, like smtp-relay.brevo.com and how to test it
Thanks
Need port 25 dan 587 if you using docker container
apt install sendmail sendmail-bin mailutils
mkdir -m 700 /etc/mail/authinfo
nano /etc/mail/authinfo/smtp-auth
AuthInfo:smtp-relay.brevo.com "U:your-email" "P:your-smtp-key"
makemap hash /etc/mail/authinfo/smtp-auth < /etc/mail/authinfo/smtp-auth
chmod 600 /etc/mail/authinfo/smtp-auth.db
nano /etc/mail/sendmail.mc
....
dnl #
dnl # Defining Gmail Smarthost for sendmail
define(`SMART_HOST',`[smtp-relay.brevo.com]')dnl
define(`RELAY_MAILER',`esmtp')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
define(`confAUTH_OPTIONS', `A p')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo/smtp-auth.db')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
make -C /etc/mail
service sendmail reload
echo "This is a test for sendmail gmail relay" | sendmail your-email@gmail.com