Rule to forward all emails from one domain to an account

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
FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-08 13:55

hey,

Ive created a rule to forward all email from a specific domain like @testforward.com to a specific account but the problem is that the rule creates a loop reciving 5 equal emails on that specific account.

Example:

TO contains @testforward.com forward email to xpto@anotherlocaldomain.com

I dont understand why the loop is created...

Any help is welcome.

Thanks in advance

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

Re: Rule to forward all emails from one domain to an account

Post by Bill48105 » 2011-07-08 14:12

Setting up the 2nd domain as a domain alias ("Names" tab) won't work?
And the loop occurs because whatever criteria you are testing matches the result as well.
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. ***

FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Re: Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-08 15:12

For this case no, it was like a "unique" request from administration.

Yes, but i send a email to fishburn@testforward.com and the xpto@anotherlocaldomain.com recieves like 5 equal emails, i think this is weird and makes no sense i guess :s

Is there another way to do this?

Edit: I could add the email in forward tab but the user would see this setting and that is not very good....:s and i could not forward email sent just recevied.

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

Re: Rule to forward all emails from one domain to an account

Post by Bill48105 » 2011-07-08 15:41

So this is for 1 address not an entire domain? We'd need to see your rule settings/values..
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. ***

FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Re: Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-08 15:44

thanks bill for your helping :)

One address will recieve all sent and recieve mails from a specific domain.

Ive posted and example, it works but enter in a loop.
Attachments
Untitled-1.jpg

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Rule to forward all emails from one domain to an account

Post by ^DooM^ » 2011-07-08 16:37

You need to add a second criteria

From not contains forward@emailaddress.com
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

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

Re: Rule to forward all emails from one domain to an account

Post by Bill48105 » 2011-07-08 17:07

^DooM^ wrote:You need to add a second criteria

From not contains forward@emailaddress.com
And stop rule processing as action I'd assume.
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
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: Rule to forward all emails from one domain to an account

Post by dzekas » 2011-07-08 17:11

Why are you using rules? What's wrong with catchall?

FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Re: Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-08 18:17

dzekas wrote:Why are you using rules? What's wrong with catchall?
I think with catchall i only getting the messages to unknow email address.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: Rule to forward all emails from one domain to an account

Post by dzekas » 2011-07-08 18:48

FiShBuRn wrote:
dzekas wrote:Why are you using rules? What's wrong with catchall?
I think with catchall i only getting the messages to unknow email address.
how about http://www.hmailserver.com/documentatio ... nce_mirror

FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Re: Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-08 20:27

that will mirror all domains :/ but thanks anyway...

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

Re: Rule to forward all emails from one domain to an account

Post by mattg » 2011-07-11 01:13

^DooM^ wrote:You need to add a second criteria

From not contains forward@emailaddress.com
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

FiShBuRn
Normal user
Normal user
Posts: 88
Joined: 2007-06-29 16:43

Re: Rule to forward all emails from one domain to an account

Post by FiShBuRn » 2011-07-11 15:24

I know mattg im only trying to figure out my problem with hmail crashing and then i will have a look at this...its secundary for now.

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

Re: Rule to forward all emails from one domain to an account

Post by Bill48105 » 2011-07-11 16:20

FiShBuRn wrote:I know mattg im only trying to figure out my problem with hmail crashing and then i will have a look at this...its secundary for now.
You consider screwy rules could somehow be cause of your crashes? You certainly have something odd going on there. ;)
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. ***

mirfan
New user
New user
Posts: 10
Joined: 2011-03-31 13:51

Re: Rule to forward all emails from one domain to an account

Post by mirfan » 2013-08-12 15:16

Hi FiShBuRn,

Try changing "Rule loop Limtt" in SMTP settings .. default it is set to "5"

Open Hmail Server > Settings > Protocol > SMTP > Advanced = Other ->Rule loop Limit '5'

Read below or visit url for more information:

Rule loop count
This option lets you prevent hMailServer from creating endless message delivery loops. As an example, it's possible to set up an account rule that forwards message from one user (UserA) to another (UserB), and then another rule that forwards the message back from UserB to UserA. To prevent this from resulting in an endless loop, hMailServer limits the number of automatic forwards to the value defined by Rule loop count. (hMailServer 4.2 and later.)


http://www.hmailserver.com/documentatio ... rence_smtp

Thanks
Irfan

Post Reply