Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » KMS 6.7.n & Filter Replies (Replies only reply every 7 days!)
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
Just a heads up for all that like to have a echo<_at_> feature on their server to test the connection.

On some of our installations, we have an echo bot account that reply to the email send instantly telling the sender that the mail was handled right. Since a few verisons ago, this stopped working after the 1. email.

It seems that the Send Autoreply.. feature in the Mail FIlters is actually a 'Vacation' message, and default is to only reply to the user every 7 days.

Clicking Edit Script... gives you the source:
if address :all :contains "To" "echo@"
{
  discard;
  vacation
     :days 7 "DK:\nDin mail blev korrekt håndteret af Humac A/S mail server.\n\nEN:\nYour email was correctly handled by the Humac mail server.";
  stop;
}


Change the 'days 7' to 'days 0' in order to reply to Every mail.

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
winkelman

Messages: 2119
Karma: 3
Send a private message to this user
Nice...
I knew about this, but assumed you could only set it to as low as 1 day. So 0 works as well? Good!
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
Yes,

days 0

seems to work fine here!

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
freakinvibe

Messages: 1542
Karma: 62
Send a private message to this user
I think the 7 day default has been introduced to avoid mail loops. Imagine the sender and recipient mailbox have set such a rule. Thousand of auto-reply messages would be generated within minutes.

Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
  •  
winkelman

Messages: 2119
Karma: 3
Send a private message to this user
As far as I know, mail servers do mail loop detection regardless of these rules. Mail loops could occur in may ways, not just because of mail filters like these. So I do not think an endless loop could be caused by two mail boxes with a mail rule as above (with day=0).
  •  
freakinvibe

Messages: 1542
Karma: 62
Send a private message to this user
Mail loop detection is done by analyzing the mail headers. If there are more than a certain amount of "Received" headers, the mail loop will be stopped (in KMS, the default is 100). But as far as I can see, the Autoreply is destroying the headers, so the mail server's mail loop detection mechanism will not work. Maybe someone from Kerio can comment on this.

Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
  •  
winkelman

Messages: 2119
Karma: 3
Send a private message to this user
WHOOPS! Twisted Evil

My mail server is now chewing through almost 200.000 (!) messages. I guess the mail loop detection indeed does not work when one uses the setting 'day 0'. Shocked

It's a single email that exploded into tons and tons of messages bouncing back and forth to an external mail server. (So yes, the external mail server also had an auto-reply turned on for the specific return address and also failed to detect the loop.)

So I'd strongly advise against the 'day 0' setting...

Glad it's night here and no one will really notice the server being busy for about 3.5 hours processing the outstanding queue... Smile

Although I would like to ask Kerio to find a way to avoid this loop, I must also commend them: the whole while the server kept running just fine (except of course the backlog of messages). We use Webmail only and the client didn't even slow down! It took the Saturday staff half a day to even notice something was not right. (They noticed that messages they sent to internal colleagues didn't arrive in their mailboxes.)

The server is now processing almost 1.000 messages per minute. I wouldn't have imagined it would perform that well. And it's actually the disks (two 15k RPM SCSI disks in RAID-1) that are the limit now, the single Xeon 3Ghz is still only about 30% used.
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
My sympathies. Been there done that Shocked

The autoreply/vacation message from Kerio is a completely new message and not an actual reply. The "Re:" string in the subject is just a convenience for the receiver, and the headers are as simple as possible. They contain nothing to identify an autoreply as just that. The possible exception is the "In-Reply-To" header in the autoreply, but I doubt it's usable to detect loops.

Save for all sorts of convoluted X headers and counting Received-headers, it's difficult to identify a looping message, although e.g. qmail is using the "Delivered-To:" header to avoid some types of loops. It would choke on the autoreplies in this scenario though.

Those who want KMS to issue a server side receipt upon correctly handling a message should probably file a feature request with Kerio instead of setting a timebomb in the configuration Wink
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
I would like to emphasize that the first post from me was to let you all know that the Send Autoreply... feature has been chnaged, and there is a workaround.

1: We use it for a Echo-Bot feature, so our consultants have a known working auto-reply address they can use when they test email servers/setups at customers.

2: KMS does not put a 'X-autogenerated:' header in that reply, but it should do so to enabling check against mail-loops. Guess a bugreport is on the way!

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
winkelman

Messages: 2119
Karma: 3
Send a private message to this user
marook wrote on Tue, 15 December 2009 14:26
I would like to emphasize that the first post from me was to let you all know that the Send Autoreply... feature has been chnaged, and there is a workaround.
<snip>

Hi marook!
Please note I don't blame anyone for my mail loop problem. I was thrilled with the 'day 0' option and simply assumed Kerio must have something to prevent mail loops in this scenario (which is al too easily achieved). Guess I assumed wrong and I only blame myself for that Cool .
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
No problem winkelman, I just wanted to underline that.

Anyway, as you can see, I just tested and there is no X-Autogenerated header added to autoreplies, AND there is no Filter option to check for custom headers.
I have just filed both issues with Kerio, but would welcome others to do the same.

Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
winkelman

Messages: 2119
Karma: 3
Send a private message to this user
I'll file a bug/feature request as well...

I'm looking into the SIEVE language, and it is possible to check for custom headers. This is from a limited SIEVE manual I've found (I've attached it to this post):

To see if a header exists:
Quote:
5.5. Test exists

Syntax:
exists <header-names: string-list>

The "exists" test is true if the headers listed in the header-names argument exist within the message. All of the headers must exist or the test is false.

The following example throws out mail that doesn't have a From header and a Date header. Example:
if not exists ["From","Date"] {
discard;
}


So we could conceivably do some check like:
if not exists ["x-autogenerated"] {
vacation
:days 1 "This is the auto-reply message";
}


More detailed, to check actual values of headers:
Quote:
5.7. Test header

Syntax:
header [COMPARATOR] [MATCH-TYPE]
<header-names: string-list> <key-list: string-list>

The "header" test evaluates to true if any header name matches any key. The type of match is specified by the optional match argument, which defaults to ":is" if not specified, as specified in section 2.6.
Like address and envelope, this test returns true if any combination of the string-list and key-list arguments match.
If a header listed in the header-names argument exists, it contains the null key (""). However, if the named header is not present, it does not contain the null key. So if a message contained the header
X-Caffeine: C8H10N4O2
these tests on that header evaluate as follows:
header :is ["X-Caffeine"] [""] => false
header :contains ["X-Caffeine"] [""] => true



Etc.

So we could do some header checking ourselves within the mail rules. That said: I'm not going to try to build a watertight anti-mail-loop check into the rules myself.

Still, would be best if the server inserts the x-autogenerated header into all auto-generated messages AND never auto-replies to any messages with that header.

Previous Topic: Archiving Reviews
Next Topic: Kerio 7
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Oct 21 15:53:14 CEST 2017

Total time taken to generate the page: 0.00545 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.