Dag Nygren | 19 Aug 19:04

Mark mail as archived


Hi again,

just asked about the ANNOTATE (METADATA) facility
in IMAP and found that it isn't good for marking my
mailing list emails as archived in our company
archive.
Seems like using flags would be another possibility
and now my question is more about UW-IMAP:

Is it possible to define your own flags? The standard
seems to allow that.

Best
Dag

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Jeffrey Parker | 19 Aug 15:30

Using hashed mail spool directories with UW IMAP server

Hello,

             I was wondering if anyone out there has modified the
mailboxdir() and/or the sysinbox() routines to support mail spool
directories of the format

/var/spool/mail/first_letter/second_letter/username

for example

/var/spool/mail/j/o/joe

or

/var/spool/mail/b/i/bill

My C programming skills are extremely rusty.  :-)  Hoping somebody out
there has done this already.

Thanks in advance,

Jeff

Dag Nygren | 18 Aug 15:45

IMAP annotation utility


Hi,

just in the process of converting my old MH mailstore to mix and run into a 
problem with my mailing list archiving connection. It would need to annotate 
the mail as archived when it is.

My question is:

Is there a simple command line utility to add an annotation to a IMAP mail?
Or a Perl iinterface for ANNOTATE?

Best
Dag
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Lee Lundrigan | 12 Aug 01:49

imap-2007b instillation - did it work?

Hi everyone,

I am trying to build the c-client but I am unsure if the build failed or 
was successful.

Somethings you would like to know:
OS: CentOS 5.2 (final)
PAM, OpenSSL all installed
Asterisk Build :)

The first time I built the c-client there were a lot of warnings so I 
went into "src/osep/unix/ssl_unix.c"
and changed line #101 FROM:
    if (stat ("/dev/urandom",&sbuf)) {
      while ((fd = open (tmpnam (tmp),O_WRONLY|O_CREAT|O_EXCL,0600)) < 0)

TO:
    if (stat ("/dev/urandom",&sbuf)) {
      while ((fd = open (mkstemp (tmp),O_WRONLY|O_CREAT|O_EXCL,0600)) < 0)

I was getting the error:
/home/laszlo/src/imap-2007b/c-client/osdep.c:337: warning: the use of 
`tmpnam' is dangerous, better use `mkstemp'

The warnings went away but I had the same output:
Building bundled tools...
cd mtest;make
make[2]: Entering directory `/home/laszlo/src/imap-2007b/mtest'
`cat ../c-client/CCTYPE` -I../c-client `cat ../c-client/CFLAGS`   -c -o 
mtest.o mtest.c
(Continue reading)

Josh Freed | 8 Aug 19:23

Crash fetching an empty text part

Hello,

I've got a php app using the php-imap extension and a segmentation fault 
occurs during a call to imap_fetchbody on a specific message and 
section. I've attached an example email message that causes my crash. It 
seems a multipart/mixed message that contains a text part with no text 
will crash when I attempt to fetch the empty part. I tried a message 
that wasn't multipart and contained only a single empty text part and no 
crash occurred.

Debugging, I see the crash occurs in memcpy called from c-client. I 
believe that the problem is in the imap_parse_string function. The crash 
scenario calls imap_parse_string with the value "{-1}" in the txtptr 
parameter. Later in the function the "-1" is extracted and passed to 
strtoul which understandably isn't terribly happy about bing asked to 
make a negative number unsigned. The crazy value returned from strtoul 
is passed down to the memcpy which crashes.

At this point I am a bit stumped. I'm not sure where that "-1" is coming 
from, though I suspect it could be from the imap server. We're using 
Zimbra which uses cyrus (2.1.22.3) for imap. The php app is running on 
Fedora 9 using php 5.2.6-2 and libc-client-2007b-1 both installed by rpm.

If there's any help or advice anyone can offer I would appreciate it. 
Let me know if you need any more info. Thanks!
Date: Thu, 07 Aug 2008 10:47:41 -0400
From: Josh Freed <josh <at> fakeemail.com>
MIME-Version: 1.0
(Continue reading)

Mark Crispin | 8 Aug 00:49

RE: patch: fix for rare smtp_close() crash


Thank you.  Your proposed patch is correct, and is now in Panda IMAP.

For what it's worth, there may be some news about a public distribution
of Panda IMAP later this month.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

> Date: Fri, 8 Aug 2008 00:31:00 +0200
> From: vz-cclient <at> zeitlins.org
> To: imap-uw <at> u.washington.edu
> Subject: [Imap-uw] patch: fix for rare smtp_close() crash
>
> Hello,
>
> Although Mark doesn't maintain the library any more, I hope this small
> patch is still going to be useful to someone. It fixes a rare problem (but
> which does happen as it just did do a user of my program) in smtp_close()
> which reads like this in the latest version I have:
>
> if (stream) { /* send "QUIT" */
> if (stream->netstream) { /* do close actions if have netstream */
> smtp_send (stream,"QUIT",NIL);
> net_close (stream->netstream);
> }
> ...
(Continue reading)

Vadim Zeitlin | 8 Aug 00:28

patch: fix for rare smtp_close() crash

 Hello,

 Although Mark doesn't maintain the library any more, I hope this small
patch is still going to be useful to someone. It fixes a rare problem (but
which does happen as it just did do a user of my program) in smtp_close()
which reads like this in the latest version I have:

  if (stream) {			/* send "QUIT" */
    if (stream->netstream) {	/* do close actions if have netstream */
      smtp_send (stream,"QUIT",NIL);
      net_close (stream->netstream);
    }
  ...

The problem is that the connection could be lost inside smtp_send() in
which case netstream is reset to NIL in smtp_fake() and the call to
net_close() crashes. The following trivial patch fixes it:

Index: lib/imap/src/c-client/smtp.c
===================================================================
--- lib/imap/src/c-client/smtp.c	(revision 7536)
+++ lib/imap/src/c-client/smtp.c	(revision 7537)
@@ -396,7 +396,8 @@

   if (stream) {			/* send "QUIT" */
     if (stream->netstream) {	/* do close actions if have netstream */
       smtp_send (stream,"QUIT",NIL);
-      net_close (stream->netstream);
+      if (stream->netstream)	/* could have been closed during "QUIT" */
+        net_close (stream->netstream);
(Continue reading)

Shawn Walker | 6 Aug 00:11

utf8_mime2text doesn't decode "ISO-8859-1''%..."

I have a message from the latest thunderbird client that is setting the filename as:

Content-Disposition: inline;
  filename*0*=ISO-8859-1''%65%78%65%6D%70%6C%65%2D%64%E9%64%E9%6D%2D%31%2E;
  filename*1*=%35%2E%70%64%66

The issue is that utf8_mime2text isn't decoding the filename.  Is there an update to c-client that 
will correctly decode the filename?  c-client is handling the filename*#* correctly, just not 
decoding it.
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Joe Pruett | 23 Jul 01:45

mix conversion on live system

i doesn't look like there is an easy way to convert people's inboxes and 
mail folders over to mix while the server is live.  i haven't delved into 
the guts of mixcvt, but i'm wondering if it locks the input folder while 
reading so that i could then hack in a quick rename into mixcvt.  but i'm 
not sure if the locking of the other tools would have already opened the 
original file and just merrily use it after the lock vanished?  what i'm 
hoping for is:

exclusive lock original
mix convert to temp
rename original to backup
rename temp to original
unlock original

so that the worst that happens is during the conversion, a user is denied 
access to the mailbox being converted.  do i have any hope?
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Bruno Richard | 17 Jul 16:49

imap and solaris 10 : execution process terminated abnormally

Hello,

I got a new mail serveur and I'm installing components.
I had no problem until I tried  to install imap.
I'm using solaris 10 on a sun T1000 server.
I compiled imap-2007b without any problem
(make options are :  gso PASSWDTYPE=pmb. The mail serveur is a ldap  
client)

When using thunderbird I can be connected to my mailbox
(i.e. ssl is ok) but when I try to delete messages in my Inbox,
I get sometimes (yes, sometimes !) the following message:

"Alert
The current command did not succeed. The mail server responded:
Execution process terminated abnormally (d)."

of course, there is nothing in the logs...

Any idea ?
thanks in advance

Bruno

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

(Continue reading)

Pankaj Bathwal | 17 Jul 10:38

Making multiple Imap Client Connection im my application

Hello,

I am using c-client to make IMAP connection to mail server.

My application is multi-threaded and need to make multiple client connections in different threads.

While trying to connect using mail_open in more than one thread simultaneously, I am facing an issue.

I am getting a fetal error in log “env_init called twice” and c-client calls abort to terminate the application.

 

My question is:

Can we make multiple simultaneous calls to mail_open in different threads to connect to mail server as different mail user?

Is there another way to support multiple client connection simultaneously?

 

This is stack trace of aborted thread.

 

  [1] __sigprocmask(0x0, 0xfedfbf70, 0x0, 0x0, 0x0, 0x0), at 0xff1091f0

  [2] _resetsig(0xff10b7f4, 0x0, 0x0, 0xfedffd98, 0xff11c000, 0x0), at 0xff0fe56c

  [3] _sigon(0xfedffd98, 0xff1238a8, 0x6, 0xfedfc044, 0xfedffd98, 0xff12321c), at 0xff0fdd0c

  [4] _thrp_kill(0x0, 0x5, 0x6, 0xff11c000, 0x5, 0xff0c0458), at 0xff100d4c

  [5] raise(0x6, 0x0, 0x0, 0xffffffff, 0x1da3e0, 0xfedfba10), at 0xff04bce0

  [6] abort(0xff0bc008, 0x1a3b50, 0x1d45b0, 0x0, 0x0, 0xef000), at 0xff035984

  [7] fatal(string = ???) (optimized), at 0x2b708 (line ~38) in "ftl_unix.c"

  [8] env_init(user = ???, home = ???) (optimized), at 0x2f3ec (line ~798) in "env_unix.c"

  [9] myusername_full(flags = ???) (optimized), at 0x2f978 (line ~901) in "env_unix.c"

  [10] tcp_aopen(mb = ???, service = ???, usrbuf = ???) (optimized), at 0x33a00 (line ~373) in "tcp_unix.c"

  [11] net_aopen(dv = ???, mb = ???, service = ???, user = ???) (optimized), at 0x49cac (line ~6211) in "mail.c"

  [12] imap_rimap(stream = ???, service = ???, mb = ???, usr = ???, tmp = ???) (optimized), at 0x64220 (line ~1033) in "imap4r1.c"

  [13] imap_open(stream = ???) (optimized), at 0x63698 (line ~869) in "imap4r1.c"

  [14] mail_open_work(d = ???, stream = ???, name = ???, options = ???) (optimized), at 0x3c378 (line ~1340) in "mail.c"

  [15] mail_open(stream = ???, name = ???, options = ???) (optimized), at 0x3bebc (line ~1262) in "mail.c"

  [16] ImapClient::connectToServer(this = ???) (optimized), at 0xaae10 (line ~48) in "ImapClient.c"

  [17] ImapClientMgr::getNewImapClient(this = ???, p_MailHost = CLASS, p_Username = CLASS, p_Password = CLASS) (optimized), at 0x29540 (line ~39) in "ImapClientMgr.c"

  [18] ImapThreadFunc(arg = ???) (optimized), at 0x2a8dc (line ~42) in "ClientWrapperMain.c"

 

 

Thanks and Regards,

Pankaj Bathwal

 

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Gmane