robmueller / mail-imaptalk Goto Github PK
View Code? Open in Web Editor NEWPerl IMAP client interface with lots of features
Home Page: http://search.cpan.org/~robm/Mail-IMAPTalk/
Perl IMAP client interface with lots of features
Home Page: http://search.cpan.org/~robm/Mail-IMAPTalk/
Hello,
let suppose this IMAP query:
a getannotation "" "/vendor/EXAMPLE/*example.com" ("value.priv" "value.shared")
* ANNOTATION "" "/vendor/EXAMPLE/uc.example.com" ("value.priv" "maildata40")
* ANNOTATION "" "/vendor/EXAMPLE/example.com" ("value.priv" NIL "value.shared" NIL)
* ANNOTATION "" "/vendor/EXAMPLE/uc.example.com" ("value.shared" NIL)
a OK Completed
For some reason, for the same metadata (uc.example.com
above) the Cyrus IMAP Server returns two rows.
Well, if I query
use Data::Dumper;
$Data::Dumper::Terse = 1;
$read=$IMAP->getannotation( "", "/vendor/EXAMPLE/*example.com", "value.*" );
print Dumper($read);
then I see:
{
'' => {
'/vendor/EXAMPLE/example.com' => {
'value.shared' => undef,
'value.priv' => undef
},
'/vendor/EXAMPLE/uc.example.com' => {
'value.shared' => undef
}
}
}
I suppose that getannotation
saves only the result returned in the last row, if multiple rows for the same metadata occurs.
If I modify the getannotation
to return only value.priv, I will correctly see:
{
'' => {
'/vendor/EXAMPLE/example.com' => {
'value.priv' => undef
},
'/vendor/EXAMPLE/uc.example.com' => {
'value.priv' => 'maildata40'
}
}
}
When sending a literal value, server is currently expected to return a + go ahead
-like response. Otherwise sending routine dies, leaving only the last error message (get_last_error
) available; for example:
IMAP Command : 'append' failed. Reason was : IMAPTalk: Did not get "+ ...go ahead..." response from IMAP server. Got - 33 NO Over quota at /usr/local/share/perl/5.10.1/Mail/IMAPTalk.pm line 3083
In particular the server IMAP response is not available (get_last_completion_response
).
However in some cases the server can return a tagged NO
response instead of + go ahead
. That's for example the case when appending a message in an overquota mailbox, or when trying to send a literal which size is not handled (too big) by the server.
That's allowed from the server, and in those cases it is useful to be able to get the IMAP response.
Could this behaviour be fixed ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.