ronald
To leave no stone unturned, outgoing SMTP relay can be accomplished as follows;
- at the user client level - too easy
- at the mail server level - moderate to easy
- at the PMG level - no so easy
That said, and should you choose to cover both in/and outbound with PMG, I would offer the following for your consideration;
`To configure username/password authentication with SMTP2GO on PMG;
Create necessary directories and copy templates:
mkdir -p /etc/pmg/templates
cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates/main.cf.in
Edit /etc/pmg/templates/main.cf
to include:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
Configure SMTP authentication:
nano /etc/postfix/smtp_auth
mail.smtp2go.com:2525 username:password
chmod 640 /etc/postfix/smtp_auth
postmap /etc/postfix/smtp_auth
Sync PMG configuration and restart services:
pmgconfig sync --restart 1
systemctl restart postfix
I have performed these steps/ tested and confirmed to work`
NB, To my knowledge, it is not possible to edit ' /etc/pmg/templates/main.cf.in', as PMG will revert it the moment it is saved /restarted etc. And so you'll need to make changes to the template ' /etc/pmg/templates/main.cf.in'