Postfix No Mechanism Available On Bananian 2017-07-30
Just a quick post to remind myself what to do the next time I run in to this. Today I finally decided to take a look at why my mail server at home was not relaying mail to my main mail server. This was causing me not to get my Asterisk voicemail alerts as well as the calendar alerts I get from WinDates. I was getting this kind of stuff in my postfix logs:
Jul 30 08:46:49 server postfix/smtp: 535073840BC7: to=<firstname.lastname@example.org>, relay=mail.snork.ca[188.8.131.52], delay=251281, delays=251277/0.5/3.4/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server mail.snork.ca[184.108.40.206]: no mechanism available)
I surfed around a little bit trying to find the answer and most people who solved their issue had some problem in their main.cf file, typically related to the SASL options. This makes sense of course, the error message makes it look like SASL has something to do with it. However, this didn't seem to be my problem. I checked and double checked every directive and it still didn't work.
Eventually I came across this forum post which had my answer. Unfortunately it was almost three years after the original post and nobody ever replied to say that it worked for them. If I am feeling adventurous I may create an account and necro the post so I can say it worked for me. Ultimately, what is important here is that Bananian did not install the required SASL modules so postfix could actually do the authentication. Fix it by:
# apt-get install libsasl2-modules