Bug report: IMAP APPENDLIMIT behave chaos
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- backend, networking
Research direction
Reproduce the issue using the Docker configuration, the maddy imap-acct appendlimit command, and an IMAP client calling STATUS on INBOX. Start at the IMAP STATUS and APPENDLIMIT handling, compare the account and mailbox limits shown by the SQLite query, and verify that an unlimited mailbox reports APPENDLIMIT NIL rather than 0.
Written by the indexing model from the issue text.
Description
Describe the bug
IMAP APPENDLIMIT settings behave in effected, conflict with maddy settings.
Steps to reproduce
- Run maddy in Docker as instructed in https://maddy.email/docker/
- Create a
credsandimap-acctfor an account - Now we can expect this account has no LIMIT (NIL) with APPENDLIMIT because account and mboxes are both has no limit.
# docker exec -it maddy maddy imap-acct appendlimit foxcpp@maddy.test
No limit
# sqlite3 imapsql.db 'select * from mboxes where msgsizelimit is null'
1|1|INBOX|1|0||7|1439825317||5
2|1|Sent|1|0||1|3335251900|\Sent|0
3|1|Trash|1|0||1|3434545230|\Trash|0
4|1|Junk|1|0||1|418662061|\Junk|0
5|1|Drafts|1|0||1|1872697851|\Drafts|0
6|1|Archive|1|0||2|556772642|\Archive|0
- But in effect, this account has an APPENDLIMIT to ZERO
# python
>>> import imaplib
>>> s=imaplib.IMAP4_SSL('127.0.0.1')
>>> s.login('foxcpp@maddy.test', 'foxcpp')
('OK', [b'[CAPABILITY IMAP4rev1 LITERAL+ SASL-IR CHILDREN UNSELECT MOVE IDLE APPENDLIMIT I18NLEVEL=1 SORT THREAD=ORDEREDSUBJECT COMPRESS NAMESPACE] LOGIN completed'])
>>> s.status('INBOX', '(APPENDLIMIT)')
('OK', [b'INBOX (APPENDLIMIT 0)'])
According to RFC7889 The IMAP APPENDLIMIT Extension, the APPENDLIMIT flag in s.login() indicates server support this extension and client will need to discover upload limits for each mailbox. And the STATUS Response indicates server will not accept any APPEND commands at all for the affected mailboxes.
I am expecting to see the following STATUS response, which indicates the mailbox has no limit.
>>> s.status('INBOX', '(APPENDLIMIT)')
('OK', [b'INBOX (APPENDLIMIT NIL)'])
Log files
No need
Configuration file
Exactly same as https://github.com/foxcpp/maddy/blob/fa47d40f6d510a431d2bbc238c7d36a58774ae2f/maddy.conf.docker
Environment information
- maddy version: 0.8.1
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 327
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from foxcpp/maddy
-
ready-for-release
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug invalid
-
bug
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug group: validation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
codecheckers/chekhov#51 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100