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

The imap service provided by 163.com could not be access. #190

Merged
merged 13 commits into from Mar 24, 2015

Conversation

zhanleewo
Copy link
Contributor

163 mail server will reject the command which with a number tag.
eg.
1 CAPABILITY
2 LOGIN USERNAME PASSWORD
3 CAPABILITY
4 LIST "" ""
5 ID NIL
6 SELECT INBOX
this command sequence above, will be reject at the last line by 163.com mail server, the response is:
6 NO SELECT The login is not safe! Please update your mail client: http://mail.163.com/dashi

if the command tag with some prefix character.this issue will be solved.

163 mail server will reject the command which with a number tag.
@dinhvh
Copy link
Owner

dinhvh commented Mar 20, 2015

Could you add a setting in mailimap to tweak that behavior?

void mailimap_set_163_workaround_enabled(mailimap * imap, int enabled);
int mailimap_is_163_workaround_enabled(mailimap * imap);

@zhanleewo
Copy link
Contributor Author

I think the two function had better defined as:
void mailimap_set_complex_command_tag_enabled(mailimap * imap, int enabled);
int mailimap_is__complex_command_tag_enabled(mailimap * imap);

@@ -2502,7 +2502,7 @@ mailimap * mailimap_new(size_t imap_progr_rate,

f->imap_logger = NULL;
f->imap_logger_context = NULL;

f->complex_command_tag_enabled = 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ";": the build failed.

@dinhvh
Copy link
Owner

dinhvh commented Mar 23, 2015

I like mailimap_set_163_workaround_enabled() because it's self documenting. If you really like mailimap_set_complex_command_tag_enabled(), add a comment to describe what it's for. Also, I'm not sure that it makes the tag really complex either.

changed 
` int mailimap_is__complex_command_tag_enabled(mailimap * imap); `
` void mailimap_set_complex_command_tag_enabled(mailimap * imap, int enabled);`
to
`int mailimap_is_163_workaround_enabled(mailimap * imap);`
`void mailimap_set_163_workaround_enabled(mailimap * imap, int enabled);`
changed 
` int mailimap_is__complex_command_tag_enabled(mailimap * imap); `
` void mailimap_set_complex_command_tag_enabled(mailimap * imap, int enabled);`
to
`int mailimap_is_163_workaround_enabled(mailimap * imap);`
`void mailimap_set_163_workaround_enabled(mailimap * imap, int enabled);`
changed mailimap's member `complex_command_tag_enabled` to `is_163_workaround_enabled`.
@zhanleewo
Copy link
Contributor Author

changed
int mailimap_is__complex_command_tag_enabled(mailimap * imap);
void mailimap_set_complex_command_tag_enabled(mailimap * imap, int enabled);
to
int mailimap_is_163_workaround_enabled(mailimap * imap);
void mailimap_set_163_workaround_enabled(mailimap * imap, int enabled);

changed parameter name from `imap` to `session`.
@dinhvh
Copy link
Owner

dinhvh commented Mar 24, 2015

Thanks!

dinhvh added a commit that referenced this pull request Mar 24, 2015
Implemented workaround for 163.com servers.
@dinhvh dinhvh merged commit 050f15f into dinhvh:master Mar 24, 2015
@zhanleewo zhanleewo changed the title Patch 1 The imap service provided by 163.com could not be access. Mar 25, 2015
zhanleewo added a commit to zhanleewo/libetpan that referenced this pull request Mar 26, 2015
@zhanleewo zhanleewo mentioned this pull request Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants