Thorsten Sch?ning:
> To make things better readable, I would like to have the following
> layout of the same entries instead:
>
> ```
> # Some comment...
> [email protected] recipient
> [email protected] recipient
> [email protected] recipient
> [email protected] recipient
> [email protected] recipient
> [email protected] recipient
> ```
I should have responded with an example of how one can build a
Postfix table from a user-preferred input form.
$ cat Makefile
virtual.db: virtual.in
# Note: lines must start with TAB
tmpfile=`mktemp virtual.XXXX`; \
sed 's/^[[:space:]]*//' virtual.in > $$tmpfile; \
postmap $$tmpfile; \
mv $$tmpfile.db virtual.db
$ cat virtual.in
a.bbb one
aa.bbb two
aaa.bbb three
$ make
tmpfile=`mktemp virtual.XXXX`; sed 's/^[[:space:]]*//' virtual.in > $tmpfile;
postmap $tmpfile; mv $tmpfile.db virtual.db
$ postmap -s virtual
aa.bbb two
a.bbb one
aaa.bbb three
This example uses `mktemp virtual.XXXX` to avoid disaster when the
there is more than one such command running at the same time.
Wietse