-
Notifications
You must be signed in to change notification settings - Fork 274
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
WIP: POP3 support #769
base: master
Are you sure you want to change the base?
WIP: POP3 support #769
Conversation
The server currently compiles and runs, but I haven't tested it with a non-empty mailbox. Is there an easy way to generate/import test data for that purpose? |
|
||
// Undelete all messages marked as deleted in single connection | ||
func (endp *Endpoint) Rset(user pop3backend.User) error { | ||
return fmt.Errorf("pop3: unimplemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this can be implemented. Perhaps keep track of all messages that were Deleted and revert if this is called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to be most reliable solution, considering current IMAP-based interface.
// client is greater than than the number of lines in the | ||
// body, then the POP3 server sends the entire message. | ||
func (endp *Endpoint) Top(user pop3backend.User, msgId int, n int) (lines []string, err error) { | ||
return nil, fmt.Errorf("pop3: unimplemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there code I can reference for formatting the message headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that one is tricky. I guess, you would need to consume Literals returned by ListMessages and format them yourself. It is okay to partially consume returned value.
return "", fmt.Errorf("internal server error") | ||
} | ||
|
||
return strconv.FormatUint(uint64(msg.Uid), 10), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return value is wrong.
Adds support for the POP3 protocol. A lot of work is still needed, but I wanted to get some early feedback on the direction I'm taking. The code was based off
imap
, so there may be some dead code remaining.Implements #650