Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Bug or Feature] hMS ignoring the catch-all if a route exists #74
If you define a route for a hMS domain and define a catch-all address for this domain at the advanced tab the catch-all will never used.
I have defined a route only for several deliver to addresses and so I think hMS should take the catch-all address for not at the route defined addresses. But it do not and send a 'Recipient not in route list'!
Here is the forum thread with all details:
User jimimaseye looks at the code and write this: 'I see in the code that it clearly does only one or the other (and the route is first in the list). Cant see why it cant be an if route check match else if catchall check.'
It would be nice if that can changed because it would help routing known addresses and cath-all the unknown!
If the route is for all addresses (register addresses and option deliver to all addresses) than of course only the route is used! But if there are addresses defined for the route (register addresses and option deliver to addresses below) the catch all address can use if the address is not at that list!
So I think you look if there is a route for the address domain. If yes you look if the address is at the route-address-list (register addresses and option deliver to addresses below) and if not you send a 'Recipient not in route list'! Bevor this happens you can look if there is a Catch all defined for this domain and if yes you can send it to the Catch All address.
I hope it is clear now - excuse my poor English, I'm no native English speaker!
It would be nice if that can changed because it would help routing only th known addresses to a backend mail server and cath-all the unknown at a special mailbox!
Ahh OK, Now I understand
so what you want is:-
IF route has no addresses, then it should precedence over a catch-all (which would essentially be ignored)
I think the logic should be more like (currently 162 to 202 - hmailserver/hmailserver/source/Server/SMTP/RecipientParser.cpp):
ie, checks for and retrieves a postmaster address (if it exist) before checking routes, and then only uses it if the routes check fails