I can receive but I can not send emails. HELP!

I can receive but I can not send emails. I already changed port 25 to 2525 because I use GoogleCloudPlatform.

I am using this guide:
“SETUP EXTERNAL SMTP ON GOOGLE CLOUD PLATFORM (GCP)”

this is my log:

Sep 12 18:33:24 aldecospa postfix/smtpd[3399]: connect from unknown[178.141.251.45] Sep 12 18:33:25 aldecospa postfix/smtpd[3399]: warning: unknown[178.141.251.45]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:33:25 aldecospa postfix/smtpd[3399]: disconnect from unknown[178.141.251.45] Sep 12 18:33:43 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3934, TLS, session=<9SdAWLN1vgAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:33:43 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=89 out=860 Sep 12 18:33:43 aldecospa postfix/smtpd[3057]: connect from unknown[115.159.198.130] Sep 12 18:33:44 aldecospa postfix/smtpd[3057]: warning: unknown[115.159.198.130]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:33:44 aldecospa postfix/smtpd[3057]: disconnect from unknown[115.159.198.130] Sep 12 18:33:54 aldecospa postfix/smtpd[3399]: connect from 61-69-50-110.per.static-ipl.aapt.com.au[61.69.50.110] Sep 12 18:33:55 aldecospa postfix/smtpd[3399]: warning: 61-69-50-110.per.static-ipl.aapt.com.au[61.69.50.110]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:33:55 aldecospa postfix/smtpd[3399]: disconnect from 61-69-50-110.per.static-ipl.aapt.com.au[61.69.50.110] Sep 12 18:34:44 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3952, TLS, session=<uE7ZW7N1ygAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:34:44 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=28 out=769 Sep 12 18:34:44 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3954, TLS, session=<I8HdW7N1zAAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:34:44 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=96 out=867 Sep 12 18:34:49 aldecospa postfix/smtpd[3057]: connect from unknown[167.250.182.64] Sep 12 18:34:50 aldecospa postfix/smtpd[3057]: warning: unknown[167.250.182.64]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:34:50 aldecospa postfix/smtpd[3057]: disconnect from unknown[167.250.182.64] Sep 12 18:35:14 aldecospa postfix/smtpd[3399]: connect from unknown[115.159.198.130] Sep 12 18:35:15 aldecospa postfix/smtpd[3399]: warning: unknown[115.159.198.130]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:35:15 aldecospa postfix/smtpd[3399]: disconnect from unknown[115.159.198.130] Sep 12 18:35:43 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3970, TLS, session=<zYNnX7N12AAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:35:43 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=89 out=860 Sep 12 18:35:56 aldecospa postfix/qmgr[1367]: 7FC431398BF: from=<[email protected]>, size=1175, nrcpt=1 (queue active) Sep 12 18:36:26 aldecospa postfix/smtp[3975]: connect to nam.olc.protection.outlook.com[104.47.36.33]:25: Connection timed out Sep 12 18:36:36 aldecospa postfix/smtpd[3399]: warning: hostname apiex.gov.mz does not resolve to address 197.249.5.116: Name or service not known Sep 12 18:36:36 aldecospa postfix/smtpd[3399]: connect from unknown[197.249.5.116] Sep 12 18:36:37 aldecospa postfix/smtpd[3399]: warning: unknown[197.249.5.116]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:36:37 aldecospa postfix/smtpd[3399]: disconnect from unknown[197.249.5.116] Sep 12 18:36:46 aldecospa postfix/smtpd[3399]: connect from unknown[115.159.198.130] Sep 12 18:36:47 aldecospa postfix/smtpd[3399]: warning: unknown[115.159.198.130]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:36:47 aldecospa postfix/smtpd[3399]: disconnect from unknown[115.159.198.130] Sep 12 18:36:50 aldecospa postfix/smtpd[3399]: connect from unknown[154.73.182.24] Sep 12 18:36:51 aldecospa postfix/smtpd[3399]: warning: unknown[154.73.182.24]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:36:51 aldecospa postfix/smtpd[3399]: disconnect from unknown[154.73.182.24] Sep 12 18:36:56 aldecospa postfix/smtp[3975]: connect to nam.olc.protection.outlook.com[104.47.37.33]:25: Connection timed out Sep 12 18:36:56 aldecospa postfix/smtp[3975]: 7FC431398BF: to=<[email protected]>, relay=none, delay=494, delays=434/0.03/60/0, dsn=4.4.1, status=deferred (connect to nam.olc.protection.outlook.com[104.47.37.33]:25: Connection timed out) Sep 12 18:37:44 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=4011, TLS, session=<RVCSZrN18AAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:37:44 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=89 out=860 Sep 12 18:38:14 aldecospa postfix/smtpd[3399]: connect from unknown[27.72.144.172] Sep 12 18:38:15 aldecospa postfix/smtpd[3399]: warning: unknown[27.72.144.172]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:38:15 aldecospa postfix/smtpd[3399]: disconnect from unknown[27.72.144.172] Sep 12 18:38:19 aldecospa postfix/smtpd[3399]: connect from unknown[115.159.198.130] Sep 12 18:38:19 aldecospa postfix/smtpd[3399]: warning: unknown[115.159.198.130]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:38:20 aldecospa postfix/smtpd[3399]: disconnect from unknown[115.159.198.130] Sep 12 18:38:28 aldecospa postfix/smtpd[3399]: connect from d5152face.static.telenet.be[81.82.250.206] Sep 12 18:38:28 aldecospa postfix/smtpd[3399]: warning: d5152face.static.telenet.be[81.82.250.206]: SASL LOGIN authentication failed: Invalid authentication mechanism Sep 12 18:38:28 aldecospa postfix/smtpd[3399]: disconnect from d5152face.static.telenet.be[81.82.250.206] Sep 12 18:38:45 aldecospa dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=4035, TLS, session=<3684arN1AAAAAAAAAAAAAAAAAAAAAAAB> Sep 12 18:38:45 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=311 out=1176

try this, edit /etc/postfix/main.cf:

smtpd_data_restrictions = reject_unauth_pipelining

add those lines to the file but it does not work.

i change the port in the file /etc/postfix/master.cf, to 2525 but continue using the default 25. any ideas?

this is email log:

Sep 13 13:50:25 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=524 out=2120
Sep 13 13:50:27 aldecospa postfix/smtp[1562]: connect to alt1.gmail-smtp-in.l.google.com[74.125.193.27]:25: Connection timed out
Sep 13 13:50:27 aldecospa postfix/smtp[1562]: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c06::1b]:25: Network is unreachable
Sep 13 13:50:27 aldecospa postfix/smtp[1562]: B26F812B04E: to=[email protected], relay=none, delay=60, delays=0.11/0.02/60/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c06::1b]:25: Network is unreachable)
Sep 13 13:50:33 aldecospa dovecot: imap-login: Login: user=[email protected], method=PLAIN, rip=::1, lip=::1, mpid=1610, TLS, session=
Sep 13 13:50:33 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=524 out=2119
Sep 13 13:50:39 aldecospa dovecot: imap-login: Login: user=[email protected], method=PLAIN, rip=::1, lip=::1, mpid=1614, TLS, session=<sDS8gcN1+AAAAAAAAAAAAAAAAAAAAAAB>
Sep 13 13:50:39 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=110 out=1250
Sep 13 13:51:09 aldecospa dovecot: imap-login: Login: user=[email protected], method=PLAIN, rip=::1, lip=::1, mpid=1636, TLS, session=
Sep 13 13:51:09 aldecospa dovecot: imap([email protected]): Disconnected: Logged out in=89 out=860

Hello!

If you have followed this guide Setup External SMTP on Google Cloud Platform (GCP) - #2 - Blog Posts - CyberPanel Community

Since GCP discourage email sending, you need to set up your mail server somewhere else, and that mail server should be listening on port 2525. (This is not your GCP server, it should be a remote server)

Then you can follow the normal procedure to create an email account on this server, once you are done setting up, you can use the credentials in your application to send emails.