tarickb / sasl-xoauth2

SASL plugin for XOAUTH2
Other
73 stars 21 forks source link

Output file is unrecognized argument #55

Closed ziegenhals closed 1 year ago

ziegenhals commented 1 year ago

Its probably a dumb question but what am I doing wrong here? image

FYI, I can successfully generate token but without specifying output file. I can also test it without any issues (config check passed) while doing copy-paste to random file.

But then I got the following issue after email sending: TokenStore::Read: failed to open file /var/spool/postfix/etc/tokens/xXx: No such file or directory (tried with suggested location for token i.e /var/spool/postfix/etc/tokens & /etc/tokens/. Permissions are just fine.)

do you think it might somehow related to my first question./doubt?

tarickb commented 1 year ago

For the first part of your question: it appears that the argument parser we're using for sasl-xoauth2-tool is sensitive to the position in which some arguments appear. What you tried won't work, but this should:

sasl-xoauth2-tool get-token --client-id=foo outlook /tmp/token

(Note that --client-id= appears before outlook.)

As for the second part: the path you put into /etc/postfix/sasl_passwd should be the chroot-ed path (so /etc/tokens/xXx in your case), but the token file itself should go into /var/spool/postfix/etc/tokens.

ziegenhals commented 1 year ago

@tarickb Thank you for your prompt response. I've got it all clear now. Keep up the good work!