aboutsummaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-05-09 20:18:43 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-05-09 20:19:52 +0300
commit998eaf2cdb444ee77ff67068ce3586de1eea8e4e (patch)
tree5013d3978055eaf155b079076f1028edd0994b0a /NEWS
parent30775f7ce1215423967c681ab9f3cf0a4704b51e (diff)
downloadmailfromd-998eaf2cdb444ee77ff67068ce3586de1eea8e4e.tar.gz
mailfromd-998eaf2cdb444ee77ff67068ce3586de1eea8e4e.tar.bz2
Implement current header access functions.
* mfd/bi_curhdr.m4: New file: implementation of current header functions. * mfd/Makefile.am (M4_FILES): Add bi_curhdr.m4 * mfd/bi_mbox.m4 (mailbox_open): Work over MU lossage. * mfd/bi_msg.m4 (bi_drop_current_message): Remove. (drop_current_message): New function. * mfd/mailfromd.h (env_reposition): New prototype. * mfd/msg.h (bi_drop_current_message): Remove. * mfd/prog.c (struct eval_environ.reposition): New member. (env_reposition): New function. Work over MU lossage. (env_capture_start): Call env_free_captured to release any module private captured data. Reset env->reposition to 0. (env_capture_write): If env->reposition is set, move stream pointer to the end of stream. (struct builtin_priv.free_capture): New member. (builtin_priv_register): Take 3 arguments. (env_free_captured): New function. * mfd/prog.h (builtin_priv_register): Update proto. * mfd/snarf.m4 (MF_DECLARE_DATA): Get at most 3 arguments. * NEWS, doc/mailutils.texi: Document new functions. * tests/etc/hdr.mts: New file (message transfer session). * tests/etc/hdr2.mts: Likewise. * tests/etc/Makefile.am (EXTRA_DIST): Add new files. * tests/hdr-all.at: New testcase. * tests/hdr-cap.at: New testcase. * tests/hdr-count.at: New testcase. * tests/hdr-gete.at: New testcase. * tests/hdr-getn.at: New testcase. * tests/hdr-itr.at: New testcase. * tests/hdr-mul.at: New testcase. * tests/Makefile.am (TESTSUITE_AT): Add new testcase. * tests/atlocal.in (TESTDIR): New variable. * tests/testsuite.at (MTASIM_DEFS): New define. (AT_MTA_TEST): Rename to AT_MTA_TEST_FILTER. All uses updated. (AT_MTA_TEST_SCRIPT,AT_MTA_TEST_FILTER_SCRIPT): New defines. Include new testcases. * tests/arg.at, tests/curmsg.at, tests/numrcpt.at, tests/reject.at, tests/tempfail.at: Updated.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS38
1 files changed, 37 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9db425d8..c79dfa7d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Mailfromd NEWS -- history of user-visible changes. 2009-05-08
+Mailfromd NEWS -- history of user-visible changes. 2009-05-09
Copyright (C) 2005, 2006, 2007, 2008, 2009 Sergey Poznyakoff
See the end of file for copying conditions.
@@ -24,6 +24,42 @@ is not strictly necessary. However, keep in mind that due to the
specifics of MeTA1, the number of symbols that may be exported for
each stage is limited (Mailfromd manual, section 11.1.2).
+* New functions
+
+A set of new functions is added that allow to access the headers
+from the current message in a uniform fashion. These functions are
+available in the following handlers: eoh, body, eom.
+
+- number current_header_count([string name])
+
+Return number of headers in the current message. With an argument -
+return number of headers that have this name.
+
+- string current_header_nth_name(number n)
+
+Return the name of the nth header. N is 1-based.
+
+- string current_header_nth_value(number n)
+
+Return the value of the nth header. N is 1-based.
+
+- string current_header(string name[, number index])
+
+Return the value of the named header, e.g.:
+
+ set s current_header("Subject")
+
+Optional second argument specifies the header instance, if there are
+more than 1 header of the same name, e.g.:
+
+ set s current_header("Received", 2)
+
+
+Index is 1-based.
+
+All current_header functions raise the e_not_found exception if the
+requested header is not found.
+
* New pragma `dbprop'
This pragma defines user database properties. It takes two or three

Return to:

Send suggestions and report system problems to the System administrator.