Hello everyone,

I am a newbie to mail in general and opensmtpd in particular and I am
currently trying to figure out how to sort mail to various subdirs of
the maildir based on the address that an email was sent to.

So basically, this is my intended setup:

1. Somebody sends email to b...@mydomain.org
2. "blog" is an alias that forwards to a real "admin" account
3. In the maildir of "admin", the email goes to a subdir called "blog"

I looked through the the smtpd.conf(5) manpage and found the "match
action" directive, my thought was something like this:

action "sort_to_folder" maildir "~/Maildir/.Blog" alias <aliases>
match for rcpt-to "b...@mydomain.org" action "sort_to_folder"

But I found that with this setup, junk will not get removed, and if I
add "junk" after the custom directory, I believe it will end up in
"~/Maildir/.Blog/.Junk" instead of "~/Maildir/.Junk".

Is there a more elegant/smart solution that I am missing? I would be
happy to learn from you. :)

Best,
Unicorn


Reply via email to