- 05 Feb, 2001 7 commits
-
-
-
-
-
* mailbox/imap4d/select.c : First draft implementation. * mailbox/imap4d/util.c : Add util_msgset() and util_send(). Reuse of util_getcommand() for subcommands.
Alain Magloire authored -
message_set_get_uid(). * include/mailutils/mailbox.h: New prototypes mailbox_uidnext(), mailbox_uidvalidity().
Alain Magloire authored -
the UID of the message (IMAP definition) and message_get_uidl() for the POP3 definition. * mailbox/attachment.c : Indentation fixes. * mailbox/file_stream.c : Make sure that the FILE* is close before opening. * mailbox/folder_imap.c : Use strcasecmp() not strcmp(). * mailbox/mailbox.c : Added mailbox_uidnext() and mailbox_uidvalidity. * mailbox/mapfile_stream.c : When munmap() failed we should check against MAP_FAILED, not NULL. * mailbox/mbx_imap.c : Implement imap_uidnext(), imap_uidvalidity() imap_message_uid(). * mailbox/mbx_mbox.c : Implement mbox_uidnext(), mbox_uidvalidity() mbox_message_uid(). * mailbox/mbx_mboxscan.c : Implement uidvalidity, it is save int the header of the first message, "X-IMAPbase: 127673838 123", a la c-client. Save UID, it is save in "X-UID". * mailbox/mbx_pop.c : Implement pop_messages_recent(), pop_message_unseen() and pop_uid(). * mailbox/trans_stream.c : Indentation fixes.
Alain Magloire authored
-
- 02 Feb, 2001 3 commits
-
-
is known, we can use memcpy() and friends for string manipulations. memXXX() functions are builtin in GNU C (gcc) and are much faster then the strXXX() counterparts. Small change in the loop to take advantage of this. * pop3d/quit.c : The rfc1939 insist that after a QUIT, we must release any resources and close the connection: "Whether the removal was successful or not, the server then releases any exclusive-access lock on the maildrop and closes the TCP connection." This was not done if error occured while expunging, no we will close the connection and notify the client of the error(ERR_FILE).
Alain Magloire authored -
not found. * mailbox/mbx_mbox.c: When expunging check to see if the registar the path_record too.
Alain Magloire authored -
-
- 01 Feb, 2001 3 commits
-
-
-
header_get_fvalue() mailutils/mailbox.h : rename mailbox_recent_count() to mailbox_unseen_count()
Alain Magloire authored -
header.c mbx_mboxscan.c mbx_mbox.c : an other attempt for speed when parsing, the most common use headers (From, To, Date, CC,..) are save in the structure, so when retrieve them it will be faster. Downside the tight parsing loop is not so thight and is frankly ugly. More memory is being use per messages. It is hard to guess at this stage the memory patterns and where to optimise, probably my last attempt at this before the code become truly unmaintable. mbx_imap.c mailbox.c : I did not understand the difference between "recent" and "unseen" english words. I think that "unseen" means new mail, an "recent" mail that was not read yet. So I had to rename some functions mailbox_recent_count() to mailbox_unseen_count(), but I maybe wrong ... sigh somebody with better english skill should explain this to me. mbx_pop.c include/header0.h include/mailbox0.h : Introduce header_set_fill() to let the mailboxes fill up a buffer that will contains the entire headers.
Alain Magloire authored
-
- 29 Jan, 2001 4 commits
-
-
-
-
and update Copyrigth. * pop3d/pop3d.c : Remove mbox_record register, only need path_record. * pop3d/retr.c : When retrieve a message should be mark as read. since we do not strip out the header "Status:". * pop3d/top.c : Adjust stream_readline().
Alain Magloire authored
-
- 26 Jan, 2001 5 commits
-
-
shape and ready. The biggest thing will be the awfull parsing done for FETCH/SEARCH etc .. "This will be for another day" -- Scarlet O'hara
Alain Magloire authored -
- 25 Jan, 2001 3 commits
-
-
failed ofile == NULL we should not attempt to fprintf(ofile, ..) nor fflush(). Buglet discover when working on imap4d. pop3d.[ch]/user.c : indentation and comments.
Alain Magloire authored -
-
change, this will help to know if the message_is_modified() and speed things up when expunging. file_stream.c : Don't disable the stream buffering and let the OS choose the best BUFSIZ i.e. remove setbuf() call. message.c registrar.c mailer.c folder.c header.c list.c mailbox.c : Copyright and indent. mapfile_stream.c mbx_imap.c mbx_mbox.c mbx_pop.c : go easy on the stack for array of strings. stream.c : Put code for doing our own simple littel buffering.
Alain Magloire authored
-
- 23 Jan, 2001 3 commits
-
-
was doing the equivalent of: char buffer[1024]; memset (buffer, 0, 1024); ... read (popfd, buffer, 1024); ... ret = malloc (strlen (buffer) +1); According to the rfc a command line should be no longer then 255 but a malicious client could send a big buffer that could fit 1024 then buffer would not be null terminated, strlen(buffer) may be supceptible to overflow. A simple fix would be to read (fd, buffer, 1023); /* leave space for a null */ I've put a different fix that does not need the call to memset(). And at the same time reduce the size of the buffer to go easy on the stack 512 is sufficient.
Alain Magloire authored -
-
-
- 20 Jan, 2001 2 commits
-
-
-
pop: RETR and TOP if buffer is not a full line i.e terminated by a '\n' realloc the buffer and try again. pop: STAT remove excess comment. pop: user use the /dev/null scheme if mailbox does not exist. mailbox: buglet if the mailbox format we were reading less then expected.
Alain Magloire authored
-
- 19 Jan, 2001 2 commits
-
-
-
to the "frm" that comes with elm package. It was written in less then 15 minutes, cool.
Alain Magloire authored
-
- 17 Jan, 2001 2 commits
-
-
- 16 Jan, 2001 5 commits
-
-
-
include multiple times. Compiler like Watcomm C, will scream loudly about definition of those variables multiple times. Gcc is very silent about this. So in pop3d.h we declare those variables extern and move the definition in pop3d.c. MAXHOSTNAMELEN is define in netinet/in.h on Solaris so we guard with #ifdef's. We were calling syslog("%s ", NULL); On solaris passing a NULL to a printf function will crash and burn, this was a FIXME I did not see it earlier the NULL was the place holder for the mailbox name.
Alain Magloire authored -
address.c mime.c misc.c: Always cast to (unsigned char) when using the ctype functions like isspace(); mbx_default.c: If _PATH_SENDMAIL not set via paths.h use "/usr/spool/mail" message.c: uidl is now <md5 . time . sequene> tcp.c: INADDR_NONE is not define on solaris define it to -1.
Alain Magloire authored -
Modify send.c to sendmail an create temporary filenames more securely. Copyright change --> 2001 and extra spaces nukes, done by emacs automaticaly.
Alain Magloire authored -
mail: fix list.c so that command listing is formatted properly pop3: STAT command didn't properly reflect deleted messages
Jakob Kaivo authored
-
- 15 Jan, 2001 1 commit
-
-