|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
7 Oct 2017, 02:55 PM | #16 | |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
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? |
|
7 Oct 2017, 05:09 PM | #17 | |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
Quote:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "xxxx.da.gov" { vacation "Message rejected because Invalid Email Recipient"; fileinto "INBOX.cdrom"; stop; } |
|
8 Oct 2017, 03:01 AM | #18 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
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 |
8 Oct 2017, 04:07 AM | #19 |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
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" { redirect :copy "me@another.com" reject "Message rejected because Invalid Email Recipient"; stop; } Possibly worth trying as the redirect may be processed at SMTP time. |
8 Oct 2017, 04:36 AM | #20 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
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 |
8 Oct 2017, 07:38 AM | #21 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
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 |
8 Oct 2017, 09:45 AM | #22 |
Cornerstone of the Community
Join Date: Jun 2008
Location: Perth
Posts: 664
|
Nice solution Bill.
I always learn something when I read your posts. |
8 Oct 2017, 02:50 PM | #23 |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
........................
|
8 Oct 2017, 03:06 PM | #24 | |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
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. |
|
8 Oct 2017, 03:26 PM | #25 |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
The "reject" is not a bounce
Using this simply code:
Code:
if header :contains ["From", "X-Mail-from", "Return-Path"] "thing95@gmail.com" { reject "Message rejected because Invalid Email Recipient"; } 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. |
8 Oct 2017, 03:32 PM | #26 | ||
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
Quote:
Quote:
|
||
8 Oct 2017, 03:40 PM | #27 |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
...................................
|
8 Oct 2017, 03:51 PM | #28 | |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
Quote:
https://i.imgur.com/8dcHMov.jpg It is still not working. Here is the code I'm using: Code:
if allof ( header :contains ["From", "X-Mail-from", "Return-Path"] "gmail.com", header :contains ["X-Resolved-to"] ["adam+reject@axxxxx.com"] ) { reject "Please don't use this address!"; stop; } elsif header :contains ["X-Resolved-to"] ["adam+reject@axxxxx.com"] { discard; stop; } Email goes into my inbox. No return message to sender @gmail.com |
|
8 Oct 2017, 03:59 PM | #29 | |
The "e" in e-mail
Join Date: Jan 2002
Posts: 2,619
|
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 ( header :contains ["From", "X-Mail-from", "Return-Path"] "gmail.com", header :contains ["X-Resolved-to"] ["adam+reject@axxxxx.com"] ) { reject "Please don't use this address!"; stop; } elsif header :contains ["X-Resolved-to"] ["adam+reject@axxxxx.com"] { discard; stop; } |
|
8 Oct 2017, 03:59 PM | #30 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
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 |