Post by PKhow automatically archive messages incoming and outgoing
Thanks
You may e.g. replace the qmail-queue by a script archiving the message and
calling the original qmail-queue binary afterwards.
Give this one a try:
(file: /var/qmail/bin/mail-archiver)
----8<----8<-----8<----8<----
#!/bin/bash
#
# writes mail to an archive file
# and outputs mail for qmail-queue again
datum=`date +%Y%m%d_%H%M%S`
TMPFILE=/tmp/mail-archiver_$datum.tmp_$$
cat > $TMPFILE
cat $TMPFILE
----8<----8<-----8<----8<----
(file: /var/qmail/bin/qmail-queue)
----8<----8<-----8<----8<----
#!/bin/bash
#
# calls the mail-archiver and queues the mail
# to the original qmail-queue binary
/var/qmail/bin/mail-archiver | /var/qmail/bin/qmail-queue.original
----8<----8<-----8<----8<----
If you set the permissions correct, this works fine and may be used with
spamassassin, qmailscanner etc. as well.
(or use the QMAILQUEUE patch if you mind about overwriting the qmail-queue
script while remaking qmail)
Thomas.