From e490e15abfa50c02d9efbd9b5fbd89529c0e9195 Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 16 Oct 2026 18:57:04 -0500 Subject: [PATCH] Email intake: iap-support@linkspin.app is the InstantAdPay support alias (NameSilo's forwarder will not deliver to the help. subdomain) Co-Authored-By: Claude Opus 5.5 --- inbound.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inbound.js b/inbound.js index 204b8df..4f6e361 100644 --- a/inbound.js +++ b/inbound.js @@ -54,7 +54,10 @@ async function handle(buf, contentType) { if ((auto && !/^no$/i.test(auto)) || /bulk|junk|list/i.test(prec) || header(raw, 'X-Autoreply') || header(raw, 'X-Autorespond') || ROBOT_FROM.test(from)) return 'robot dropped: ' + from; if (/@(instantadpay\.com|help\.instantadpay\.com|linkspin\.app)$/.test(from)) return 'own address dropped'; if (flood(from)) return 'flood dropped: ' + from; - const platform = rcpts.some(r => /@linkspin\.app$/.test(r)) ? 'linkspin' : 'iap'; + // support@instantadpay.com is forwarded by NameSilo to iap-support@linkspin.app (its forwarder will not deliver to our own + // help. subdomain), so that one address means an InstantAdPay ticket even though it arrives on the LinkSpin host + const iapAlias = r => /^iap-support@linkspin\.app$/.test(r); + const platform = rcpts.some(r => /@linkspin\.app$/.test(r) && !iapAlias(r)) ? 'linkspin' : 'iap'; let subject = String(f.subject || '').replace(/\s+/g, ' ').trim(); const plus = rcpts.map(r => /^reply\+((?:iap|ls)-\d{4,9})@/.exec(r)).find(Boolean); // the reply-to we put on ticket mail if (plus) { const ref = plus[1].toUpperCase(); if (!subject.toUpperCase().includes(ref)) subject = '[' + ref + '] ' + subject; }