Page 1 of 1

Hard bounce for undefined email addresses in (sub)domain with wildcard?

Posted: Wed Jan 04, 2023 6:23 pm
by virtualmike
Hi,

I have a couple of subdomains where I take advantage of the unlimited domain email addresses by having a *@[my_(sub)domain] rule to point to a catch-all mailbox.

A few of those addresses have fallen into spammers' hands. Initially, I pointed them to one of my mailboxes with an autoresponder, but since the autoresponse can't identify the specific address that's not accepting the email, it only helps for individuals who can connect the dots between the email they sent and that autoresponse.

I know I can point one of those addresses to devnull@sonic.net so the messages will just disappear. However, there are a few people using some of those addresses who really would benefit with knowing the address no longer is valid, and I'd like to have them receive a normal mailer daemon "invalid address" bounce back.

Is there anyway to do that? Or are the only options to let it go to one of my mailboxes or send it to the bit bucket? ...thanks!

Re: Hard bounce for undefined email addresses in (sub)domain with wildcard?

Posted: Thu Jan 05, 2023 5:26 pm
by apl
You should be able to use procmail to pipe those mails to a shell script, and then have the script parse the FROM and TO addresses and send a bounce message. That might not be exactly the same as a mailer daemon bounce message, but maybe it's close enough?

Andy

Re: Hard bounce for undefined email addresses in (sub)domain with wildcard?

Posted: Thu Jan 05, 2023 5:59 pm
by virtualmike
I'd considered that, but I'd prefer a "set and forget" option. While the script solution would be good for someone with time on their hands, there's risk of something minor changing in Sonic's environment that might lead to issues that I may not have time to troubleshoot. :roll:

Re: Hard bounce for undefined email addresses in (sub)domain with wildcard?

Posted: Thu Jan 05, 2023 10:12 pm
by kgc
Mike, I *think* you can add an alias for the specific address to an address which doesn't exist like "invalid.email.address@sonic.net". If that doesn't work, let me know and I'll dig into the code to remind myself how to do it.

Re: Hard bounce for undefined email addresses in (sub)domain with wildcard?

Posted: Fri Jan 06, 2023 8:29 pm
by virtualmike
That did it, Kelsey! Thank you so much for the tip! :D