04 April 2007

* Set the socket non-blocking in before setting up SSL in connect.c, otherwise
  SSL_connect might block.

03 April 2007

* Instead of doing complicated things to see if a mmap'd region is okay, just
  fill it with zeros using write(2). This also avoids FS fragmentation on
  FreeBSD, per its mmap(2). Also use MAP_NOSYNC.

30 March 2007

* Allow plural and singular to be interchanged in most places, don't insist on
  "accounts { "abc" }" and "account "abc"".

29 March 2007

* Tags are now done using an action (tag) rather than a special-case match
  rule. The old way still works but generates a warning which will become an
  error within a few releases.
* Because yacc needs to move back and forwards, just swapping the file out from
  under it when including can cause problems. So, switch to letting lex do all
  the work and feed the include file to yacc as if it was inline. This sucks a
  bit but there aren't many other options. Reported by Frank Terbeck.
* Lambda actions:

	match "regexp" action mbox ...
	match "regexp" actions {
		rewrite ...
		mbox ...
	}

28 March 2007

* Compound actions, using a list in {}s, eg:

	action "abc" {
		rewrite ...
		mbox ...
	}

* Macros shouldn't be expanded inside single quotes. Fixed.
* + may be used to concatenate strings.
* Allow short-circuit evaluation of 'and' and 'or' operators.

27 March 2007

* Accept size with either CRLF or LF as when warning about bad size predictions
  from POP3 servers. Google gives the size with LF and then sends the mail data
  (as it must do) with CRLF.

26 March 2007

* Fix stupid use of struct strings for uid_ts and make users be printed when
  printing rules, actions, accounts.
* Option to use SYSV shared memory (build with make -DSHM_SYSV). Not a real
  option, or documented, yet because I'm not sure how to deal with cleaning up
  on SIGTERM. It might even go away again.
* Play some games to ensure that that the full extent of the mmap'd temporary
  file is actually writable before using it. Otherwise if there is insufficient
  disk space we risk getting an unexpected SIGBUS later when trying to use it.
* When sending delivery done messages, check that the child process isn't dead
  before trying to talk to it. 

25 March 2007

* Handle unlink(2)/fclose(3) failures, led to discovery of a missing fflush
  before fsync and a double-unlink of a tmp file (bad!), also fixed. Part of bug
  1687830 from Markus Elfring. Also fix some closedir(3) return value checks.
  I'm still on the fence about close(2). SUSv3 says that it can only die on
  EBADF, EINTR and EIO: the first will cause problems before close, and I don't
  see how the latter can affect anything given that write(2) (or fsync(2) when
  applicable) will have previously returned success (fdm already checks their
  return). OTOH, it would be both tidy and future-proof to check it.

22 March 2007

* Return total number of mails from start function if possible and print 
  "X of Y" when reporting mail fetches with -v.

21 March 2007

* queue-low and queue-high options. Default queue limit is 2.
* Default maximum-size now 32 MB and maximum now 1 GB.

20 March 2007

* -q option to quiet unnecessary chatter.
* If user/pass is not specified on IMAP or POP3 accounts, attempt to read it
  from the ~/.netrc file.
* Redo child fetch stuff so that exec/pipe matches actually works
* Stop exec/pipe matches early if only checking for regexp and it is found.
* Sprinkle a few fsyncs, and block SIGTERM while writing to mboxes.

18 March 2007

* Informational messages now go to stdout rather than stderr.

16 March 2007

* Change so that the child uses poll(2) on all the fds rather than letting
  the fetch-* stuff poll and periodically checking the parent fd.
* Make delivery children be handled in the main loop (fdm.c) along with
  the fetch children. This means that different accounts will not block each
  other when delivering. I tried allowing multiple simultaneous deliveries
  for each account but it doesn't work very well, particularly regarding
  errors.

15 March 2007

* Seriously reduce -v output in favour of -vv and -vvv.
* Save mail in a queue as it is fetched and perform matching/delivery on it
  while waiting for the server to send the next mail. This can give a 20-50%
  speed increase with some rulesets, particularly with slow POP3 servers.

13 March 2007

* Don't pass stdin to poll(3) instead of closed sockets. Fixes problems with
  rewrite and empty mails on Linux. Reported & tested by Frank Terbeck.

12 March 2007

* The timeout setting is now used for commands too.
* Expand leading ~s into home directories where appropriate.
* Section headings are now numbered in MANUAL.

11 March 2007

* You can't use a va_list twice even when it's passed in as an argument. Duh.
  Fixes segfaults on PPC. Reported by Daniel Wilmer.

08 March 2007

* Try to introduce some consistency into tag replacement in strings. Introduce
  a new type (struct replstr) which indicates a string that should be replaced
  before use, and try to make sure replacement happens possibly for all strings
  where replacement should happen on parse. Hopefully this will make it easier
  to handle replacement properly in future too.

07 March 2007

* Handle POLLHUP properly in io.c: if it is set and POLLIN isn't set, the 
  fd has closed. This makes stdin delivery work properly on Linux 2.4.

06 March 2007

* Submatches with commands are now added as tags command0 to command9.
* pipe actions now use the command.c framework, which means their stderr is
  logged and stdout discarded.
* mail_file tag added by maildir delivery and mbox_file by mbox. Also pass the
  tags block up and down between parent and child so these tags actually stick.
* A new exec action, similar to pipe but stdin is /dev/null. This is useful
  in combination with the mail_file and mbox_file tags.

04 March 2007

* Bug fix: fill in the correct size for maildir fetched mail rather than using
  the rounded-up size and adding a ton of nulls.
* -D on the command line overrides macro definitions in the configuration file.
* Build the attachment list when the first attachment match rule is found rather
  than for every mail regardless.
* Add a message_id tag to each mail.

03 March 2007

* add-header action and lines, body_lines, header_lines tags for IMAP/POP3,
  suggested by Frank Terbeck.
* Linux dirname(3)/basename(3) screws up the buffer. Fixed it thanks to Frank
  Terbeck.
* Fixed bugs in string parsing thanks to Frank Terbeck.

02 March 2007

* Made add_tag use varargs and added a server_uid tag to POP3/IMAP messages.
* Added infrastructure to maintain a cache of variable-length strings within a
  single contiguous block of data (strb.c), so it can be passed easily up
  to the parent process. Use this for storing mail tags to get rid of the
  arbitrary tag length limits.

28 February 2007

* Man page cleanups, from Tamas TEVESZ.

27 February 2007

* fdm 1.0 released.

22 February 2007

* Fixed silly typo in NNTP code check. SF bug 1650701.
* Included account name in received header.
* Added stdout delivery.
* New append-string delivery to add data to a mail.

19 February 2007

* Added a remove-header action to remove all instances of a header. Based on a
  a request by Tobias Ulmer.

09 February 2007

* Reworked the substitution stuff. Each mail now carries a list of tag name,
  value pairs, some of which are autogenerated (account, action, etc) and others
  which may be added by the user. They may be inserted in strings using %[name].
  The autogenerated tags are aliased to the old single letter tokens. Based on
  a question from AJ Weber.
* Added a timeout option to limit the time for which servers are waited.

08 February 2007

* Added file-umask and file-group options to control permissions and group
  ownership of created mboxes and maildirs. Altered the permissions checks
  to take this into account, and extended them to maildirs. Suggestion from
  AJ Weber.
* Made mbox/maildir creation clearer in documentation.

07 February 2007

* Added -D command line option to define a macro.

05 February 2007

* Made options be printed with -v. 

27 January 2007

* Fixed attachment parsing so that it works as intended.

26 January 2007

* Started a changelog.
* Assigned a number to each rule and changed logging to refer to it. Also
  tweaked the -vv configuration file output.
* Changed some vasprintf to xvasprintf now that the latter exists.
* Fixed command.c to trim CR line end if present, this makes IMAP over ssh
  work. (0.9a)
* Fixed miscalculation of length in find_header. (0.9a)
* Fixed find_header to locate the first rather than second instance.
* Added FQDN and what it resolves to to the domains list by default.
* Added a basic Received header with local host and fdm version, may be disabled
  with the new set no-received option.
* Free mmap'd region before mmap'ing it again in shm_realloc, otherwise the
  actual disk space isn't freed. This affected previous versions too but 
  the mail was very rarely reallocated, now that the header is added it is.
* Changed all the descriptions to static buffers and audited use of snprintf.

$Id: CHANGES,v 1.65 2007/04/05 10:41:47 nicm Exp $
