I'd like to keep statistics on the number and total size of messages
received for each virtual domain each day. Similar idea to quotas,
except I want to keep the stats even for virtual aliases (forwarded to
external addresses), not just mailboxes. Ideally I'd like to insert a
record for each message into a PostgreSQL DB, which I could then query
for any period of time I want.
Could anyone suggest the best approach to this? I've read the FILTER
README and I think filters can be used to do this, but is there a
simpler, faster way? I don't need to actually filter messages, I only
want to be notified about each message and I would need to know its size
and recipient (the real RCPT TO recipient, not the one in the To/Cc
headers). Or is there already something that does this?
I'm running Postfix 2.8.3. Thanks in advance for any help.
Evan