I built a postfix relay several years ago that relays through office365. This is limited to hosts on the VPN, but now want to provide a public IP and allow remote printers to relay through postfix for send to email.

My issue is a lack of understanding of how to add smtp authentication for the printers to use without messing up the authentication for office365. I think this is purely a perspective issue.

The new postifix installation is running in Docker using the config found here https://github.com/juanluisbaptiste/docker-postfix and works just like my old install.

Update :

Looks like I just need to figure out getting saslauthd to run in the container. Then it should auth against pam using a local account.


This is not the cleanest solution, but it works for my needs.

Adding the following to the docker file

RUN echo -e "smtpd_sasl_auth_enable = yes\n\
smtpd_sasl_security_options = noanonymous\n\
smtpd_sasl_local_domain = \$myhostname\n\
broken_sasl_auth_clients = yes\n\
smtpd_recipient_restrictions =\n\
   check_relay_domains\n" >> /etc/postfix/main.cf


RUN adduser test; echo -e "test\ntest" | passwd test

Then adding the following under "#Start services" to the run.sh file created by the author of the project I referenced on github.

/usr/sbin/saslauthd -a pam

I am now able to authenticate. Now to move on to TLS then deploy in AWS.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.