From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22696158009 for ; Tue, 20 Jun 2023 18:09:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6C159E094F; Tue, 20 Jun 2023 18:09:23 +0000 (UTC) Received: from mail1107c7.megamailservers.com (mail767.megamailservers.com [69.49.98.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 14EDEE08FB for ; Tue, 20 Jun 2023 18:09:22 +0000 (UTC) X-Authenticated-User: admin@sys-concept.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.com; s=mailtor; t=1687284561; bh=tYEe+MB+mCYu+AbTIODwwzEVQf5CDVaTQdkViITeli8=; h=Date:To:References:From:Subject:In-Reply-To:From; b=bRFBxZ0nOaaPCH+2jPFYziG2+yRVidQc1Mw3HSO1EJ6fkdzLb4xXGbVi7vJBHe9/v 79wWp5xxVysj+CAtMuLUEZbqKYdW6q+6bID2P3KpUnbuejWw1kmMr6TL3Fyz59qLNb VLwkJO4cX+ZaZrSN70gvAb4GdmxyquNOetU7aeSA= Feedback-ID:thelma@sys-conc X-VIP: 69.49.109.100 Received: from [10.0.0.109] 184.69.242.18":"38491 ([184.69.242.18]) (authenticated bits=0) by mail1107c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id 35KI9Jmi087404 for ; Tue, 20 Jun 2023 14:09:21 -0400 Message-ID: <71ccb0ba-5ea7-907a-566c-add7e7d8f12b@sys-concept.com> Date: Tue, 20 Jun 2023 12:09:18 -0600 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-CA To: gentoo-user@lists.gentoo.org References: <13290188.uLZWGnKmhe@lenovo> From: thelma@sys-concept.com Subject: Re: [gentoo-user] google SMTP with postfix - Password not accepted In-Reply-To: <13290188.uLZWGnKmhe@lenovo> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: 0 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefhedguddttdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffuvffqrffktedpqfgfvfdpgffpggdqveejnecuuegrihhlohhuthemuceftddunecunecujfgurhepkfffgggfvfhfhffujggtgfesthekredttdefjeenucfhrhhomhepthhhvghlmhgrsehshihsqdgtohhntggvphhtrdgtohhmnecuggftrfgrthhtvghrnheptdffteegjeeikeehieegueetvddtgffhgefgveevveehleevvdejkeeuiefhhfffnecuffhomhgrihhnpehgohhoghhlvgdrtghomhenucfkphepudekgedrieelrddvgedvrddukeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedukeegrdeiledrvdegvddrudekpdhhvghloheplgdutddrtddrtddruddtlegnpdhmrghilhhfrhhomhepthhhvghlmhgrsehshihsqdgtohhntggvphhtrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtohepghgvnhhtohhoqdhushgvrheslhhishhtshdrghgvnhhtohhordhorhhg X-Origin-Country: CA X-Archives-Salt: 106911eb-07b0-4157-ab91-f2f761a5cf70 X-Archives-Hash: 4775598b17c3e1ef889f59108fc04e04 On 6/20/23 02:30, Michael wrote: > On Tuesday, 20 June 2023 06:29:52 BST thelma@sys-concept.com wrote: >> Trying to send email via Google SMTP and postfix but getting authentication >> failed. >> >> white postfix/smtp[32223]: 62E5618008F: to=, >> relay=smtp.gmail.com[173.194.203.109]:587, delay=2390, >> delays=2390/0.01/0.29/0, dsn=4.7.8, status=deferred (SASL authentication >> failed; server smtp.gmail.com[173.194.203.109] said: 535-5.7.8 Username and >> Password not accepted. Learn more at?535 5.7.8 >> https://support.google.com/mail/?p=BadCredentials >> n3-20020aa78a43000000b00663b712bfbdsm4668932pfa.57 - gsmtp) >> >> relayhost = [smtp.gmail.com]:587 >> smtp_sasl_auth_enable = yes >> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd >> smtp_sasl_security_options = noanonymous >> smtp_tls_CAfile = /etc/postfix/cacert.pem >> smtp_use_tls = yes >> >> /etc/postfix/sasl_passwd >> [smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD >> postmap /etc/postfix/sasl_passwd >> /etc/init.d/postfix restart >> >> The user and password are correct. > > I think I know what the problem is - but I do not use postfix and can't > confirm it on my side: > > Since mid 2022 Google requires 2FA to allow login into their server. Until > then it used to be the case you could select in their security settings to > "Allow Less Secure Apps", generate an application specific password hash using > their GUI and use this in your mail client. For a year now you won't be able > to do this, unless you first provide a mobile phone number to Google. > > If you *must* use Google, they you'll have to login into their Google account > security panel, set 2FA, attempt to connect with your postfix client, create > an application pass code hash for your postfix via their GUI and use that as > your password in your postfix settings. If you change your IP address, or > your PC/client, or anything else Google are using to fingerprint and profile > your device, then you'll have to login again in their GUI to confirm you are > who you are and your client is a legitimate device owned by you. > > They have many relevant help pages to explain all this, so you should search > for specific guidance, or find another email provider with less onerous user > profiling demands. ;-) > > HTH Thank you Michael for detail explanation. So it seems to me that what I want to do will not work. I have a static IP with Telus on a remote location (trying to save $10) and whenever IP on the remote location changes I would run a script that would send me an email with a new IP address of the remote system. But from what you are describing, it will not work. "...If you change your IP address, or your PC/client, or anything else Google are using to fingerprint and profile your device, then you'll have to login again in their GUI to confirm you are who you are and your client is a legitimate device owned by you." So if the remote IP will change I have to re-initiate the fingerprint profile via Google GUI. So much for trying to save $10.00 Any better solution for me, to get a remote system new IP address. Telus has a tendency of changing the static IP without any warning, it happened to me in the middle of ssh connection with the remote system.