[pfx] Re: Postfix gmail relay SASL authentication failed invalid parameter supplied

2024-02-28 Thread Nuno Catarino via Postfix-users
Solved
Many thanks to *Wietse Venema*
The solution could be as simple as:

/etc/postfix/main.cf:
smtp_sasl_mechanism_filter = login plain



Nuno Catarino  escreveu (quarta, 28/02/2024 à(s)
15:04):

> Hi there, i'm using leap 15.5, trying to send emails thru gmail relay and
> getting crazy.
> Send my configuration for someone to help me
> when i'm trying to send the email the error is:
>
> postfix/pickup[30145]: CFC982C034E: uid=0 from=
> postfix/cleanup[30149]: CFC982C034E:
> message-id=<20240228100831.CFC982C034E@localhost>
> postfix/qmgr[30144]: CFC982C034E: from=, size=428,
> nrcpt=1 (queue active)
> postfix/smtp[31278]: CFC982C034E: to=, relay=
> smtp.gmail.com[64.233.167.109]:587, delay=5.5, delays=0.05/0/5.4/0,
> dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate
> to server smtp.gmail.com[64.233.167.109]: invalid parameter supplied)
>
> *In the gmail account i have created a apps password*
>
> *In the file /etc/postfix/sasl_passwd*
> [smtp.gmail.com]:587 nuno.catar...@.pt:   
>
>
>
> *the result of the commandpostmap -q “[smtp.gmail.com
> ]:587” lmdb:/etc/postfix/sasl_passwdis:*
> nuno.catar...@.pt:   
>
>
>
> *I did thepostmap /etc/postfix/sasl_passwdand restarted the postfix
> service*
>
> *The configuration file /etc/postfix/master.cf *
> is
>
> smtp  inet  n   -   n   -   -   smtpd
> pickupfifo  n   -   n   60  1   pickup
> cleanup   unix  n   -   n   -   0   cleanup
> qmgr  fifo  n   -   n   300 1   qmgr
> #qmgr fifo  n   -   n   300 1   oqmgr
> tlsmgrunix  -   -   n   1000?   1   tlsmgr
> rewrite   unix  -   -   n   -   -   trivial-rewrite
> bounceunix  -   -   n   -   0   bounce
> defer unix  -   -   n   -   0   bounce
> trace unix  -   -   n   -   0   bounce
> verifyunix  -   -   n   -   1   verify
> flush unix  n   -   n   1000?   0   flush
> proxymap  unix  -   -   n   -   -   proxymap
> proxywrite unix -   -   n   -   1   proxymap
> smtp  unix  -   -   n   -   -   smtp
> relay unix  -   -   n   -   -   smtp
> #   -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
> showq unix  n   -   n   -   -   showq
> error unix  -   -   n   -   -   error
> retry unix  -   -   n   -   -   error
> discard   unix  -   -   n   -   -   discard
> local unix  -   n   n   -   -   local
> virtual   unix  -   n   n   -   -   virtual
> lmtp  unix  -   -   n   -   -   lmtp
> anvil unix  -   -   n   -   1   anvil
> scacheunix  -   -   n   -   1   scache
> postlog   unix-dgram n  -   n   -   1   postlogd
>
> *result of the command postconf -n*
>
> alias_maps = lmdb:/etc/aliases
> biff = no
> canonical_maps = lmdb:/etc/postfix/canonical
> command_directory = /usr/sbin
> compatibility_level = 3.6
> content_filter =
> daemon_directory = /usr/lib/postfix/bin/
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
> $daemon_directory/$process_name $process_id & sleep 5
> defer_transports =
> delay_warning_time = 1h
> disable_dns_lookups = no
> disable_mime_output_conversion = no
> disable_vrfy_command = yes
> html_directory = /usr/share/doc/packages/postfix-doc/html
> inet_interfaces = localhost
> inet_protocols = ipv4
> mail_owner = postfix
> mail_spool_directory = /var/mail
> mailbox_command =
> mailbox_size_limit = 0
> mailbox_transport =
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/share/man
> masquerade_classes = envelope_sender, header_sender, header_recipient
> masquerade_domains =
> masquerade_exceptions = root
> message_size_limit = 0
> message_strip_characters = \0
> mydestination = $myhostname, localhost.$mydomain
> myhostname = localhost
> mynetworks_style = subnet
> newaliases_path = /usr/bin/newaliases
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
> relay_clientcerts =
> relay_domains = $mydestination, lmdb:/etc/postfix/relay
> relayhost = [smtp.gmail.com]:587
> relocated_maps = lmdb:/etc/postfix/relocated
> sample_directory = /usr/share/doc/packages/postfix-doc/samples
> sender_canonical_maps = lmdb:/etc/postfix/sender_canonical
> sendmail_path = /usr/sbin/sendmail
> setgid_group = maildrop
> smtp_enforce_tls = no
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
> smtp_sasl_security_options =
> smtp_tls_CAfile = 

[pfx] Re: Postfix gmail relay SASL authentication failed invalid parameter supplied

2024-02-28 Thread Wietse Venema via Postfix-users
Nuno Catarino via Postfix-users:
> postfix/smtp[31278]: CFC982C034E: to=,
> relay=smtp.gmail.com[64.233.167.109]:587,
> delay=5.5, delays=0.05/0/5.4/0, dsn=4.7.0, status=deferred (SASL
> authentication failed; cannot authenticate to server
> smtp.gmail.com[64.233.167.109]:
> invalid parameter supplied)

Here is a hint:

https://www.cyrusimap.org/sasl/sasl/reference/manpages/library/sasl_errors.html
lists all Cyrus SASL error codes, one of which is:

SASL_BADPARAM
Invalid Parameter Supplied

There are many search engine hits for "invalid parameter supplied" and they
involve Cyrus LDAP support. 

Another hit:
https://askubuntu.com/questions/1189871/postfix-saslnot-workign-on-upgrade-to-19-10o

The solution could be as simple as:

/etc/postfix/main.cf:
smtp_sasl_mechanism_filter = login plain

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Postfix gmail relay SASL authentication failed invalid parameter supplied

2024-02-28 Thread Bill Cole via Postfix-users
On 2024-02-28 at 10:04:05 UTC-0500 (Wed, 28 Feb 2024 15:04:05 +)
Nuno Catarino via Postfix-users 
is rumored to have said:

> Hi there, i'm using leap 15.5, trying to send emails thru gmail relay and
> getting crazy.
> Send my configuration for someone to help me
> when i'm trying to send the email the error is:
>
> postfix/pickup[30145]: CFC982C034E: uid=0 from=
> postfix/cleanup[30149]: CFC982C034E:
> message-id=<20240228100831.CFC982C034E@localhost>
> postfix/qmgr[30144]: CFC982C034E: from=, size=428, nrcpt=1
> (queue active)
> postfix/smtp[31278]: CFC982C034E: to=,
> relay=smtp.gmail.com[64.233.167.109]:587,
> delay=5.5, delays=0.05/0/5.4/0, dsn=4.7.0, status=deferred (SASL
> authentication failed; cannot authenticate to server
> smtp.gmail.com[64.233.167.109]:
> invalid parameter supplied)
>
> *In the gmail account i have created a apps password*
>
> *In the file /etc/postfix/sasl_passwd*
> [smtp.gmail.com]:587 nuno.catar...@.pt:   

The error indicates that the password and/or username were incorrect.

I believe you need to remove any spaces in the GMail app password.


-- 
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org