Peter Maydell [Sun, 13 Nov 2005 23:57:49 +0000 (23:57 +0000)]
Pass some globals into sm_init() so that it uses SASL if necessary.
[NB that as I do not have a SASL setup I am relying on (a) the patch
being obviously correct and (b) the original submitter having tested!]
Peter Maydell [Sun, 13 Nov 2005 23:51:18 +0000 (23:51 +0000)]
Use context/ctxpath==NULL to indicate that no context file should be read,
to avoid inadvertently trying to lock /dev/null (takes 30secs+ with some
locking methods).
Peter Maydell [Sun, 6 Nov 2005 21:54:40 +0000 (21:54 +0000)]
Fix various buffer overruns in fmt_scan.c; the bulk of this is passing
buffer length through to decode_rfc2047() and having that function do
sufficient bookkeeping to avoid running off the end of the buffer.
Jon Steinhart [Fri, 19 Nov 2004 05:06:16 +0000 (05:06 +0000)]
Added mail directory argument to folder_addmsg in order to make it possible
to provide a path to the ext_hook call that is mailpath-based. A problem
existed when a folder was a symbolic link and the pwd call would return
the path relative to the filesystem, not to mailpath. A new argument was
needed because there was otherwise no reasonable way to get that path.
Jon Steinhart [Tue, 16 Nov 2004 18:14:34 +0000 (18:14 +0000)]
Fixed problem where the refile hook was being called after a message was
renamed so that it wasn't around for the hook. The hook is now called
before the message file is renamed.
Jon Steinhart [Tue, 12 Oct 2004 20:40:25 +0000 (20:40 +0000)]
Fixed strange bug that prevented a lock from ever being obtained if getting
it failed the first time. The problem was that the string of XXXXXX that
is required by mkstemp() was overwritten the first time through, and so
all subsequent times failed because mkstemp() failed. The fix
reinitializes the tmp file string.
[bug #4302] errno is not always an extern int
The errno declaration is best left to errno.h; several systems use
#define errno (*(___errno()))
or similar
[bug #4296] PUTD() macro can't hack 10 digit values
Once the number exceeded 1000000000, the conversion would fail. An execution of
dp -format "%(clock{text})" "Tue, 01 Jul 2003 21:38:05 +0700" would erroneously print 749660476, instead of 1057070285.
The macros PUTD() and PUTDF() have been replaced by snprintf() calls; These macros
should never have been written in the first place, when system functions exist to do the
work.
[bug #4296] PUTD() macro can't hack 10 digit values
Once the number exceeded 1000000000, the conversion would fail. An execution of
dp -format "%(clock{text})" "Tue, 01 Jul 2003 21:38:05 +0700" would erroneously print 749660476, instead of 1057070285.
The macros PUTD() and PUTDF() have been replaced by snprintf() calls; These macros
should never have been written in the first place, when system functions exist to do the
work.
fix handling of "-list" and "-seq" options, so behavior is orthoganal.
Previously, "pick -list -seq seqname" meant "pick -nolist -seq seqname".
Now "pick -list -seq seqname" and "pick -seq seqname -list" do the same thing.
Thanks to Robert Elz.
update 'mp->lowmsg' from 0 to 1 during regular 'inc' from mail spool;
avoids failure of 'folder_realloc()' for case of no messages in
folder, and more than 100 messages to incorporate. Initially,
'folder_read()' will initialize 'mp->lowmsg' to 0, and 'mp->lowoff'
to 1. So the call would be folder_realloc(mp, 1, 200), and the
comparison 'if (mp->nummsg > 0 && lo > mp->lowmsg)' will fail.
make 'spost' handling of "masquerade:" line of mts.conf containing
'draft_from' same as for 'post'. Debian bug report 144098, filed by
Terran Melconian.
status of action wasn't saved for use by 'N' result, so when 'N' was
used slocal could perform the action even if the previous
action failed. Debian bug report #149745, filed by Daniel Müller.
Apply bug fix reported to Debian (#136976) by Peter Maydell; allows
messages with "Content-Transfer-Encoding: binary" to be
displayed, per RFC 2045 section 6.2 paragraph 4
The first ``inc'' into an empty folder would not update the unseen
sequence. This is because seq_list() will return NULL if mp->nummsg
is zero. Insure that mp->nummsg is incremented.
Jeffrey C Honig [Mon, 11 Aug 2003 01:20:52 +0000 (01:20 +0000)]
When compiling format strings, nmh attempts to avoid multiple parsing
of address and date fields by only inserting calls to the parse
functions (FT_PARSEADDR and FT_PARSEDATE) for a given component once.
The problem with this method is that the initial invocation may
actually be on a code path that is conditionally executed. This can
result cached copies of data from the fields in previous messages to
be used.
My solution is to move this optimization from compile time to run time.
Address and Date parsing calls (FT_PARSEADDR and FT_PARSEDATE) will
always be included. Run time flags are used to prevent these functions
from being run more than once per component per message.
The c_flags field has being converted from a boolean to a bit-field to
facilitate maintenance of the new CT_PARSED value. The result value
that used to be in this field is now the bit CF_TRUE and the
overloaded use of this field by scan() is now the CT_DATEFAB bit.
Some unneeded flags (CT_ADDRPARSE, CT_MYMBOX) have also been removed.
Glenn Burkhardt [Mon, 30 Jun 2003 18:58:07 +0000 (18:58 +0000)]
fix bug #1393, "sortm core dumps", using patch provided by
Robert Elz, kre@munnari.oz.au. The core dump occurred
when "Subject:" was immediately followed by an
alphanumeric, and "-textfield subject" were used
as arguments.