Some organizations want to add a footer to every message with text that identifies the company, includes disclaimers, or makes implausible claims about the legal status of messages. This is another problem that's easily solved with qmail-qfilter, in this case so easily that it doesn't even need a program of its own, just a two-line script I'll call addtag, as shown in Example 18-4. Example 18-4. addtag script to add a tag to messages#!/bin/sh exec /var/qmail/bin/qmail-qfilter \ cat - /etc/mailtag Put the tag in /etc/mailtag, and set QMAILQUEUE to run the tagging script in ofmipd and anywhere else that mail is injected. If local programs inject mail with sendmail, you might want to rename /var/qmail/bin/sendmail to realsendmail and put this in its place: #!/bin/sh QMAILQUEUE=/var/qmail/bin/addtag exec /var/qmail/bin/realsendmail "$@" If you use the older fixup approach to inject mail, you can add the tag in .qmail-fixup-default, as shown in Example 18-5. Example 18-5. .qmail-fixup that adds a tag| bouncesaying 'Permission denied' [ "@$HOST" != "@fixme" ] | cat - /etc/mailtag | qmail-inject -f "$SENDER" -- "$DEFAULT" |