How do I Bounce an email?
There used to be "bounce" option, to make it appear to the sender that the email has bounced.
I no longer see this as an option. If there's no option anymore, is it possible to do this by sieve filtering? From identifying a specific email address? |
The bounce option has gone, this should work but its not a silent bounce.
if header :contains ["From", "X-Mail-from", "Return-Path"] "_____@_____" { reject "Message rejected because ___________!"; stop; } This should just discard if anyof( envelope :contains ["from","to"] "your domain.com", header :contains ["X-Delivered-to", "X-Mail-from"] ["email from"], discard; stop; } |
If you use your own domain, also read this thread
|
Quote:
Also, I don't want to discard the message -- I want to keep it, but I want the sender to receive a bounce. I have told my office colleagues and managers not to email me at my personal email address while on leave, so I only want to do this with emails from my workplace. First, I need to see what a normal bounce looks like. |
Quote:
The messages are being delivered, and not being rejected, etc. How do I bounce an email from a specific domain? The sender must immediately be notified that the email bounced. I do not want to discard the email -- but I want to have the sender receive an immediate bounce message. |
Quote:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] [xxxx.yy.tld] { * Emails are going into the Inbox, not the "cdrom" folder * Sender at the xxxx.yy.tld email address is receiving nothing |
Quote:
|
Quote:
Current code: Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.yy.tld" { How do I set it so that the sender receives a bounce? The emails aren't even going into the designated folder. |
Quote:
Code:
# You were using Advanced Rules (custom sieve script). We disabled all |
Quote:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.yy.tld" { The reject isn't working. I wish FM didn't remove the bounce option. It's very important that any recipient from this domain receives a bounce. Currently, the only way to do this is to disable the alias. However, there are two problems with disabling the alias: 1) All emails will be rejected 2) No emails will be received I want to only reject emails from the domain xxxx.da.gov have the sender receive a bounce, and file these emails into a specific folder. How do I setup a bounce? |
Try changing the order to
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.da.gov" { |
If all else fails, you can achieve similar results by means of a vacation response. Just replace "reject" in your code with "vacation".
The big difference between reject and a vacation response is that the vacation response is only sent to a specific sender, by default, once every three days, regardless of how many messages he sends you. I believe (though I have not tried it) the interval can be changed, but the vacation response will still not occur for every message received. For more details on the sieve vacation response extension, see https://tools.ietf.org/html/draft-ie...ve-vacation-07 |
"xxxx.da.gov" is it missing .com on the end or .us
"xxxx.da.gov.com" |
Quote:
|
I was wondering if my work's server wasn't receiving the bounce, so I've tried this with an @gmail.com address.
The following does not work: Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "thing2295@gmail.com" { However, this still does work: Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "thing2295@gmail.com" { The reject code does not work -- period. I sent a support message to FM, pointing to this thread, as well. I am displeased that I am unable to bounce a message from a specific sender. It used to be simple command. |
Quote:
I want one specific sender, or a specific domain, to get a bounce message, believing it's an INVALID Email address. Is it not possible to do a bounce? |
Quote:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.da.gov" { |
Reject action discards message
I think that the only solution is a vacation message. As long as you have a spam filter activated, Fastmail supports the reject Sieve action. But Sieve does not allow you to both reject and save a particular message. If the message is rejected then it’s not possible to save a copy.
You could also reject the message with the understanding that the message will be discarded after it is rejected. The reason your earlier examples failed is that you must only use the reject action and not try to include a fileinto action. Bill |
Although I suspect that would also fail, the combination of a redirect and a reject might be worth trying. The sieve code would be something like
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.da.gov" { Possibly worth trying as the redirect may be processed at SMTP time. |
Using reject discards original message
That fails. The message is not redirected, the reject message is not sent, and the original incoming message appears in your Inbox. I tried various things before my post stating that you can’t reject and save the original message.
The only possibility I can imagine would be to use an alias (not the main account address) and set more than one target delivery address. This creates two or more separate messages which are separately delivered to your account. You should then be able to use sieve rules so that one message is delivered to some folder or Inbox on your account while the other generates the reject message. But this could get very messy. I will try to test this technique later this weekend if have some time. In general you need to be very careful about post-SMTP bounces back to the sender, since these can lead to backscatter spam. In addition, if the original sender has a vacation response activated you might bounce their automatic response back to them. If they had a reject system like yours, then without some way to count the messages an infinite email loop might be created, which the two email systems exchanging bounces. This might lead to one or both accounts being temporarily closed by the email providers. My suggestion is to just tell those people not to use your personal email address from their work account. If you feel strongly about this, you can discard all incoming mail from that domain. Or send a bounce to message sent from that domain, including a comment that their message was discarded and won’t be read. Bill |
Multiple alias targets allows message to be both bounced and kept
As I suspected, you can use alias targeting to both reject ("bounce") certain messages and keep those messaged in your account. Here is how to do this:
Bill |
Nice solution Bill.
I always learn something when I read your posts. :) |
........................
|
Quote:
I can't add the following alias: adam+reject@MyVirtualDomain.com See this image: https://i.imgur.com/5WwfHZM.jpg Clearly, FM does not allow this using a non-FM domain. This is being sent to a non-FM domain, and FM does not allow me to add alias+reject or alias+ anything The + sign is not allowed. |
The "reject" is not a bounce
Using this simply code:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "thing95@gmail.com" { See image: https://i.imgur.com/aAjMMfy.jpg ------------ Your message was automatically rejected by Sieve, a mail filtering language. The following reason was given: Message rejected because Invalid Email Recipient ----------------- There are no attachments. They don't get a true bounce reply, rather a message telling them that I set up a Sieve, a "filtering language". This is not a bounce, I can't get the allof code above to work, and I'm still trying to find a way to bounce a message from a specific sending domain. |
Quote:
Quote:
|
...................................
|
Quote:
https://i.imgur.com/8dcHMov.jpg It is still not working. Here is the code I'm using: Code:
if allof ( Email goes into my inbox. No return message to sender @gmail.com |
Quote:
Sending from a Gmail account (a "gmail.com" address) and not getting a bounce message at gmail. Again, here's the code I'm using: Code:
if allof ( |
When I test my Sieve script example modified for my Gmail From address, I get the correct behavior. If I look at the original (raw) message contents which are received at Gmail due to the rejection, the rejection message has a 3-part mulitipart MIME body. Gmail displays this differently than Fastmail to the user if you don't look at the raw message.
For your latest example to work, your Fastmail account main login address must be adam@axxxxx.com and you must have some alias which has two delivery targets:
Bill |
Quote:
alias@fastmail.com alias+reject@fastmail.com ? |
Quote:
Code:
if allof ( |
Quote:
Bill |
...........................
|
I tested Bill's script and it works for me.
When you send your test email from Gmail, are you sending it to the correct alias where you have setup the extra redirect that includes the +reject ? |
Quote:
The problem was I have two very similar domains, each with the same alias, and I needed to add the targets to the correct domain. However, this is the return message being sent back to gmail: https://i.imgur.com/1ut3NQ9.jpg I'm not getting a bounce with attachments. It's from: Mail Sieve Subsystem <postmaster@messagingengine.com> and the body of the return mail states the following: Your message was automatically rejected by Sieve, a mail filtering language. The following reason was given: INVALID Email Address ---------- Forwarded message ---------- There are no attachments, it clearly states I'm using Sieve filtering language, and it's not what a bounce normally looks like. Bill states: Quote:
|
Quote:
https://i.imgur.com/xmmiFMj.jpg The body still states: Your message was automatically rejected by Sieve, a mail filtering language. The following reason was given: INVALID Email Address and the subject is: Automatically rejected mail It appears it varies based upon the email service at hand from the sender. I will test it on Monday from the office using @xxxxx.ca.gov |
This is what the Google version looks like:
https://i.imgur.com/3dt5unh.jpg But there are no attachments. Seems like Gmail doesn't include the attachments. It'll be interesting to see, on Monday (in about 36 hours) what it looks like from xxxx.ca.gov |
Quote:
Things can be a bit confusing with all the steps sometime. I inadvertently added the second target -- alias+reject@fastmail.com -- to a similar, but different, virtual domain with the same alias, adam@ (I have two domains -- one with first initial and last name, and the other with first name and last name -- i.e. jdoe.com and johndoe.com) and I noticed after your last message that I mixed up the two. Interesting that Gmail doesn't send the attachments, but FM does. Gmail Inbox: https://i.imgur.com/3dt5unh.jpg Gmail message body: https://i.imgur.com/1ut3NQ9.jpg Fastmail: https://i.imgur.com/xmmiFMj.jpg I'll test the xxxx.yy.tld address on Monday. The agency using MS Outlook, so I'm hopeful that it'll alert accordingly. I'll report back with the results. |
As I said before, Gmail for some reason ignores much of the message disposition notice for the normal user view. But you can see these details by using Show original when reading the message in Gmail.
Quote:
Quote:
|
All times are GMT +9. The time now is 01:05 PM. |
Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy