emersion / hydroxide

A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge
MIT License
1.62k stars 125 forks source link

OpenBSD imap LOGIN: NO madvise: function not implemented #284

Open FozzeY opened 2 days ago

FozzeY commented 2 days ago

Hydroxide is built from source as per the docs on OpenBSD 7.6. Go version is go1.23.1 openbsd/amd64. I am unable to authenticate with hydroxide imap using the correct bridge password. On both mutt and telnet I get a peculiar error on login: NO madvise: function not implemented

Here are the debug logs from hydroxide imap:

2024/11/10 20:55:30 IMAP server listening on 127.0.0.1:1143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR CHILDREN UNSELECT MOVE IDLE APPENDLIMIT AUTH=PLAIN] IMAP4rev1 Service Ready
a0 login <email> <bridge password>
2024/11/10 20:55:42 >> POST /api/auth/refresh
2024/11/10 20:55:42 {"RefreshToken":"<token>","ResponseType":"token","GrantType":"refresh_token","RedirectURI":"http://www.protonmail.ch"}
2024/11/10 20:55:43 << POST /api/auth/refresh
2024/11/10 20:55:43 &protonmail.authResp{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Auth:protonmail.Auth{ExpiresAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Scope:"full self organization payments keys parent user loggedin paid nondelinquent mail vpn calendar drive docs pass verified settings wallet", UID:"<uid>", AccessToken:"<token>", RefreshToken:"<token>", UserID:"", EventID:"", PasswordMode:0, TwoFactor:struct { Enabled int; U2F interface {}; TOTP int }{Enabled:0, U2F:interface {}(nil), TOTP:0}}, ExpiresIn:86400, TokenType:"Bearer", ServerProof:""}
2024/11/10 20:55:43 >> GET /api/users
2024/11/10 20:55:43 << GET /api/users
2024/11/10 20:55:43 &struct { protonmail.resp; User *protonmail.User }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, User:(*protonmail.User)(0xc000162630)}
2024/11/10 20:55:43 >> GET /api/addresses
2024/11/10 20:55:43 << GET /api/addresses
2024/11/10 20:55:43 &struct { protonmail.resp; Addresses []*protonmail.Address }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Addresses:[]*protonmail.Address{(*protonmail.Address)(0xc00011d220)}}
2024/11/10 20:55:43 >> GET /api/users
2024/11/10 20:55:43 << GET /api/users
2024/11/10 20:55:43 &struct { protonmail.resp; User *protonmail.User }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, User:(*protonmail.User)(0xc000162b40)}
2024/11/10 20:55:43 >> GET /api/addresses
2024/11/10 20:55:43 << GET /api/addresses
2024/11/10 20:55:43 &struct { protonmail.resp; Addresses []*protonmail.Address }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Addresses:[]*protonmail.Address{(*protonmail.Address)(0xc00011d4a0)}}
a0000 NO madvise: function not implemented

To me it looks like the authentication process is successful, but in the end login is denied with the same error message.

emersion commented 2 days ago

Maybe an issue with boltdb?

FozzeY commented 2 days ago

https://github.com/boltdb/bolt/issues/646

Seems like it, yes. Is there a workaround?

emersion commented 2 days ago

Maybe migrating to bbolt?