Marko Ivancic | 22 May 2006 15:05
Picon

create mailfolder on server (IMAP)

Hi.

Is possible with libetpan to create a new mailfolder (using IMAP) on the 
mail server.

Tnx,

By,
Marko

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
DINH Viêt Hoà | 22 May 2006 18:28
Picon
Favicon

Re: create mailfolder on server (IMAP)

On 22 May 2006, at 15:05, Marko Ivancic wrote:

> Hi.
>
> Is possible with libetpan to create a new mailfolder (using IMAP)  
> on the mail server.

The best way to do this is to use the low-level API :

int mailimap_create(mailimap * session, const char * mb);

Then, to create a mailfolder datastructure for it.

--

-- 
DINH Viêt Hoà

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
Marko Ivancic | 23 May 2006 10:20
Picon

move mailmessage

Hi,

Is possible with IMAP to move a selected mailmessage from one folder to 
another.

I tried with mailfolder_append_message(...), but the message must be 
furst "downloded" then appended to folder.

Tnx,

By,
Marko

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Michael Leupold | 23 May 2006 11:37
X-Face
Picon

Re: move mailmessage

Hi Marko,

Am Dienstag, 23. Mai 2006 10:20 schrieb Marko Ivancic:
> Is possible with IMAP to move a selected mailmessage from one folder to
> another.
> I tried with mailfolder_append_message(...), but the message must be
> furst "downloded" then appended to folder.

One way you can definitely do this is via the low-level IMAP api. 
Unfortunately IMAP doesn't have a MOVE command, but it does have a COPY 
command:
int mailimap_copy(mailimap * session, struct mailimap_set * set, const char * 
mb)
it copies the messages specified by set to the destination mailbox mb.

after copy has succeeded you can simply remove the old messages.

Regards,
Michael

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Marko Ivancic | 23 May 2006 11:44
Picon

Re: move mailmessage

Tnx Michael.

Problem solved.

I see the best method to solve this kind of problems is to directly 
"grep" the libetpan headers file :)

Tnx again.
By,
Marko

Michael Leupold wrote:
> Hi Marko,
>
> Am Dienstag, 23. Mai 2006 10:20 schrieb Marko Ivancic:
>   
>> Is possible with IMAP to move a selected mailmessage from one folder to
>> another.
>> I tried with mailfolder_append_message(...), but the message must be
>> furst "downloded" then appended to folder.
>>     
>
> One way you can definitely do this is via the low-level IMAP api. 
> Unfortunately IMAP doesn't have a MOVE command, but it does have a COPY 
> command:
> int mailimap_copy(mailimap * session, struct mailimap_set * set, const char * 
> mb)
> it copies the messages specified by set to the destination mailbox mb.
>
> after copy has succeeded you can simply remove the old messages.
(Continue reading)

Michael Leupold | 23 May 2006 11:49
X-Face
Picon

Re: move mailmessage

Am Dienstag, 23. Mai 2006 11:44 schrieb Marko Ivancic:
> I see the best method to solve this kind of problems is to directly
> "grep" the libetpan headers file :)

Yes, that's true :) Alternatively, if you're working mostly on IMAP my advise 
is to download the rfc. You can find every command mentioned there as 
mailimap_command in mailimap.h :-)

Regards,
Michael

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Matt Ronge | 30 May 2006 05:03

Detecting server type

Is there a way to detect what kind of IMAP server is being run? I am 
using multiple threads and I have multiple connections open, on the 
servers I've tested so for it's been working great, with the exception 
of UW-IMAP. Is there a way that I can detect that it's UW-IMAP and scale 
back to one connection?

Are there any other servers that multiple connections won't work?
--

-- 
Matt Ronge

AIM: monkeybreadr
http://www.theronge.com

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
DINH Viêt Hoà | 30 May 2006 10:48
Picon
Favicon

Re: Detecting server type

On 30 May 2006, at 05:03, Matt Ronge wrote:

> Is there a way to detect what kind of IMAP server is being run? I  
> am using multiple threads and I have multiple connections open, on  
> the servers I've tested so for it's been working great, with the  
> exception of UW-IMAP. Is there a way that I can detect that it's UW- 
> IMAP and scale back to one connection?
>
> Are there any other servers that multiple connections won't work?

UW-IMAP will accept only one connection per mailbox.
I don't know much other servers that have this behavior.
Maybe you should not rely on the fact that the server will accept  
several connections per mailbox.
In etpanX, I use one connection for each mailbox and I will use some  
kind of scheduler for commands to send to the connection. That will  
implies obviously some delay for some commands.

--

-- 
DINH Viêt Hoà

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642

Gmane