EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Today's Posts
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 15 May 2016, 03:13 AM   #1
emailer84
Member
 
Join Date: Aug 2008
Posts: 61
Conditional customizable bounce rules and messages?

I'm trying to mitigate misaddressed genuine email that I receive, without manual processing, and without disabling my domain's wildcard.

Is it possible to setup conditional bounce rules in FastMail with customized messages?

The options I'd be interested in are:

For a message sent to "mydomain", if TO/CC/BCC does not include "address1@mydomain", "address2@mydomain", "address3@mydomain":

- Automatically file received email in "spam folder", and send custom message 1.

- If message is greater than n MB, discard message, and send custom message 2.

- Discard all messages from a sender when a total quota greater than n MB per 24 hours is reached, and send custom message 3.

Thanks in advance,
emailer84 is offline   Reply With Quote

Old 15 May 2016, 01:15 PM   #2
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
The first two actions should be possible, but the third (keeping track of quota in a day) is not possible. However, it is a very bad idea to send automatic responses to messages sent to bad addresses at your domain. Spammers usually spoof their From addresses, and so sending bounce messages back to the sender usually just generates backscatter spam.

If you know that you only get messages from genuine senders (not spammers) to those addresses, then you could send automated responses. This would be appropriate if you change your email address and want to inform people sending to your old address.

In other cases, if you don't want to eliminate a wildcard acceptance to any address you can simply disable specific aliases. Fastmail makes this very easy, and you can use the disable feature for any alias. The sender email system will not be able to connect to the Fastmail server, so no backscatter will be generated in this case.

Bill
n5bb is online now   Reply With Quote
Old 15 May 2016, 08:54 PM   #3
emailer84
Member
 
Join Date: Aug 2008
Posts: 61
Thanks for your reply.

Basically, I use a wildcard on a domain, and while the spam filter tends to filter out genuine spam, I regularly get genuine emails in my inbox that have been misaddressed.

For these cases, I think it would be a good idea to notify the sender automatically, just to be helpful. How could I setup the first two rules I mentioned in my previous post in Fastmail's settings?

Thanks in advance,
emailer84 is offline   Reply With Quote
Old 16 May 2016, 08:48 AM   #4
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
Again, I suggest this is a dangerous idea, but here is the best I think you can do along these lines. Here are the limitations:
  • A vacation Sieve rule would normally be recommended, but they require you to only send replies to specific alias at your domain (not any unknown address). So a vacation type rule can't be used for your purposes.
  • The "reject" Sieve rule will send a user-controlled reply back to any sender, and so that's what I have used below. But the message is deleted after the reject message is sent, so you won't be able to read any messages sent to the incorrect addresses.
Here is Sieve code which rejects messages sent to any address at your domain other than a small list of aliases. You will not be able to read the rejected messages. Large messages will receive a different response than small messages. To insert this code in your Sieve script, go to Settings>Rules, select Edit custom sieve code in the lower right, scroll to the bottom of your existing Sieve script, and paste your changes to the code before at the bottom section (after section 8). Then click Save at the top. If you have made any errors you will be shown which line they are in and won't be able to save the new Sieve script.

Code:
if header :matches "X-Delivered-to" ["address1@mydomain.com","address2@mydomain.com","address3@mydomain.com"] {
stop;
}

if allof(size :over 2M, header :matches "X-Delivered-to" "*@mydomain.com") {
reject "Message is too large and sent to bad address";
stop;
}

if header :matches "X-Delivered-to" "*@mydomain.com" {
reject "Message sent to bad address";
stop;
}
This code is very dangerous, since you won't be able to read any message sent to your wildcarded domain except the three shown, and if you make errors you can discard all messages sent to your account. So suggest it's much better to either manually respond to the people who make mistakes, create aliases for the bad addresses others are using and then mark them as disabled in the Aliases table, or create only good aliases for your domain and disable the wildcard.

Bill

Last edited by n5bb : 16 May 2016 at 08:54 AM. Reason: Added additional warnings at the end.
n5bb is online now   Reply With Quote
Old 17 May 2016, 03:20 AM   #5
emailer84
Member
 
Join Date: Aug 2008
Posts: 61
Hi,

Thanks very much for your detailed response and for providing the sieve rules.

Actually, by enabling the "Reject (bounce)" option for the wildcard, I've essentially got what I wanted: misaddressed emails will be bounced and the sender will be notified automatically. I no longer have the wildcard enabled, but I never really needed it.

Thanks again for your help.
emailer84 is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 05:40 AM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy