Saving sent messages with Exim

Published

In shore.co.il I use the Exim mail transfer agent (SMTP server) along with the Dovecot IMAP server. Messages received in Exim are sent to Dovecot over LMTP. So far, pretty standard stuff. All of the configuration and setup can be seen in my GitLab instance.

I wanted to save sent messages to a folder (like GMail does) but didn't find a way to do that over LMTP documented anywhere so here's what I did. I created a router in Exim that if the sender is one of the local domains (domains Exim receives messages for), then they're redirected to the LMTP transport but with +Sent suffix attached so they're saved to the Sent folder. You can see the configuration here.