How to Suppress Outbound Emails to Specific Addresses with MIAB?

Hi All,

First of all, I’m not even sure this is possible, but here is my scenerio. I currently run a Buddypress website that sends out email notifications for various activities on the site. There are some users that will ask to be “unsubscribed” from my sites outbound email notifications that prefer not to edit their notification settings. In the case of those users, I have opted to add them to my current SMTP relay’s “Suppressions” list which basically blocks them from ever receiving any email at all from my website.

Now that I have MIAB working properly, I would like to stop paying a subscription fee to my SMTP relay (smtp2go) and begin using MIAB as my direct email sender via SMTP settings at my website. I have configured a subdomain that will handle this task and have everything configured properly saving this one final aspect.

Is there a way to accomplish this through a similar outgoing email suppression list such that anytime my website attempts to send an email to a particular person, it simply will not do so for that particular email address?

Any help or suggestions are appreciated as I just don’t quite have a sophisticated enough understanding to accomplish this with custom coding, etc., and am really just looking for either some feature of MIAB I have yet to learn how to use or some other means of accomplishing this in a fairly plug-and-play sort of way.

I found another very old thread about a similar (maybe, the same) issue:

[FOR REFERENCE] Suppression lists allow you to automatically stop sending to recipients who no longer want your email. They also give your recipients the option to adjust frequency and content according to their interests. This helps keep your recipients happy and your sending reputation strong.

The solution is for the users to edit their notification preferences. Or for you to re-subscribe to a service such as SMTP2GO which offers a suppression list.

MiaB does not have any native functionality to do this. You could accomplish it via postfix if you have the proper know how though, but that would be an unsupported modification.

I cannot argue with your answer as being the most logical, yet, if there is a way to do this I would like to learn how to implement it. I run my website at a loss to my wallet and at present am simply trying to streamline any current functionality that I’m paying for into a no-cost solution. My concern is that it will only take a few complaints from “lazy” members who don’t want to bother with their personal user notification settings to complain that they are receiving spam at the ISP level to potentially get me added to any number of spam lists.

What I have opted to do in the meantime as an extremely clunky hack is to change their email addresses to a new “donotsend@domain.org” address and then use MIAB email tagging per user (donotsend+user@domain.org) with that address so that I was able to use the same “suppressions” email for all members on my website. Unfortunately, if any of these members happen to prefer logging in using their email address rather than their username, they will be out of luck and I will likely begin to see duplicate accounts for any of those members. At that point, if they continue to complain (which is very rarely), I’ll tell them what you said - either they change their settings or I can delete their account.

Thank you for the response!
:upside_down_face:

RE: “You could accomplish it via postfix if you have the proper know-how…”

Do you have any suggestions about where I might find any information on implementing this, even some targeted search queries that come top of mind?

My initial thought is “postfix email suppressions” or something to that effect but since this is presently a yet-to-be-learned area for me, I know that sometimes just utilizing the correct word is the magic sauce to saving me hours, days, or weeks of digging to even begin to learn properly.

That is the problem with Postfix … there is just so much that can be done and you need to know that one tiny elusive term to find what you need. :cry:

Let me ask around and see what I can come up with.

Just out of curiosity, what is your monthly outbound email sending rate?

Thank you - this is not urgent, but simply an area where I lack expertise and would like to figure out where to place my energy so I can learn and get up to speed on how to implement this if it’s even possible. I’m willing to put in the effort to figure this out and then perhaps share my progress here if there’s interest. :slight_smile:

1 Like

Hmm, this may be easier than I thought.

If I didn’t have something to do in 15 minutes, I’d play…

Maybe I do have time to play … :stuck_out_tongue:

This is where I propose to start:

1 Like

Thank you for this! I will experiment and if I’m successful at implementing, I’ll be sure to share here in this thread. This looks like a great resource.

1 Like

Ok, and I will let you know the pitfalls of this tomorrow.

Ping me if I don’t update this within a couple of days.

I think that it might have worked! I just sent test emails to two email addresses that I added to the “transport” file using the ‘silent discard’ format. I’ll get the rest of the member emails loaded into it tomorrow that have requested permanent unsubscribes and then send out a site-wide test announcement tomorrow and give you another update with hopefully good news!

Test A - added emails to transport file - sent test emails not received as intended.
Test B - removed emails from transport file - sent test emails received as intended.

So far, so good!

Thank you so much for finding this solution! It was so much easier to implement than I had anticipated and this literally would have taken me ages to figure out where to look on my own.

Excellent! I am glad that this worked out for you.

Now, let me tell you the pitfalls. Don’t worry, they are not that bad …

MiaB will overwrite the main.cf file with certain updates. Unlike other aspects of MiaB this is somewhat rare, and will only occur when there is a change to the major version (such as from v57a to v60 where there was an OS update, or is a major change to postfix where there is a new version of main.cf released. Even though it is rare, I will urge you to make a backup of the main.cf file that you can restore quickly when needed.

To do so: (I realize that at your skill level you know, but for the benefit of others)
cp main.cf main.cf-modified

When/if this needs to be restored simply:
cp main.cf-modified main.cf

Of course, being only one line affected in main.cf you could just fix this manually, but others may appreciate the simpler method.

Lastly, I am going to move this topic to “Unsupported Modifications”.

1 Like