Postfix not able anymore to send email via gmail.com

I use sender_dependent_relayhost and sasl_password to send email with my gmail address as sender. Since May 30 gmail refuses this type of authentication and refuses to accept messages.

Is there a method to overcome this problem in postfix?

This may be related to Google removing support for unsecure authentication methods. You need 2 factor now.
https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html

You need to configure Postfix for OAuth2, but there is no turnkey solution. If you search Google, you will find several instructions that may work, but they lack openSUSE specifics. They rely on cyrus-sasl-xauth2 plugin which is not available in default openSUSE repositories. For Leap 15.2 there is only one home repository.

If you manage to get it working, providing step by step description for openSUE (or at least mentioning which part of available howtos needs modification) will certainly be helpful for others.

I am running postfix on Tumbleweed. Sent email from host erlangen to googlemail.com via relay=mail.mnet-online.de at Do 2. Jun 19:33:44 CEST 2022 without further ado.

Got the following warning:
**Achtung: Bei dieser Nachricht ist Vorsicht geboten! **Gmail konnte nicht bestätigen, dass die E-Mail tatsächlich von aon.at gesendet wurde. Klicken Sie möglichst nicht auf Links, laden Sie keine Anhänge herunter und antworten Sie besser nicht mit personenbezogenen Daten.

Alternative could be application specific password. Google for “postfix gmail app password” to find some howtos with postfix side description. Check Google documentation for explanation how to create app specific passwords.

From cursory skimming over web pages, app specific passwords appear easier to setup but require 2FA enabled. Also there are some doubts these passwords are really “application specific”. OAuth2 does not require 2FA and provides some more fine grained control.

Take a look at this presentation made this morning at the 2022 openSUSE Conference – <openSUSE Events; – “DNS – A distributed directory that runs the Internet”.

  • You may have to login to the openSUSE Events – use the same username and password as those which you are using to access these forums.

Please note the comments made by the presenter with respect to Google & Co.
[HR][/HR]Yes, yes, I know – if you use an Android mobile telephone then via registration you automatically receive a GMail account …

  • But, take a close look at the services offered by either your Internet Service Provider or, your mobile telephone SIM card provider – the provider of the telephone number of your mobile telephone.
    The chances are that, at least one these two provide e-mail accounts which are part of either, the money you are being billed for your access to the Internet or, your mobile telephone bill …

[INDENT=2]And, the chances are reasonably good that, the e-mail service(s) you’re paying for do not rely on Alphabet (Google) …
[/INDENT]