Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Brian on November 05, 2003, 07:40:20 PM

Title: Virtual Domain / Email HowTo Incorrect & Causing Loops
Post by: Brian on November 05, 2003, 07:40:20 PM
Hey All,

It looks like, for what reason I do not know, that the Virtual Email / Domain HowTo is causing errors on my 5.6 machine.

Reference the howto here:
http://mirror.contribs.org/smeserver/contribs/dmay/mitel/howto/vdomain-alias-howto.html

In that howto, near the end, it states "This recreates the file var/qmail/control/virtualdomains with the above alias entries preceeding the domain entries."

Unfortunately, thats is not true, at least not anymore. Now those entries come after the virtualdomains listing (at least on my machine they do) which ends up causing loops.

Obviously, a short term fix would be to just move them up to the top of the var/qmail/control/virtualdomains file, but this will be reset anytime an /sbin/e-smith/signal-event console-save trigger.

Is there a way to make the virtualdomains file build correctly (with the custom vdomains at the top and the e-smith-generated ones at the bottom?)

Brian
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Bob King on November 06, 2003, 01:12:10 AM
From http://www.e-smith.org/custom/

"Template fragments are assembled in alphabetical order, except for the special fragments template-begin and template-end, which are inserted first and last, respectively."

Doing the following should correct your problem.

Check the names of the template fragmnets in /etc/e-smith/templates/var/qmail/control/virtualdomains . If local domains are set in the file 80localdomains fragment then you will need to rename your custom fragment with a number less than "80" to get the alias entries to preceed the domain entries in the rebuilt var/qmail/control/virtualdomains file.

Try changing the custom fragment from

/etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases

to

/etc/e-smith/templates-custom/var/qmail/control/virtualdomains/70aliases

then do continue with Step 6 of the HowTo.
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Brian on November 06, 2003, 02:03:26 AM
Bob

Thanks for the response. Your expertise did what it said, but my problem still remains about the looping. I assumed the entries needed to be on top, but even there they cause issues.

So my 70aliases file (located at /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/70aliases per the HowTo) contains the following information:

myprimary1.com:brian
mydomain2.com:kevin
kevin@myprimary1.com:kevin
brian@mydomain2.com:brian

and so one. This is a fake, but mimics the real entries. my real file is very long but I have checked all the entries.

The real issue comes from, I think, the full domain entries (mydomain1.com:brian). When the virtualdomains file is created by the e-smith console-save event, it includes (now at the top) my entries from 70aliases, and also the other domains/vdomains that look like:

myprimary1.com:alias-localdelivery
www.myprimary1.com:alias-localdelivery
mydomain2.com:alias-localdelivery
www.myprimary1.com:alias-localdelivery

So, whenever both of these are in the virtualdomains file, I get email loops with the following error : "This message is looping: it already has my Delivered-To line." If I remove the duplicate entries, (one that specifies a user per my 70aliases and the other specifying alias-localdelivery), then it all works like it should.

For some reason, it worked all fine with both entries in 5.5, but its not working in 5.6. Any ideas?
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Bob King on November 06, 2003, 02:17:00 AM
Brian,

Do not put any entries in the custom fragment for your "primary domain". The only entries should be for the virtual domain.

Bob
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Brian on November 06, 2003, 02:22:24 AM
Ok. I will change that.

With that in mind, is there a way to have a catch-all for the primary domain then?

Thanks Again bob. I do appreciate it.

Brian
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Bob King on November 06, 2003, 03:23:58 AM
Brian,

Modify mail delvery for your primary domain using the Server Manager. If you want only UserA to receive all the mail for your primary domain you will need to change each user account to froward mail to UserA@primarydomain. If you want UserA to receive mail in addition to the normal users then change each user account the both "deliver localy" and "forwad to" UserA.

Bob
Title: Re: Virtual Domain / Email HowTo Incorrect & Causing Loo
Post by: Jarkor on December 23, 2003, 08:15:10 PM
Hi everybody......

What about receiving all emails for the primary domain, but also the ones with
users not created, for example, I wan t to receive emails for the users present at
e-smith and also the mistakes (klsjdfnksj@pridomain.com).
I know there is a way to deliver to admin, but I want to deliver to another user.
Try modifying the var/wmail/control/virtualdomains template but doesn't works,
loops all emails.

yours,
Jarkor