- 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 5 commits
-
-
- 14 Jan, 2001 3 commits
-
-
-
-
When expunging check if the message as been modified, for example "X-UIDL" maybe add in the header it will now be save in the message. expunge reuse the same code of mbox_append_message(). add a new header_set_fill() to get the header of the messages form the mailbox.
Alain Magloire authored
-