EmailDiscussions.com  

Go Back   EmailDiscussions.com > Discussions about Email Services > Email Help Needed!
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Stay in touch wirelessly

Email Help Needed! Having problems with your email service, or with the email software you're using? Post your questions and answers here!

Reply
 
Thread Tools
Old 2 Dec 2019, 05:04 AM   #1
SpokaneDude
Junior Member
 
Join Date: Dec 2019
Posts: 1
sieve script rejects email w/o message

Here is my sieve script that is supposed to reject a reply to my sent email; the rejection works, but the message does't! Would really appreciate some help on this, since I'm a noob (newbee).

require ["fileinto", "reject", "variables"];

if address :is "From" "do-not-reply.validEmailAddress.com" {

reject "Do not attach to this email; attach your article to a NEW email\n";
}

Thanks in advance... SpokaneDude
SpokaneDude is offline   Reply With Quote

Old 2 Dec 2019, 09:13 AM   #2
somdcomputerguy
Cornerstone of the Community
 
Join Date: Jun 2004
Location: Rupert, WV
Posts: 622
Code:
reject "Do not attach to this email; attach your article to a NEW email\n";
You probably need to escape the first semicolon, I'm not even close to a seive expert though.

- Bruce
somdcomputerguy is offline   Reply With Quote
Old 2 Dec 2019, 09:47 AM   #3
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,544
I don’t know which email system you are using, since you posted in the general “Email Help Needed!” forum. So I’m going to respond with respect to Fastmail (which has a sub-forum here).

There is no reason to escape a semicolon in a string in a Sieve rule. But the backslash character is ignored in your C-style attempt at adding a new line character (which is not needed). So when I use your rule in a Fastmail Sieve script, the automatically generated reply is:
Code:
Your message was automatically rejected by Sieve, a mail
filtering language.

The following reason was given:
Do not attach to this email; attach your article to a NEW emailn
So if you remove the backshash n it works fine for me. The reject message is properly sent as shown to the sender. When you say that the reject message doesn’t work, what exactly did you mean?

Bill
n5bb is offline   Reply With Quote
Old 2 Dec 2019, 09:23 PM   #4
somdcomputerguy
Cornerstone of the Community
 
Join Date: Jun 2004
Location: Rupert, WV
Posts: 622
Quote:
Originally Posted by n5bb View Post
There is no reason to escape a semicolon in a string in a Sieve rule.
See, SpokaneDude, I told you I was far from a Sieve expert. I couldn't even spell it right. Seems 'i' before 'e' went out the window with me..

- Bruce

Last edited by somdcomputerguy : 3 Dec 2019 at 02:40 AM. Reason: just changed one of the uneccessary commas to a period.
somdcomputerguy is offline   Reply With Quote
Old 3 Dec 2019, 12:29 AM   #5
rmmarsh
Junior Member
 
Join Date: Aug 2006
Posts: 10
sieve script rejects email w/o message

Quote:
Originally Posted by n5bb View Post
I don’t know which email system you are using, since you posted in the general “Email Help Needed!” forum. So I’m going to respond with respect to Fastmail (which has a sub-forum here).

There is no reason to escape a semicolon in a string in a Sieve rule. But the backslash character is ignored in your C-style attempt at adding a new line character (which is not needed). So when I use your rule in a Fastmail Sieve script, the automatically generated reply is:
Code:
Your message was automatically rejected by Sieve, a mail
filtering language.

The following reason was given:
Do not attach to this email; attach your article to a NEW emailn
So if you remove the backshash n it works fine for me. The reject message is properly sent as shown to the sender. When you say that the reject message doesn’t work, what exactly did you mean?

Bill
Hi Bill... I made the one change you suggested, but still not getting the message... I'm using Fastmail.com as my email provider (Postbox as the email client)... also, should I move this to the Fastmal sub-forum? Added: here's the message I do get tho': 550 No Such User Here"

Last edited by rmmarsh : 3 Dec 2019 at 01:20 AM.
rmmarsh is offline   Reply With Quote
Old 3 Dec 2019, 12:56 PM   #6
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,544
Arrow Troubleshooting SMTP 550 No Such User Here error

Since we are already discussing your issue here in this general forum, I would not double-post. Maybe a moderator could move this thread to the Fastmail sub-forum.

Quote:
Originally Posted by rmmarsh View Post
... I'm using Fastmail.com as my email provider (Postbox as the email client)... also, should I move this to the Fastmal sub-forum? Added: here's the message I do get tho': 550 No Such User Here"
550 is a SMTP error code normally issued by a SMTP MTA (message transfer agent) server.

https://en.wikipedia.org/wiki/Message_transfer_agent
https://en.wikipedia.org/wiki/List_o...r_return_codes
Error 550 is usually returned when the recipient "TO" mailbox can not be reached, for example if the TO address was incorrect or did not exist at the given domain on the receiving email system. But it can also be generated if your email client can't properly submit the message due to some problem (typically authentication of your email client due to an incorrect username or password or server port or SSL/TLS encryption problem).

So to troubleshoot this:
  1. First remove your Sieve rule to stop any confusion it may cause.
  2. Then try sending from that email client to your main Fastmail email address (not an alias).
    • If that fails, then there is probably something wrong with your email client configuration. Do not continue with the steps below.
    • If that works properly with no errors, then your problem must be due to something related to the TO email address, and you can continue troubleshooting.
  3. Next send from that email client in exactly the same way that worked in (2), but change the TO address to the one you have been testing.
    • If this works, then I don't see why you are getting the 550 message. The Sieve commands should not cause this message to be generated.
  4. If this fails, then carefully examine the TO address.
    • Is it your primary Fastmail address?
    • Is it an alias address which is properly enabled to target your Fastmail account?
    • Is it an alias address which instead targets an external non-Fastmail address?
    • Is it a subdomain address which is improperly formed?
My guess is that the message isn't getting properly submitted by your email client for some reason.

Bill
n5bb is offline   Reply With Quote
Old 3 Dec 2019, 08:29 PM   #7
JeremyNicoll
Senior Member
 
Join Date: Dec 2017
Location: Scotland
Posts: 125
Right at the start the OP said:

if address :is "From" "do-not-reply.validEmailAddress.com" { ...

so maybe the address is syntactically valid but not recognised by the mail host at that domain?

Maybe not only are you not supposed to reply to it, but it actually does not exist so you cannot reply to it?

Maybe the actual sender's address is something else?
JeremyNicoll is offline   Reply With Quote
Old 4 Dec 2019, 01:48 AM   #8
SideshowBob
Member
 
Join Date: Jan 2017
Posts: 85
I don't understand what's supposed to be happening here. It says you want to "reject a reply to my sent email". In that case I would expect the "do.not.reply" to have been in the "From" in your outgoing mail, so your script should be testing "To" in the reply.
SideshowBob is offline   Reply With Quote
Old 5 Dec 2019, 07:27 AM   #9
rmmarsh
Junior Member
 
Join Date: Aug 2006
Posts: 10
What I want to accomplish is when a person tries to respond to the email I have sent them, I want the Fastmail Sieve code to reject their reply with a custom message other than "550 No Such User Here".

I am waiting for the webmaster of the target email system to create the email address "do-not-reply..." which I think will solve the problem. I will get back to this forum as soon as he creates the email address (his wife is in the hospital right now, so I told him "family comes first" and I can wait.

Thanks everybody for the comments; I'm sure it will be resolved relatively soon.

SpokaneDude
rmmarsh is offline   Reply With Quote
Old 5 Dec 2019, 07:59 AM   #10
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,544
Quote:
Originally Posted by rmmarsh View Post
What I want to accomplish is when a person tries to respond to the email I have sent them, I want the Fastmail Sieve code to reject their reply with a custom message other than "550 No Such User Here"...
If the From address you use at Fastmail when you create the message is a valid Fastmail account or alias, then you won’t get a 550 SMTP error when they reply. The “550 No Such User Here” message is not generated by Fastmail, but as I noted earlier at some other email system. When you send a message to a non-existing address at a Fastmail-owned domain, the sending MTA SMTP server receives the response:
Code:
 550 5.1.1 <bad address placed here>: Recipient address rejected: User unknown in virtual mailbox table
The person sending such an email to a non-existing email address will receive a message which is generated by their own email system. It might contain some of the text shown above, or it might be something like the text you quoted.

If you create a From address at Fastmail for only this purpose, you can use a Sieve rule as you described to create a response. But it is a reject message which will contain the initial content as I described in an earlier post.

Bill
n5bb is offline   Reply With Quote
Old 5 Dec 2019, 06:54 PM   #11
JeremyNicoll
Senior Member
 
Join Date: Dec 2017
Location: Scotland
Posts: 125
Quote:
Originally Posted by rmmarsh View Post
What I want to accomplish is when a person tries to respond to the email I have sent them, I want the Fastmail Sieve code to reject their reply with a custom message other than "550 No Such User Here".

I am waiting for the webmaster of the target email system to create the email address "do-not-reply..." which I think will solve the problem. I will get back to this forum as soon as he creates the email address (his wife is in the hospital right now, so I told him "family comes first" and I can wait.

Thanks everybody for the comments; I'm sure it will be resolved relatively soon.

SpokaneDude
Why does the webmaster of the target email system have to create something? And is that "do-not-reply..." meant to be [email protected]in?

If the do-not-reply... address IS @target.domain then anyone who does create a reply will send it to the target.domain and you'll never see it so your Sieve code at Fastmail is irrelevant.


More to the point though if your original outbound email is From: your address and a reply is sent back to your address, we're not in 550 territory.

On the other hand if your original mail leaves with a Reply-To address set to [email protected]in then a reply sent to that address either gets to you (because [email protected]in IS an address you've set up), or doesn't (if you haven't created it). Or, if FM are hosting your entire domain for you, it presumably will get here... and again there's no 550.

I think you need to be clearer about what's going on.
- are you using generic FM domains, or are FM hosting your domain?
- what are you expecting the webmaster at the target site to do?

You are never going to be able to stop someone from sending a reply either to your reply's From address or to its Reply-To address (if you set one) though.


Your short example of Sieve code did not show it, but I'm wondering how you're planning to tell that an incoming mail (a) has an attachment, (b) that it's the kind that matters - 'an article', and (c) that it is arriving as a reply to an earlier message of yours and isn't a 'new' mail in the way you advise such users to send things to you?
JeremyNicoll is offline   Reply With Quote
Old 5 Dec 2019, 11:27 PM   #12
rmmarsh
Junior Member
 
Join Date: Aug 2006
Posts: 10
It works!

Morning everybody... the fix was to have the email address (do-not-reply...) as a valid email address on the server... works like a charm!

Thanks to all who gave me their ideas...couldn't have done it without your comments!

SpokaneDude
rmmarsh is offline   Reply With Quote
Old 6 Dec 2019, 01:06 AM   #13
FredOnline
The "e" in e-mail
 
Join Date: Apr 2011
Location: Manchester UK
Posts: 2,245
Quote:
Originally Posted by rmmarsh View Post
Morning everybody... the fix was to have the email address (do-not-reply...) as a valid email address on the server... works like a charm!

Thanks to all who gave me their ideas...couldn't have done it without your comments!

SpokaneDude
SpokaneDude & rmmarsh are the same person?
FredOnline is offline   Reply With Quote
Reply


Thread Tools

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 01:43 AM.

 

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