How to rule and route?

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
haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

How to rule and route?

Post by haubmi » 2010-03-31 17:04

Hello,

i have set up a "route" that is only to be taken by a global rule.

How do i ensure, that this "route" is only used by the corresponding global rule and not by hMailServer's delivery service?

Do global rules only apply to messages received by SMTP or are they applied also to messages fetched by pop?

As i have multiple routes and multiple global rules, i put in "Stop rule processing" after the "Send using route"
in each rule. I want that the message is only send over the first fitting glogal rule.
Is this the way of doing it?

Thanks in Advance
Michael

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

Re: How to rule and route?

Post by mattg » 2010-04-01 02:09

I don't believe that this is possible with hMailserver
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-04 01:24

Hello Matt,

have i been fallen from grace?
mattg wrote:I don't believe that this is possible with hMailserver
This was your answer to which of my questions?

Something is working here.
Messages are send over the routes, the rules decide.

Could you please say a little bit more to all of my questions?

Thank you very Much in Advance
Michael

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: How to rule and route?

Post by martin » 2010-04-04 11:14

Routes are used when outbound deliveries are made. You can override which route hMailServer picks by using global rules.
When a local delivery is being made, it's not possible to use routes. hMailServer will always deliver to the local recipient if it can find it in the installation. It is not possible to override this behavior using rules.

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

Re: How to rule and route?

Post by mattg » 2010-04-05 15:35

haubmi wrote:Could you please say a little bit more to all of my questions?
haubmi wrote:How do i ensure, that this "route" is only used by the corresponding global rule and not by hMailServer's delivery service?
mattg wrote:I don't believe that this is possible with hMailserver
haubmi wrote:Do global rules only apply to messages received by SMTP or are they applied also to messages fetched by pop?
Both.
I get mail download from external accounts that is flagged as SPAM and is treated as such by the rules I have set.
haubmi wrote:As i have multiple routes and multiple global rules, i put in "Stop rule processing" after the "Send using route"
in each rule. I want that the message is only send over the first fitting glogal rule.
Is this the way of doing it?
Yes that should work
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-07 18:16

Hello Matt, Hello Martin,

Thanks for your replies.

I have questions on that:
martin wrote:Routes are used when outbound deliveries are made. You can override which route hMailServer picks by using global rules.
I have configured Thunderbird so i can select different identities for every mail i send.
This means in my case: TB will use a different "FROM" and "REPLY TO" depending on the identity i choose.
For sending TB connects to hMailservers SMTP (with the authentication data of the local user account).
I have set up global rules which decide on the part after the at in the "FROM" and "Send using route" over the corresponding route (and then "Stop rule processing").

This works ok - no double sending happens (because hMailServer sends afterwards by himself over one of the routes, or relay SMTP, or direct to recipients SMTP).

My only fear is, if no global rule fits, hMailserver may take a route by himself.
Can i put in whatever i like into the "domain" field of a route, if i only use the route by a global rule?
Is this "domain" field of a route only a reference name for my global rule, in my case?
What would you recommend to put into the "domain" field of a route, i that case?

I have a global rule with lowest priority, that decides on the the part before the at in the FROM.
If it contains the users name, the global rule does "Send using route" over the default route of the user (and then "Stop rule processing").
This should take over if i missed one global rule.

The last resort of hMailServer for sending if none of my rules fit, should be the SMTP relay of my ISSP i have put in.
Is it working that way?
martin wrote:When a local delivery is being made, it's not possible to use routes. hMailServer will always deliver to the local recipient if it can find it in the installation. It is not possible to override this behavior using rules.
That is perfectly ok for me, if it also means:
No global rules are applied, when hMailServer fetches from the users "External Accounts".
Is it so?
What about the "Account rules" (i have none, i'm only asking out of curiosity)?

I can not bring that:
mattg wrote:Both.
I get mail download from external accounts that is flagged as SPAM and is treated as such by the rules I have set.
in a accordance with that:
martin wrote:When a local delivery is being made, it's not possible to use routes. hMailServer will always deliver to the local recipient if it can find it in the installation. It is not possible to override this behavior using rules.
I think when hMailServer fetches from the users "External Accounts", no global rules are applied, only "Account rules".
Is it so, or will i run into problems here?

There will not be any message delivery from an external SMTP to my hMailServer because it is not known to DNS (i have only dynamic IP) and the router ports are closed. Only local connections from email clients are allowed.

Many Thanks in Advance
Michael

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

Re: How to rule and route?

Post by mattg » 2010-04-08 01:55

So what exactly do you want to do with externally downloaded account mail via a 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

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-09 11:10

Hello Matt,
mattg wrote:So what exactly do you want to do with externally downloaded account mail via a rule?
I what to ensure that the global rules i have for external delivery, are not to be applied to that externally downloaded (fetched) account mails.
The externally downloaded (fetched) account mails should only be delivered into the local recipients IMAP folder
(after the build in antivirus and spam checks).

Thanks in Advance
Michael

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

Re: How to rule and route?

Post by mattg » 2010-04-10 05:09

if a recipient exists locally the mail will ALWAYS be delivered locally...

Mail that is downloaded from an external account is not resent anywhere, but can be forwarded using a global 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

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-11 17:32

Hello Matt,
mattg wrote:Mail that is downloaded from an external account is not resent anywhere, but can be forwarded using a global rule.
I fear that i have configured something that you call "forwarding".
Please check my setup as i described below.

I have a global rule, that applies when From contains me@provider1.net.
This rule then sends over a route, using the external mail server of provider1.net.

I can send over the web interface of my external account me@provider1.net
to the external account me@provider2.net.

I fear, if hMailServer downloads the message from the external account me@provider2.net,
it will get a message with a header containing me@provider1.net, and the global
rule above would match, and will send it again over the above route.

I did not see that happen.
So it can't be true that global rules are applied to downloaded messages.
This experimental result does not match with what is written in documentation.
So i fear i completely miss understand something!

Could you make clear when global and account rules are applied, please (SMTP and POP)?

Thanks In Advance
Michael

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

Re: How to rule and route?

Post by mattg » 2010-04-12 02:19

haubmi wrote:So it can't be true that global rules are applied to downloaded messages.
Externally downloaded messages have global rules applied to them...

Here's the modified headers of one that triggered my SPAM rule. I know that it trigger my SPAM rule because of the delivered to header, and within which hmailserver account and domain this particular external account is linked to.

Code: Select all

Return-Path: deals@tradingpost.com.au
Delivered-To: spam@mydomain.com.au
X-hMailServer-ExternalAccount: MY_ISP
Return-Path: <deals@tradingpost.com.au>
Received: from mx.my_isp.com ([XXX.XXX.XXX.XX]) by mx.my_isp.com with ESMTP id <20100407223237.mx.my_isp.com@mx.my_isp.com>; Wed, 7 Apr 2010 22:32:37 +0000
Received: from server1.someOpenRelay.net ([XXX.XXX.XXX.XXX]) by mx.my_isp.com with SMTP id <20100407223237.mx.my_isp.com@server1.someOpenRelay.net>; Wed, 7 Apr 2010 22:32:37 +0000
Received: from User (SpoofID [XXX.XXX.XXX.XXX]) by server1.someOpenRelay.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 2LQ4ZZHS; Mon, 5 Apr 2010 23:47:22 -0400
Reply-To: <noreply0@tradingpost.com.au>
From: "Trading Post"<deals@tradingpost.com.au>
Subject: [hMailServer says this is SPAM] Don't miss today's finds - Lowest Prices on TradingPost
Date: Mon, 5 Apr 2010 21:49:01 -0500
MIME-Version: 1.0
Content-Type: text/html; charset="Windows-1251"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-Id: <20100407223237.mx.my_isp.com@server1.someOpenRelay.net>
X-Antivirus: avast! (VPS 100407-1, 07/04/2010), Inbound message
X-Antivirus-Status: Clean
X-hMailServer-Spam: YES
X-hMailServer-Reason-1: The host name specified in HELO does not match IP address. - (Score: 2)
X-hMailServer-Reason-2: Rejected by SURBL - (Score: 3)
X-hMailServer-Reason-Score: 5
X-hMailServer-LoopCount: 1
Please detail the complete mail headers, and detail your rule so that we can check them.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-13 17:20

Hello Matt,

Names where changed here a little bit (and very carefully), because i don't want to get spamed.

There are 3 global rules (highest priority first, at the moment):

1. if from contains me@web.de, send over route "me@web.de".
2. if from contains me@online.de, send over route "me@online.de".
3. if from contains "My Name", send over route "me@default".
(all do "Stop rule processing" afterwards)

The routes are:
a. "me@default": SMTP of online.de: smtp.1und1.de, authenticate as user me@online.de
b. "me@online.de": SMTP of online.de: smtp.1und1.de, authenticate as user me@online.de
c. "me@web.de": SMTP of web.de: smtp.web.de, authenticate as user me@web.de
(I can't imaging a better naming scheme at the moment.)

fantasy.dom is fantasy local domain for holding my users (me@fantasy.dom) and for internal traffic.

Here test case A: from me@web.de to me@online.de

TB (Thunderbird) placed this copy into local hMailServer user's me@fantasy.dom IMAP "Sent" folder
and delivered it to SMTP of local hMailServer (identical i would expect) for further delivery.

Message-ID: <4BC3B431.7010604@web.de>
Date: Tue, 13 Apr 2010 02:00:49 +0200
From: My Name <me@web.de>
Reply-To: me@web.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@online.de
Subject: Test a->b
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

That is what hMailServer fetched from the external receiver me@online.de account.

Return-Path: me@web.de
X-hMailServer-ExternalAccount: me@online.de
Return-Path: <me@web.de>
Delivery-Date: Tue, 13 Apr 2010 02:00:57 +0200
Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234])
by mx.kundenserver.de (node=mxeu2) with ESMTP (Nemesis)
id 0MbOa0-1Nl2dh2Reu-00IxYT for me@online.de; Tue, 13 Apr 2010 02:00:57 +0200
Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172])
by fmmailgate03.web.de (Postfix) with ESMTP id 8308814D4B866
for <me@online.de>; Tue, 13 Apr 2010 02:00:57 +0200 (CEST)
Received: from [217.228.xxx.yyy] (helo=my.no-ip.org)
by smtp06.web.de with asmtp (WEB.DE 4.110 #4)
id 1O1TYn-0005mS-00
for me@online.de; Tue, 13 Apr 2010 02:00:57 +0200
Received: from [192.168.178.20] ([192.168.178.20])
by my.no-ip.org
; Tue, 13 Apr 2010 02:00:49 +0200
Message-ID: <4BC3B431.7010604@web.de>
Date: Tue, 13 Apr 2010 02:00:49 +0200
From: My Name <me@web.de>
Reply-To: me@web.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@online.de
Subject: Test a->b
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: me@web.de
X-Sender: me@web.de
X-Provags-ID: V01U2FsdGVkX185UO1GEZn4qRPTlVpTAihWu/Bg0TcTqt1K5hBK
VUpUEj09zkM67oga3hTu6xis/AIqiPVr0zz+jX0tmtp3ZoMtcp
QOIxk/WPlfJ0fWysOewg==
X-UI-Junk: AutoMaybeJunk +0 ();
V01:v6KlCyuL:cVvRhEQcv5jhPHUowlb2Jjmne+3N7xOSXla//PksrjJhEoW2IcD
qdjFwD2HnJ7Ts9ld8A9fB5qlbzWWfU95QocKPw+DEJtOCYfGuYvqMx7JuWzafVXk
zlLCbuN72kP7xYId7CC9itJbpK5Ks4NbaIlf8pKY426Fg83CzEfEQxy90DKgEH5G
a5oruurH7JI7TUNHPMzvlB335Rnmco/MWa3jPRgiZ/eBYOLnBVxBr5Rcc3djXBZQ
vuudyAHxrtJLj
Envelope-To: me@online.de

The header contains me@web.de in from, and global rule 1 fitted.
And should have been sent taking route c.

The Header shows the routing:
192.168.178.20 (=name not given from TB, ip of PC running TB)
->my.no-ip.org (=217.228.xxx.yyy, local hMailServer)
->smtp06.web.de (incoming mail gate of web.de)
->fmmailgate03.web.de (outgoing mail gate of web.de)
->mx.kundenserver.de (mail server of online.de)

This shows rule 1 was taken as expected, because route c was used.

The header still contains me@web.de in from.
If the global rules above would have been applied to the fetched message again,
rule 1. would fit and it would have been send again over route c.
But i only got it one time!!!



Here test case B: from me@online.de to me@web.de

TB (Thunderbird) placed this copy into local hMailServer user's me@fantasy.dom IMAP "Sent" folder
and delivered it to SMTP of local hMailServer (identical i would expect) for further delivery.

Message-ID: <4BC3B5AF.9070701@online.de>
Date: Tue, 13 Apr 2010 02:07:11 +0200
From: My Name <me@online.de>
Reply-To: me@online.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@web.de
Subject: Test b->a
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

That is what hMailServer fetched from the external receiver me@web.de account.

Return-Path: me@online.de
X-hMailServer-ExternalAccount: me@web.de
Received: from [212.227.126.187] (helo=moutng.kundenserver.de)
by mx05.web.de with esmtp (WEB.DE 4.110 #4)
id 1O1Tf2-0008AA-00
for me@web.de; Tue, 13 Apr 2010 02:07:24 +0200
Received: from my.no-ip.org (my.dip0.t-ipconnect.de [217.228.xxx.yyy])
by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
id 0MdWxQ-1NrdNE2li8-00PQQT; Tue, 13 Apr 2010 02:07:20 +0200
Received: from [192.168.178.20] ([192.168.178.20])
by my.no-ip.org
; Tue, 13 Apr 2010 02:07:11 +0200
Message-ID: <4BC3B5AF.9070701@online.de>
Date: Tue, 13 Apr 2010 02:07:11 +0200
From: My Name <me@online.de>
Reply-To: me@online.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@web.de
Subject: Test b->a
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V01U2FsdGVkX1+hjTsn1r0IlW+ialwzi9IbnvDiqS9NmEXEh9k
CDmZPTWrb20dEWcFJY0Xt3pUJDGucY61ro0KjMFa9Sf0+M+iqD
RrtXkWiI+rMU1rme8uY9pgq7NbkRsCr
Return-Path: me@online.de

The header contains me@online.de in from, and global rule 2 fitted.
And should have been sent taking route b.

The Header shows the routing:
192.168.178.20 (=name not given from TB, ip of PC running TB)
->my.no-ip.org (=217.228.xxx.yyy, local hMailServer)
->mrelayeu.kundenserver.de (incoming mail gate of online.de)
->moutng.kundenserver.de (outgoing mail gate of online.de)
->mx05.web.de (mail server of web.de)

This shows rule 2 was taken as expected, because route b was used.

The header still contains me@online.de in from.
If the global rules above would have been applied to the fetched message again,
rule 2. would fit and it would have been send again over route b.
But i only got it one time!!!


Here test case C: from me@fantasy.dom to me@online.de and me@web.de

TB (Thunderbird) placed this copy into local hMailServer user's me@fantasy.dom IMAP "Sent" folder
and delivered it to SMTP of local hMailServer (identical i would expect) for further delivery.

Message-ID: <4BC3B86D.9060305@fantasy.dom>
Date: Tue, 13 Apr 2010 02:18:53 +0200
From: My Name <me@fantasy.dom>
Reply-To: me@fantasy.dom
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@online.de, me@web.de
Subject: Test c->a,b
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

That is what hMailServer fetched from the external receiver me@online.de account.

Return-Path: me@fantasy.dom
X-hMailServer-ExternalAccount: me@online.de
Return-Path: <me@fantasy.dom>
Delivery-Date: Tue, 13 Apr 2010 02:19:04 +0200
Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171])
by mx.kundenserver.de (node=mxbap1) with ESMTP (Nemesis)
id 0MhBmj-1No3gn1rtp-00MNse for me@online.de; Tue, 13 Apr 2010 02:19:04 +0200
Received: from my.no-ip.org (my.dip0.t-ipconnect.de [217.228.xxx.yyy])
by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
id 0McPxo-1NjwxT0txQ-00Hifa; Tue, 13 Apr 2010 02:19:03 +0200
Received: from [192.168.178.20] ([192.168.178.20])
by my.no-ip.org
; Tue, 13 Apr 2010 02:18:53 +0200
Message-ID: <4BC3B86D.9060305@fantasy.dom>
Date: Tue, 13 Apr 2010 02:18:53 +0200
From: My Name <me@fantasy.dom>
Reply-To: me@fantasy.dom
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@online.de, me@web.de
Subject: Test c->a,b
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V01U2FsdGVkX18ZoKKMMKhrXB5veOvNZuzXIdDZqAvgCEg3O4i
s8oT1pJfhNKQ0Q+WnT/nX10MDilZ0PBrfqM3qEqpYdT/MgPhAR
fFcv9EZtl36RgAE7KVQXdzqmfT4hD3r
X-UI-Junk: AutoMaybeJunk +58 (SPA);
V01:1VH7ddCU:1T9iZp8b1U4JVRcH/HSPM7esfBKi1UUTTGEjspbGKmihjMUicVY
V836PI44LByRqDIEFXF0KipKzh7oeIo+lAkmUzWw9BFvVFeb8xVYr4Z/yJlpSxke
htre8KSWpMjPkKddor3cOjUX10blYF/2qqx/1TiuD+oClFHwB+WOEUJwd5yA6I9u
H1ZjGs217cI60GSd9qUv6/Y8CzaaIJTOEHgfJMqSqlfCif9zbmCr8rwoBfK+Kagq
YtQBiXCkYaSlftAj5U8rFS60TPT0/DYP4Ag==
Envelope-To: me@online.de

The header contains me@fantasy.dom in from, and global rule 1 and 2 did not fit.
The header contains "My Name" in from, and global rule 3 fitted.
And should have been sent taking route a.

The Header shows the routing:
192.168.178.20 (=name not given from TB, ip of PC running TB)
->my.no-ip.org (=217.228.xxx.yyy, local hMailServer)
->mrelayeu.kundenserver.de (incoming mail gate of online.de)
->moutng.kundenserver.de (outgoing mail gate of online.de)
->mx.kundenserver.de (mail server of online.de)

This shows rule 3 was taken as expected, because route a was used.

The header still contains me@fantasy.dom in from.
If the global rules above would have been applied to the fetched message again,
rule 3. would fit and it would have been send again over route a.
But i only got it one time!!!

That is what hMailServer fetched from the external receiver me@web.de account.

Return-Path: me@fantasy.dom
X-hMailServer-ExternalAccount: me@web.de
Received: from [212.227.126.171] (helo=moutng.kundenserver.de)
by mx27.web.de with esmtp (WEB.DE 4.110 #4)
id 1O1TqK-0003Tx-00
for me@web.de; Tue, 13 Apr 2010 02:19:04 +0200
Received: from my.no-ip.org (my.dip0.t-ipconnect.de [217.228.xxx.yyy])
by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
id 0McPxo-1NjwxT0txQ-00Hifa; Tue, 13 Apr 2010 02:19:03 +0200
Received: from [192.168.178.20] ([192.168.178.20])
by my.no-ip.org
; Tue, 13 Apr 2010 02:18:53 +0200
Message-ID: <4BC3B86D.9060305@fantasy.dom>
Date: Tue, 13 Apr 2010 02:18:53 +0200
From: My Name <me@fantasy.dom>
Reply-To: me@fantasy.dom
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: me@online.de, me@web.de
Subject: Test c->a,b
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V01U2FsdGVkX18ZoKKMMKhrXB5veOvNZuzXIdDZqAvgCEg3O4i
s8oT1pJfhNKQ0Q+WnT/nX10MDilZ0PBrfqM3qEqpYdT/MgPhAR
fFcv9EZtl36RgAE7KVQXdzqmfT4hD3r
Return-Path: me@fantasy.dom

The header contains me@fantasy.dom in from, and global rule 1 and 2 did not fit.
The header contains "My Name" in from, and global rule 3 fitted.
And should have been sent taking route a.

The Header shows the routing:
192.168.178.20 (=name not given from TB, ip of PC running TB)
->my.no-ip.org (=217.228.xxx.yyy, local hMailServer)
->mrelayeu.kundenserver.de (incoming mail gate of online.de)
->moutng.kundenserver.de (outgoing mail gate of online.de)
->mx27.web.de (mail server of web.de)

This shows rule 3 was taken as expected, because route a was used.

The header still contains me@fantasy.dom in from.
If the global rules above would have been applied to the fetched message again,
rule 3. would fit and it would have been send again over route a.
But i only got it one time!!!

This clearly shows that none of the global rules took action on the fetched messages!
This is what i wanted (and hoped) but you and documentation are contradicting that.
Can you explain this?

Thanks in Advance
Michael

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

Re: How to rule and route?

Post by mattg » 2010-04-13 17:45

Then what you want is working how you planned? Great.

As Doom has stated in another unrelated recent thread - http://www.hmailserver.com/forum/viewto ... =7&t=18043
^DooM^ wrote:From address is not the FROM header contained in the email it is the SMTP Envelope FROM command issued by the mailserver. Check the logs to see what FROM address the server sent.
http://www.hmailserver.com/documentatio ... rence_rule

Your external account messages will NOT have SMTP Envelope downloaded with the message, only the message is downloaded
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

haubmi
Normal user
Normal user
Posts: 42
Joined: 2010-03-17 15:58

Re: How to rule and route?

Post by haubmi » 2010-04-13 18:28

Hello Matt,

thanks for your reply.
But i still don't understand why my global rules don't take action on the downloaded messages.

http://www.hmailserver.com/documentatio ... rence_rule says:
Predefined field

From - The From MIME-header in the email message.
According to that the rule would resend the downloaded message.

Can it be hMailServer remembers the ID of the send message and if it sees it in the
downloaded message it will not apply the global rules or will not send again (even if told by the rule)?

Or has it something to do with the "Rule loop limit" (it is set to 5 here)?

Please know, i have to understand that, because i don't want to run into problems in the future,
in an now unknown case.

Thanks
Michael

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: How to rule and route?

Post by martin » 2010-04-26 20:32

> think when hMailServer fetches from the users "External Accounts", no global rules are applied, only "Account rules".

Global rules are applied to all messages, regardless of where they come from. So that assumption is incorrect.

> Can it be hMailServer remembers the ID of the send message and if it sees it in the downloaded message it will not apply the global rules or will not send again (even if told by the rule)?

No, that's not the case.

Post Reply