There's several answers on here about how to configure postfix to redirect all messages to a single mailbox, for development/testing of mail scripts.
I'm looking for a variation on this where I open an alternate port on an existing mail server, and I want all SMTP messages delivered to that port to get dumped into a mailbox (Dovecot, via local delivery) on that same server.
My problem is that smtpd shares the configuration in main.cf, and I don't see a way to run a second copy of smtpd without configuring an entire separate postfix environment. I'm looking for a simpler solution.
smtp-sink program is almost exactly what I want. It writes each message to a new file, but I would additionally like them pushed over local delivery to Dovecot where my mail client can conveniently see them.
Can anyone recommend a simple way to make this happen? I'll even accept a perl script that listen/reads SMTP and writes LMTP.