hMail 5.4-B1944 not forwarding calender events

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-22 07:31

Hello,

We are using hMail 5.4-B1944. The issue is quite strange. Let me explain you the scenario here.

We have setup an email account abc@xyz.com which retains emails and also forwards it to def@xyz.com. If we send an email to abc@xyz.com it does forwards it correctly to def@xyz.com. However, if an calender event in google sends and email to abc@xyz.com it does not gets forwarded to def@xyz.com. Below are the logs I get.

"SMTPD" 36288 28190 "2013-03-18 14:12:21.193" "x.x.x.x" "SENT: 250 OK"
"SMTPD" 62068 28191 "2013-03-18 14:12:21.203" "x.x.x.x" "SENT: 250 OK"
"SMTPD" 28448 28191 "2013-03-18 14:12:21.282" "x.x.x.x" "RECEIVED: RCPT TO:<abc@xyz.com>"
"SMTPD" 62068 28190 "2013-03-18 14:12:21.282" "x.x.x.x" "SENT: 250 OK"
"SMTPD" 28448 28191 "2013-03-18 14:12:21.289" "x.x.x.x" "SENT: 250 OK"
"SMTPD" 59440 28190 "2013-03-18 14:12:21.363" "x.x.x.x" "RECEIVED: DATA"
"SMTPD" 59440 28190 "2013-03-18 14:12:21.366" "x.x.x.x" "SENT: 354 OK, send."
"SMTPD" 44120 28191 "2013-03-18 14:12:21.367" "x.x.x.x" "RECEIVED: DATA"
"SMTPD" 44120 28191 "2013-03-18 14:12:21.369" "x.x.x.x" "SENT: 354 OK, send."
"SMTPD" 33944 28190 "2013-03-18 14:12:21.521" "x.x.x.x" "SENT: 250 Queued (0.140 seconds)"
"SMTPD" 12588 28191 "2013-03-18 14:12:21.540" "x.x.x.x" "SENT: 250 Queued (0.141 seconds)"
"ERROR" 19544 "2013-03-18 14:12:21.551" "Severity: 3 (Medium), Code: HM4333, Source: SMTPDeliverer::_ApplyForwarding, Description: Could not forward message. Maximum rule loop count reached."
"ERROR" 58460 "2013-03-18 14:12:21.566" "Severity: 3 (Medium), Code: HM4333, Source: SMTPDeliverer::_ApplyForwarding, Description: Could not forward message. Maximum rule loop count reached."

The rule loop limit is setup to 5 on the server. So it should not be an issue. I have tested this on another server using a different version and works well with the same settings. Any know bug with this version?

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-22 07:51

please post your rule
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-22 08:16

Hello,

There are no rules setup. It is simple mail forwarding.

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-22 09:53

Hello,

I have attached the screenshot of the settings I am using for your reference.
Attachments
email1.jpg

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-22 10:11

what is your loop limit set at?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-22 10:34

Hello,

The rule loop limit is set to 5.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-03-22 15:36

Clearly you have a loop created by your forward so track it down & change or delete it. With forwarding settings in different areas it's easy to miss. Since you edited the addresses in the log we can't help find it but trace the email flow & you'll find it. It can be something less obvious like they both forward to each other or forward to undefined box & you have catchall set etc.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-24 04:48

Hello Bill,

Thank you for your reply. But I have stated its definitely not a loop. But the logs do show that and thats where I am confused and am leaning to think its a bug with the current version. I have even attempted to test this using new email accounts on clients domain rather than using details provided by them to ensure there is no loop.

Since you edited the addresses in the log we can't help find it but trace the email flow & you'll find it.
==> Those address are simply duplicates as it is not possible for me to post the real addresses here.

I have ensured catch all is also not enabled.

Do let me know if you need any additional information.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-03-24 07:14

Learningex wrote:Hello Bill,

Thank you for your reply. But I have stated its definitely not a loop. But the logs do show that and thats where I am confused and am leaning to think its a bug with the current version. I have even attempted to test this using new email accounts on clients domain rather than using details provided by them to ensure there is no loop.

Since you edited the addresses in the log we can't help find it but trace the email flow & you'll find it.
==> Those address are simply duplicates as it is not possible for me to post the real addresses here.

I have ensured catch all is also not enabled.

Do let me know if you need any additional information.
_ApplyForwarding is a rule forward check your rules.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-24 07:43

Hello Bill,

Yes, I do understand that and that's what I trying to explain here. Its a false positive. There is no loop and there are no other rules setup. Its a simple forwarding and I have provided a screenshot of it earlier.

If you want the screenshot of any other settings, do let me know and I will be happy to provide it.

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-24 09:09

Hello,

We have also tried to install it on a test VM and tested everything to ensure there are no loops or any settings issue. The result was same. Same error with the exact same reason in the logs.

Can you confirm this is a bug with the version? How can I report a bug and obtain a fix for it?

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-03-24 15:51

I understand what you claim but you realize how many of us run hmail & have forwards & rules and don't have that problem? Clearly there is something unique about your setup so find that & you'll get your answer. The screenshot is worthless because it's clearly edited so we can't see what your exact values are to know if there is something unique about them to realize that is the cause. Unlikely the case though since the code shows that error you are seeing as a RULE as you've already been told. Did you view the rules table in the database to ensure there are none? Maybe there is one you forgot about or one that does not show up in the admin for some reason (such a special chars).
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-25 05:12

Hello Bill,

Thank you for the update.

But as per my previous reply, it is definitely not an issue with some rule being setup. We have installed hmail on a plain new VPS and tried to test it on that also. The issue still persists. So I understand it could had been the setup issue on our server but the same issue persists while using the newly installed hmail on a VPS as well.

And as per my previous reply, the original email address is replaced as it cannot be posted on a forum. But its like replacing every instance of a with b and c with d so that the scenario does appear exactly same.

Do let me know if you need any further information.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-03-25 06:25

Not sure what to tell you as we're just going in circles. I've looked at the source code & that log line is definitely from a rule. It's nowhere else in the code so a rule is running if you believe it or not.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-25 07:04

Hello Bill,

Thank you for your feedback.

That's what I am trying to state from the beginning of this thread. It’s a false alarm.

I have already tested it by installing hMailServer 5.4 - 1945 on a test VM by adding a new domain and it failed with the same error.

I am now trying to install hMailServer 5.4 - 1946 to check whether that makes any difference. I am sure it wouldn’t but I will give it a try.

It definitely appears a bug. If possible it would be great if someone could test it at their end using the versions I am running so that we can confirm the issue and report a bug.

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-25 07:40

Hello Bill,

Just an update.

I have now upgraded hmail server to hMailServer 5.4 - 1946 and it did fail as well with same error.

So I can conclude its failing for all the three versions.

hMailServer 5.4 - 1946 (5193 downloads since 2013-02-09. Change log)
hMailServer 5.4 - 1945 (4438 downloads since 2013-01-02. Change log)
hMailServer 5.4 - 1944 (15857 downloads since 2012-08-08. Change log)

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-25 13:22

just having a play...

How many recipients are there of the google calendar event? (shown on the Google calendar online)

This works for me as expected if there is only a single recipient, but does weird (double message type) stuff if two recipients.
But I don't have the _ApplyForwarding message that you get. That definitely looks like a rule on your system to me...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-26 05:38

Hello,

How many recipients are there of the google calendar event? (shown on the Google calendar online)
==> One.

On which version of hMail are you testing it?

As per your test it also concludes there are still some issues as you are getting double messages.

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-26 06:16

5.4 latest Beta

I think that Google is sending me double messages. I don't see my hMailserver doing anything I didn't expect
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-26 09:06

Can you provide me the screenshot of the setting you have used to configure the forwarder?

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-26 10:23

exactly the same as you show above

are you sure that there are no:
- account rules (on either the intended original recipient or the forwarded to address)
- global rules
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-03-28 11:12

Hello Matt,

Definitely, there are no rules. I have even tested it on a complete new VPS, added a domain to it and ensured there are no rules.

I don't see it working with any of the hMail 5.4- editions.

Its an issue with only google calender events failing from what I have seen. If it was a loop why would normal emails sent get forwarded correctly?

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-03-28 14:34

can you show screen shots of where you set Google to send the calendar event so that I can try to reproduce exactly what you are doing
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-04-01 02:29

I see that you have raised a 'critical' issue for this... :roll:
mattg wrote:can you show screen shots of where you set Google to send the calendar event so that I can try to reproduce exactly what you are doing
Without being able to reproduce this, this cannot be considered a bug.
When I add email notifications to Google calendar events and forward the message with my hMailserver installation I get the forwarded event as expected.
I have an issue in that when there are two email addresses in email notifications of my Google Calendar event, that each recipient receives two copies of any changes - but that isn't what you describe, and seems to me to come straight from Google that way.

I am using 5.4 build 1942 at the moment, but I will upgrade to 1944 to test your theories
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Learningex
Normal user
Normal user
Posts: 55
Joined: 2012-08-15 15:06

Re: hMail 5.4-B1944 not forwarding calender events

Post by Learningex » 2013-04-05 11:29

Hello Matt,

Yes, I raised it because I do not see it working though.

As per your request, I have now attached the screenshot. I am using the "Email Guests" option and the emails received by abc@xyz.com fail to forward to def@xyz.com. I have already attached the screenshot of the forwarding setting I am using earlier in this post itself.

Do let me know if you need any additional information.
Attachments
email.jpg

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-04-05 16:20

I can absolutely conform this.

On build 1942 I DID NOT get this error.

after upgrade to build 1946 I get exactly the same error as the OP posted from doing the exact same thing that I did less than 5 minutes previously.

Bill, I can send you logs if you need / wish.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-05 17:54

mattg wrote:I can absolutely conform this.

On build 1942 I DID NOT get this error.

after upgrade to build 1946 I get exactly the same error as the OP posted from doing the exact same thing that I did less than 5 minutes previously.

Bill, I can send you logs if you need / wish.
So 1942 was ok but 1946 isn't? odd. I can check the change logs between those builds but not much changed that I recall. A copy of the email & matching logs might be handy but let me check the code to see what changed.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-05 18:00

Ok i lied there are 47 commits between 1942 & 1946 :o But good news is OP says 1944 problem started so I can just look between 1942 & 1944 which is only 16 commits :D
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-05 18:03

Commit 150 is definite possibility "Added Auto-Submitted header. Will contain the value auto-replied for messages which is generated using auto-reply funcitonality or rules. Also prevents hMailServer from auto-replying to auto-submitted messages."

Rules/forwarding/delivery all changed.. Now to compare side by side. :D
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-05 18:18

Yupper sure enough this was changed between those builds. Note the error matches your logs:

Code: Select all

      if (!RuleApplier::IsGeneratedResponseAllowed(pOldMsgData))
      {
         ErrorManager::Instance()->ReportError(ErrorManager::Medium, 4333, "SMTPDeliverer::_ApplyForwarding", "Could not forward message. Maximum rule loop count reached.");

         return true;
      }

      LOG_DEBUG(_T("Forwarding message"));
According to the commit logs, IsGeneratedResponseAllowed is new function martin added to make autoresponses not go to automated senders. Clearly there's an issue in the new code. :D

When I searched the code earlier since it said RuleApplier I assumed you had a rule because the error logged that you saw was result of that rule being applied but looking closer at the code and realizing that function changed it is clearer that the problem could be a result of that new function even if you don't have a rule. Sorry about that. :oops: Matter of seeing forest for the trees sometimes. :D

Anyway quick fix is to put 1942 on assuming you don't need any of the other changes since 1942. I'll dig deeper into this new function to figure out what's causing the short circuit and if it's safe to modify it. (Obviously could roll back & use old function but the one is there for a reason and hate to remove it if you can just use 1942 for now.)
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-05 22:03

Hey can one of you look at the headers of the calendar email & tell me if there is a header named Auto-Submitted? I suspect there is & that's tripping up the logic of the new function.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
mattg
Moderator
Moderator
Posts: 20898
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMail 5.4-B1944 not forwarding calender events

Post by mattg » 2013-04-06 10:10

yep

'Auto-Submitted' with value 'auto-generated'
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-06 16:40

mattg wrote:yep

'Auto-Submitted' with value 'auto-generated'
Cool thanks. That's why it happens for google calendar & not other emails. I added a flag to martin's new function to turn off checking for that header. The problem is the "rules" loop check is also used for normal forwarding too. So when he made the change to stop forwards to automated boxes that happened for normal forwards too. Worse yet the error made it look like it was a rule so I edited the log text too so it's clearer what's going on. The thing we need to think about is if it should be turned off other places too.. While I understand not replying to an auto-generated email it seems perfectly legit to forward it even using a rule. Obviously people can use 1942 but I can post a special experimental build too.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMail 5.4-B1944 not forwarding calender events

Post by Bill48105 » 2013-04-09 01:57

New experimental build posted to address this issue:
http://www.hmailserver.com/forum/viewto ... 10&t=21420
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply