Account forwarding with empty or malformed address

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
User avatar
katip
Senior user
Senior user
Posts: 703
Joined: 2006-12-22 07:58
Location: Istanbul

Account forwarding with empty or malformed address

Post by katip » 2019-09-27 08:47

while i was trying to understand what a poster with broken language was trying to tell (post already removed), i noticed a weakness in account forwarding settings.
forwarding enabled with empty address or any nonsense entered there saves! shouldn't do so, no?
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

User avatar
jimimaseye
Moderator
Moderator
Posts: 8175
Joined: 2011-09-08 17:48

Re: Account forwarding with empty or malformed address

Post by jimimaseye » 2019-09-27 09:05

One would think that it should verify that something has been entered, yes. Perhaps you can raise it in github.
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

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

Re: Account forwarding with empty or malformed address

Post by mattg » 2019-09-27 11:51

I can do screens shots of the post if that will help
I still have it on my screen

I couldn't work out anything except the insults. It seemed to me that they wanted something added to the logs, by my point to them was there was nothing that could be added.

Certainly, I don't think either of us understood the other very well

in answer to your query
Probably shouldn't be blank
But any string may find an account with default domain set...
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
katip
Senior user
Senior user
Posts: 703
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Account forwarding with empty or malformed address

Post by katip » 2019-09-27 13:05

mattg wrote:
2019-09-27 11:51
I can do screens shots of the post if that will help
I still have it on my screen
forget about it mate.

OTOH, i thought perhaps that punk had an account/global rule which forwards to a local account and accidentally this might have such a blank forwarding enabled etc...

i don't mean a full address format validation but at least blank entry shouldn't be saved, i.e. Save button or Enabled checkbox, one of either should stay inactive unless something is entered.
but ok, trivial for now compared to other priorities.
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

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

Re: Account forwarding with empty or malformed address

Post by mattg » 2019-09-28 02:08

nothing is ever too trivial.

(Trash Talk removed)

They started with this
Error log, one string:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message; no recipients."

I have about 30 rules for forwarding mail. I checked them all. All recipients are present.
Question / request: can be in any next version of Hmailserver do so, to in log indicated what specifically recipient causes problem.
Now the log looks so: there is a problem with some rule for some mailbox in I will not tell what domain.
Thanks.
Then this
What recipients are made incorrectly?
I do not know, but the program definitely known!
Why can't the program tell me which account the forwarding rule can't send a message to?
Then this
As I see (in code):
Rule - some VARIABLE in program code - Action
One variable contains the recipient address.
Why can't the recipient's address be displayed in the log?
Then
I don't need any help. I'm asking you to make the log sane. Eight years have passed since I started using the excellent Hmailserver program. Eight years in its logs nothing has changed.
A couple of lines of code will solve the problem.
But they weren't, aren't and probably won't be.

Why log have incomprehensible string like:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message; no recipients."
instead:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message to: somebox@somedomain"
I say before - uncheck "Enabled" in the settings of the working mailbox and in the log you will see the message given in the first post.
The forwarding rule that causes the error contains an address that can't be forwarded. Why I do not see this address in log? I see many blablablablabla, but not address. It is a "God joke", yes?
I have no idea - except that they wanted more of something in the logs, but I don't know what.
Maybe this is for when a message is forwarded to a non-existent account. But doesn't that trigger an NDR, like all malformed or Non-existent recipients?

And MY Logs show WHICH rule is triggered, or not as they are worked through. I have dozens of rules at global level and also account level. I can tell instantly which rule is broken from checking my logs.

Like I said I have no idea.
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
jim.bus
Senior user
Senior user
Posts: 304
Joined: 2011-05-28 11:49
Location: US

Re: Account forwarding with empty or malformed address

Post by jim.bus » 2019-09-28 08:12

mattg wrote:
2019-09-28 02:08
nothing is ever too trivial.

(Trash Talk removed)

They started with this
Error log, one string:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message; no recipients."

I have about 30 rules for forwarding mail. I checked them all. All recipients are present.
Question / request: can be in any next version of Hmailserver do so, to in log indicated what specifically recipient causes problem.
Now the log looks so: there is a problem with some rule for some mailbox in I will not tell what domain.
Thanks.
Then this
What recipients are made incorrectly?
I do not know, but the program definitely known!
Why can't the program tell me which account the forwarding rule can't send a message to?
Then this
As I see (in code):
Rule - some VARIABLE in program code - Action
One variable contains the recipient address.
Why can't the recipient's address be displayed in the log?
Then
I don't need any help. I'm asking you to make the log sane. Eight years have passed since I started using the excellent Hmailserver program. Eight years in its logs nothing has changed.
A couple of lines of code will solve the problem.
But they weren't, aren't and probably won't be.

Why log have incomprehensible string like:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message; no recipients."
instead:
"ERROR" 316 "2019-09-25 13:49:25.718" "Severity: 3 (Medium), Code: HM4235, Source: RuleApplier::ApplyAction_Forward, Description: Could not forward message to: somebox@somedomain"
I say before - uncheck "Enabled" in the settings of the working mailbox and in the log you will see the message given in the first post.
The forwarding rule that causes the error contains an address that can't be forwarded. Why I do not see this address in log? I see many blablablablabla, but not address. It is a "God joke", yes?
I have no idea - except that they wanted more of something in the logs, but I don't know what.
Maybe this is for when a message is forwarded to a non-existent account. But doesn't that trigger an NDR, like all malformed or Non-existent recipients?

And MY Logs show WHICH rule is triggered, or not as they are worked through. I have dozens of rules at global level and also account level. I can tell instantly which rule is broken from checking my logs.

Like I said I have no idea.
If I remember the Topic correctly, the poster wanted the Logs to identify which recipient email address couldn't be found in his Rule. Your response was the Logs identified that there were no recipients at all (I'm clarifying here what I believe you said). At this point I agreed with what I believed your logic was which was the Log Entry told him that there weren't any Recipients at all and that should have been sufficient because since there were no Recipients the Log Entry couldn't identify which one failed.

Personally I agreed with your point. The only thing off the top of my head I thought would have been an improvement would have been if the Log Entry identified which Rule he was using hMailServer failed on when it detected no Recipients but he wasn't asking about that. I think he was so frustrated he didn't fully think out what he was asking for and what the problem actually was. I'm not sure if it was a Rule or just plain forwarding but I seem to remember he was using a Rule of some sorts and there were many Rules.

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

Re: Account forwarding with empty or malformed address

Post by mattg » 2019-09-28 09:14

jim.bus wrote:
2019-09-28 08:12
The only thing off the top of my head I thought would have been an improvement would have been if the Log Entry identified which Rule he was using hMailServer failed on ...
It does that already.
The logs show the rules as they are tested, and the error will be after one before the next
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply