Hi all,

I can't get PassCmd to work correctly.  Those are my relevant settings:

--8<---------------cut here---------------start------------->8---
IMAPAccount fastmail
Host imap.fastmail.com
User mym...@fastmail.fm
Pass GEHEIMNIS
#PassCmd "gpg --decrypt --output=- ~/.authinfo.gpg 2> /dev/null | grep 
imap.fastmail.com | sed 's/.*password \([^ ]\+\).*/\1/'"
SSLType IMAPS
--8<---------------cut here---------------end--------------->8---

With "Pass GEHEIMNIS" it works.  If I comment that and uncomment PassCmd
instead, I get:

--8<---------------cut here---------------start------------->8---
❯ mbsync fastmail
C: 0/1  B: 0/0  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0
IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO Incorrect 
username or password.
C: 1/1  B: 0/0  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0
--8<---------------cut here---------------end--------------->8---

But when I execute the PassCmd in a terminal, I get the very same output
(password).

--8<---------------cut here---------------start------------->8---
❯ gpg --decrypt --output=- ~/.authinfo.gpg 2> /dev/null \
    | grep imap.fastmail.com \
    | sed 's/.*password \([^ ]\+\).*/\1/'
GEHEIMNIS
--8<---------------cut here---------------end--------------->8---

I've also tried

--8<---------------cut here---------------start------------->8---
PassCmd +"gpg ..."
--8<---------------cut here---------------end--------------->8---

but that doesn't change anything.  The error is the same.

Here is the complete output when running mbsync -D fastmail.

--8<---------------cut here---------------start------------->8---
❯ mbsync -D fastmail
Reading configuration file /home/horn/.mbsyncrc
Channel fastmail
Opening master store fastmail-remote...
M: [ 1] Enter connect_store
Resolving imap.fastmail.com... ok
Connecting to imap.fastmail.com (66.111.4.136:993)...
M: [ 1] Leave connect_store
Opening slave store fastmail-local...
S: [ 2] Enter connect_store
S: [ 2] Callback enter connect_store, sts=0
pattern '*' (effective '*'): Path, no INBOX
S: [ 3] Enter list_store, flags=2
S: [ 3] Callback enter list_store
  GNU
  Urlaub/2020/Kalabrien
  Urlaub/2020
  Urlaub
  Junk Mail
  Trash
  Drafts
  training/spam
  training/ham
  training
  Notes
  INBOX
  mailinglists/git-users
  mailinglists/ding
  mailinglists/gnome-shell
  mailinglists/emacs-devel
  mailinglists/help-gnu-emacs
  mailinglists/isync-devel
  mailinglists/emacs-tangents
  mailinglists/gnu-community-private
  mailinglists/gnu-prog-discuss
  mailinglists/misc
  mailinglists/gnu-prog
  mailinglists/mu-discuss
  mailinglists/gnu-misc-discuss
  mailinglists/info-fsf
  mailinglists
  Archive
  Sent Items
S: [ 3] Callback leave list_store
S: [ 3] Leave list_store
S: [ 2] Callback leave connect_store
S: [ 2] Leave connect_store
Connection is now encrypted
M: * OK IMAP4 ready
M: >>> 1 CAPABILITY
M: * CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ENABLE UIDPLUS SASL-IR NAMESPACE 
CONDSTORE SORT LIST-EXTENDED QRESYNC MOVE SPECIAL-USE CREATE-SPECIAL-USE IDLE 
AUTH=PLAIN
M: 1 OK completed
Logging in...
Authenticating with SASL mechanism PLAIN...
M: >>> 2 AUTHENTICATE PLAIN <authdata>
M: 2 NO Incorrect username or password.
IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO Incorrect 
username or password.
M: [ 1] Callback enter connect_store, sts=3
M: [ 4] Enter cancel_cmds
M: [ 4] Callback enter cancel_cmds
M: Enter free_store
M: Leave free_store
M: [ 4] Callback leave cancel_cmds
M: [ 4] Leave cancel_cmds
S: [ 5] Enter cancel_cmds
S: [ 5] Callback enter cancel_cmds
S: Enter free_store
S: Leave free_store
S: [ 5] Callback leave cancel_cmds
S: [ 5] Leave cancel_cmds
M: [ 1] Callback leave connect_store
--8<---------------cut here---------------end--------------->8---

With the working Pass, the relevant difference is:

--8<---------------cut here---------------start------------->8---
Connection is now encrypted
M: * OK IMAP4 ready
M: >>> 1 CAPABILITY
M: * CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ENABLE UIDPLUS SASL-IR NAMESPACE 
CONDSTORE SORT LIST-EXTENDED QRESYNC MOVE SPECIAL-USE CREATE-SPECIAL-USE IDLE 
AUTH=PLAIN
M: 1 OK completed
Logging in...
Authenticating with SASL mechanism PLAIN...
M: >>> 2 AUTHENTICATE PLAIN <authdata>
M: 2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL ANNOTATE-EXPERIMENT-1 
BINARY CATENATE CHILDREN CONDSTORE CREATE-SPECIAL-USE ESEARCH ESORT 
LIST-EXTENDED LIST-MYRIGHTS LIST-STATUS MAILBOX-REFERRALS METADATA MOVE 
MULTIAPPEND NAMESPACE OBJECTID QRESYNC QUOTA RIGHTS=kxten SAVEDATE SEARCH=FUZZY 
SORT SORT=DISPLAY SPECIAL-USE STATUS=SIZE THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES UIDPLUS UNSELECT WITHIN DIGEST=SHA1 LIST-METADATA 
NO_ATOMIC_RENAME PREVIEW=FUZZY SCAN SORT=MODSEQ SORT=UID THREAD=REFS 
X-CREATEDMODSEQ X-REPLICATION XLIST XMOVE XAPPLEPUSHSERVICE LOGINDISABLED 
XCONVERSATIONS COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE 
X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] User logged in 
SESSIONID=<sloti34d2t04-1607766158-1208472-1-4237913880931834405>
M: >>> 3 COMPRESS DEFLATE
M: 3 OK DEFLATE active
--8<---------------cut here---------------end--------------->8---

What am I doing wrong?

Bye,
Tassilo


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to