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

implement TOP command from POP3 #62

Open
jduepmeier opened this issue Dec 5, 2020 · 1 comment
Open

implement TOP command from POP3 #62

jduepmeier opened this issue Dec 5, 2020 · 1 comment

Comments

@jduepmeier
Copy link
Member

the TOP command is an optional command to receive only a limited number of lines from a mail body (https://tools.ietf.org/html/rfc1939#page-11).

I think this will help to speed up mail fetching where the body is not important only header lines.

@cbdevnet
Copy link
Member

cbdevnet commented Dec 7, 2020

Seems doable, I'll look into it!

Will require addition of the command to https://github.com/cmail-mta/cmail/blob/master/cmail-popd/popstatemachine.c (state_transaction) as well as addition of a handler to https://github.com/cmail-mta/cmail/blob/master/cmail-popd/popfunctions.c.

Due to the escape character required in the protocol, it might be useful to extend pop_retr with an additional parameter for the number of lines instead of implementing the bytestuffing again. This would require also introducing some rudimentary parsing to separate at least the header section from the data section (as the RFC specifies that the argument is taken to mean "headers + n lines").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants