Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CatchAll Solution -> X-Envelope-To : [destination:user] #16

Open
n07cH0k opened this issue Aug 5, 2023 · 1 comment
Open

CatchAll Solution -> X-Envelope-To : [destination:user] #16

n07cH0k opened this issue Aug 5, 2023 · 1 comment

Comments

@n07cH0k
Copy link

n07cH0k commented Aug 5, 2023

Hi, is there any way to read the mail tags and adjust the destination user based on the content?
If I have a CatchALL address and want to deliver to the correct user based on eg. 'X-Envelope-To'.

@christianbur
Copy link
Owner

I just thought of something.
Of course you could write a program that does exactly this, but it would also have to work using sieve (target mailbox must support sieve). Getmail retrieves the emails from the CatchAll-mailbox and after Getmail has transferred the email to Dovecot, you can do a lot of things with sieve rules.
With the "redirect" parameter of Sieve you can forward emails.

sieve examples: https://doc.dovecot.org/configuration_manual/sieve/examples/

Mailcow: E-Mail->Configuration->Filters->add custom prefilter for target mailbox.

require ["fileinto","regex","body","envelope","subaddress"];

if header :contains ["To","X-Original-To"] ["[email protected]", "[email protected]"]
{
    redirect "[email protected]";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants