McoreD
McoreD
CDCloudflare Developers
Created by McoreD on 10/19/2023 in #workers-help
Building a simple spam worker
Thanks for this. Appreciate it. I’m not looking into Proton Mail.
9 replies
CDCloudflare Developers
Created by McoreD on 10/19/2023 in #workers-help
Building a simple spam worker
Hi, thanks for getting back to me. Just on Q2: The reason why I need to is because I am planning to reuse the spam worker with my other family members. I own the domain with my last name, so I have my wife’s, kids’, and my email address starting with the first name. Having the spam worker hardcoded with a recipient address limits me from reusing the spam worker. For example, I will have to duplicate and maintain the current list of spam emails array multiple times.
9 replies
CDCloudflare Developers
Created by McoreD on 10/19/2023 in #workers-help
Building a simple spam worker
In terms of Q2 would the following work?
export default {
async email(message, env, ctx) {
const block = ["yourprofithour.com", "modernfinancialhabits.com", "oracleofomahasays.com"]
if (block.indexOf(message.headers.get("from")) == -1) {
await message.forward(message.headers.get("to"));
} else {
message.setReject("Address is blocked");
}
}
}
export default {
async email(message, env, ctx) {
const block = ["yourprofithour.com", "modernfinancialhabits.com", "oracleofomahasays.com"]
if (block.indexOf(message.headers.get("from")) == -1) {
await message.forward(message.headers.get("to"));
} else {
message.setReject("Address is blocked");
}
}
}
9 replies
CDCloudflare Developers
Created by McoreD on 9/15/2023 in #email-routing
Outlook MX settings with Email Routing
Catch All is working now!
1 replies