summaryrefslogtreecommitdiff
path: root/mda/tests/atlocal.in
diff options
context:
space:
mode:
Diffstat (limited to 'mda/tests/atlocal.in')
-rw-r--r--mda/tests/atlocal.in31
1 files changed, 30 insertions, 1 deletions
diff --git a/mda/tests/atlocal.in b/mda/tests/atlocal.in
index 3bd76a134..89458b94e 100644
--- a/mda/tests/atlocal.in
+++ b/mda/tests/atlocal.in
@@ -3,4 +3,33 @@
# Copyright (C) 2004-2019 Free Software Foundation, Inc.
PATH=@abs_builddir@:@abs_top_builddir@/mda:$top_srcdir:$srcdir:$PATH
-INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
+INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
+MU_DEFAULT_SCHEME=@MU_DEFAULT_SCHEME@
+dumpmail() {
+ case $MU_DEFAULT_SCHEME in
+ mbox)
+ sed -e '/^From /d' -e '$d' $1
+ ;;
+ dotmail)
+ sed -e '/^\.$/d' $1
+ ;;
+ mh)
+ sed -e /^X-IMAPbase:/d\
+ -e /^X-UID:/d\
+ -e /^X-Envelope-Sender:/d\
+ -e /^X-Envelope-Date:/d $1/1
+ ;;
+ maildir)
+ f=$(find $1/new -type f | head -n 1)
+ if test -n $f; then
+ sed -e /^X-IMAPbase:/d\
+ -e /^X-UID:/d\
+ -e /^X-Envelope-Sender:/d\
+ -e /^X-Envelope-Date:/d $f
+ fi
+ ;;
+ *) # Should not happen
+ echo >&2 "Default mailbox format is uknown"
+ esac
+}
+

Return to:

Send suggestions and report system problems to the System administrator.