[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed response (XOAUTH2?) #101

Open
ghost opened this issue Mar 12, 2022 · 2 comments
Open

Malformed response (XOAUTH2?) #101

ghost opened this issue Mar 12, 2022 · 2 comments

Comments

@ghost
Copy link
ghost commented Mar 12, 2022

boky/postfix:latest

Trying to setup a smtp relay using gmail and xoauth2 but getting this. Any idea how to debug this further or what it could be?

INFO postfix/smtpd[275]: disconnect from test.local.lan[192.168.1.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
WARNING postfix/qmgr[265]: warning: private/smtp socket: malformed response
WARNING postfix/qmgr[265]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
WARNING postfix/master[263]: warning: process /usr/libexec/postfix/smtp pid 279 killed by signal 11
WARNING postfix/master[263]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
INFO postfix/error[282]: 39B9612B: to=test@example.com, relay=none, delay=0.77, delays=0.11/0.65/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

I've setup these options

ALLOWED_SENDER_DOMAINS domain1 domain2
MASQUERADED_DOMAINS domain2
RELAYHOST [smtp.gmail.com]:587
RELAYHOST_USERNAME gmail-address
POSTFIX_smtp_tls_security_level encrypt
XOAUTH2_CLIENT_ID id
XOAUTH2_SECRET secret
ALLOW_EMPTY_SENDER_DOMAINS true
XOAUTH2_INITIAL_ACCESS_TOKEN token
XOAUTH2_INITIAL_REFRESH_TOKEN token
INBOUND_DEBUGGING 1
XOAUTH2_SYSLOG_ON_FAILURE yes
XOAUTH2_FULL_TRACE yes

/var/spool/postfix and /etc/postfix each have a volume.

@Tristan971
Copy link
Tristan971 commented Mar 15, 2022

So I'm running into the same issue on Alpine (not using XOAUTH here) in relay mode.

After trying a bunch of random things, it seems to get fixed automagically by doing any kind of DNS resolution before Postfix receives any mail. I tried adding an nslookup as init script and it helped but it was still eventually falling back to this every now and then...

So I moved to the Ubuntu image, which had other issues (see #102) but once those were fixed it works all fine here on k8s 1.22

@ghost
Copy link
Author
ghost commented Mar 15, 2022

I'm getting this far with XOAUTH2.

2022-03-15T20:48:15.492557979Z 2022-03-15T21:48:15.491803+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-smtp.gmail.com at your service, [185.65.135.169]
2022-03-15T20:48:15.492562579Z 2022-03-15T21:48:15.491820+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-SIZE 35882577
2022-03-15T20:48:15.492572358Z 2022-03-15T21:48:15.491831+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-8BITMIME
2022-03-15T20:48:15.492576648Z 2022-03-15T21:48:15.491842+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
2022-03-15T20:48:15.492580428Z 2022-03-15T21:48:15.491853+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-ENHANCEDSTATUSCODES
2022-03-15T20:48:15.492760118Z 2022-03-15T21:48:15.491863+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-PIPELINING
2022-03-15T20:48:15.492949807Z 2022-03-15T21:48:15.491873+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250-CHUNKING
2022-03-15T20:48:15.493124876Z 2022-03-15T21:48:15.491884+01:00 INFO postfix/smtp[322]: < smtp.gmail.com[209.85.233.108]:587: 250 SMTPUTF8
2022-03-15T20:48:15.493132436Z 2022-03-15T21:48:15.491901+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: login ~? xoauth2
2022-03-15T20:48:15.493136496Z 2022-03-15T21:48:15.491910+01:00 INFO postfix/smtp[322]: match_list_match: LOGIN: no match
2022-03-15T20:48:15.493147176Z 2022-03-15T21:48:15.491919+01:00 INFO postfix/smtp[322]: sasl_mech_filter: drop SASL mechanism: 'LOGIN'
2022-03-15T20:48:15.493211745Z 2022-03-15T21:48:15.491928+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: plain ~? xoauth2
2022-03-15T20:48:15.493230565Z 2022-03-15T21:48:15.491937+01:00 INFO postfix/smtp[322]: match_list_match: PLAIN: no match
2022-03-15T20:48:15.493247465Z 2022-03-15T21:48:15.491945+01:00 INFO postfix/smtp[322]: sasl_mech_filter: drop SASL mechanism: 'PLAIN'
2022-03-15T20:48:15.493251785Z 2022-03-15T21:48:15.491954+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: xoauth2 ~? xoauth2
2022-03-15T20:48:15.493255855Z 2022-03-15T21:48:15.491962+01:00 INFO postfix/smtp[322]: sasl_mech_filter: keep SASL mechanism: 'XOAUTH2'
2022-03-15T20:48:15.493270735Z 2022-03-15T21:48:15.491972+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: plain-clienttoken ~? xoauth2
2022-03-15T20:48:15.493275135Z 2022-03-15T21:48:15.491981+01:00 INFO postfix/smtp[322]: match_list_match: PLAIN-CLIENTTOKEN: no match
2022-03-15T20:48:15.493278855Z 2022-03-15T21:48:15.491989+01:00 INFO postfix/smtp[322]: sasl_mech_filter: drop SASL mechanism: 'PLAIN-CLIENTTOKEN'
2022-03-15T20:48:15.493290355Z 2022-03-15T21:48:15.491998+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: oauthbearer ~? xoauth2
2022-03-15T20:48:15.493294185Z 2022-03-15T21:48:15.492007+01:00 INFO postfix/smtp[322]: match_list_match: OAUTHBEARER: no match
2022-03-15T20:48:15.493304765Z 2022-03-15T21:48:15.492015+01:00 INFO postfix/smtp[322]: sasl_mech_filter: drop SASL mechanism: 'OAUTHBEARER'
2022-03-15T20:48:15.493308625Z 2022-03-15T21:48:15.492042+01:00 INFO postfix/smtp[322]: match_string: smtp_sasl_mechanism_filter: xoauth ~? xoauth2
2022-03-15T20:48:15.493312785Z 2022-03-15T21:48:15.492057+01:00 INFO postfix/smtp[322]: match_list_match: XOAUTH: no match
2022-03-15T20:48:15.493332745Z 2022-03-15T21:48:15.492066+01:00 INFO postfix/smtp[322]: sasl_mech_filter: drop SASL mechanism: 'XOAUTH'
2022-03-15T20:48:15.493337265Z 2022-03-15T21:48:15.492078+01:00 INFO postfix/smtp[322]: server features: 0x20102f size 35882577
2022-03-15T20:48:15.493340995Z 2022-03-15T21:48:15.492090+01:00 INFO postfix/smtp[322]: Using ESMTP PIPELINING, TCP send buffer size is 46080, PIPELINING buffer size is 4096
2022-03-15T20:48:15.493351835Z 2022-03-15T21:48:15.492114+01:00 INFO postfix/smtp[322]: maps_find: smtp_sasl_password_maps: smtp.gmail.com: not found
2022-03-15T20:48:15.493356534Z 2022-03-15T21:48:15.492123+01:00 INFO postfix/smtp[322]: maps_find: smtp_sasl_password_maps: lmdb:/etc/postfix/sasl_passwd(0,lock|fold_fix|utf8_request): [smtp.gmail.com]:587 = #@#.com
2022-03-15T20:48:15.493366694Z 2022-03-15T21:48:15.492127+01:00 INFO postfix/smtp[322]: smtp_sasl_passwd_lookup: host `smtp.gmail.com' user #@#.com' pass #@#.com'
2022-03-15T20:48:15.493370784Z 2022-03-15T21:48:15.492130+01:00 INFO postfix/smtp[322]: starting new SASL client
2022-03-15T20:48:15.493374424Z 2022-03-15T21:48:15.492183+01:00 INFO postfix/smtp[322]: name_mask: noanonymous
2022-03-15T20:48:15.493384384Z 2022-03-15T21:48:15.492189+01:00 INFO postfix/smtp[322]: smtp_sasl_authenticate: smtp.gmail.com[209.85.233.108]:587: SASL mechanisms XOAUTH2
2022-03-15T20:48:15.493391434Z 2022-03-15T21:48:15.492213+01:00 INFO postfix/smtp[322]: xsasl_cyrus_client_get_user: #@#.com
2022-03-15T20:48:15.493395264Z 2022-03-15T21:48:15.492221+01:00 INFO postfix/smtp[322]: xsasl_cyrus_client_get_passwd: #@#.com

But then this appears.

2022 Mar 15 21:48:15 nas Process 609233 (smtp) of user 100 dumped core.

Stack trace of thread 322:
#0 0x00007f669495a68e n/a (/usr/lib/libcurl.so.4.7.0 + 0x2068e)

bokysan added a commit that referenced this issue Mar 28, 2022
Hopefully this should reduce issues like #101.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant