Koozali.org: home of the SME Server

Mail rules - Help!

renee

Mail rules - Help!
« on: April 24, 2006, 03:46:05 PM »
Hi,

The situation is as follows:
Domains:
abc.com
xyz.com

User:
alex
ben
chris
david

I would like to get alle the mail delevered to xyz.com to be redirected to ben. So even alex@xyz.com will be delivered to ben.

What file do I need to alter to get this done?
And what do I need to put in the file?

/Renee

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mail rules - Help!
« Reply #1 on: April 25, 2006, 07:36:56 PM »
renee

see the pseudonyms panel
...

renee

Mail rules - Help!
« Reply #2 on: April 25, 2006, 09:19:25 PM »
I hate to disappoint you but that is not the solution.

I even tried to ad *@xyz to the pseudonyms list buts even that is not working. Any change someone knows what file to edit?

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #3 on: April 26, 2006, 09:28:22 AM »
renee

Mail sent to invalid addresses will be rejected by the server, so a *@xyz.com wil not catch everything addressed to that domain anyway.

Therefore just add the users one by one
alex@xyz.com  >  ben
chris@zyx.com  > ben
david@xyz.com  >  ben
etc etc for any other valid users/addresses.

I don't know if the method detailed in the HOWTO for sme6 is still applicable in sme7, but you could have a look and try it out.

http://mirror.contribs.org/smeserver//contribs/rmitchell/smeserver/howto/virtual%20domain%20email%20aliases%20HOWTO%20for%20sme%20server.htm
...

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #4 on: April 26, 2006, 10:37:30 AM »
renee

>...I hate to disappoint you but that is not the solution.
>... I even tried to ad *@xyz to the pseudonyms list buts even that is not working.


It does work !
I just tried it om sme7RC1.
I can add a pseudonym for
*@domain1.com forwarded to user5

If I send a local email to a valid user account eg
user1@domain1.com
it gets received by user5 OK.

Check your setup and configure your virtual domains correctly and only use valid email adresses ie a user or group or pseudonym must exist on your server.
...

renee

Mail rules - Help!
« Reply #5 on: April 26, 2006, 10:46:47 AM »
I think the howto gives me the solution:
Quote

If you want all domain mail going into one account, except for defined users, enter your virtual aliases in the form shown below. In the example below domain1.com:fred sends all @domain1.com mail to user fred except for jim and bob who get their mail directly..

   domain1.com:fred
   jim@domain1.com:jim
   bob@domain1.com:bob

I cannot acces the SME server at this moment so I'll try this tonight. I realy hope the /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases file is there by default.

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #6 on: April 26, 2006, 10:56:39 AM »
renee

>..I think the howto gives me the solution...

You don't need to use the howto, see my second post above.
What you want does appear to work OK using the pseudonyms panel, but you must also add appropriate virtual domains and valid addresses (either as user accounts, groups or pseudonyms).
...

renee

Mail rules - Help!
« Reply #7 on: April 26, 2006, 11:18:49 AM »
I'll try the wildcard first thing tonight

The Pseudonyms solution is not the solution I'm looking for.

My first post is not the complete repesentation of the real thing:
1. dfjkdsjfksdj.nl
2. ldfhsdkfj.nl
3. dsfasdfasd.com
4. urisjfasdjfk.nl

1. is my full name
2. is my wives full name
3. is the domain of a friend
4. our company domain

We all may have an acoount for ebay and for some other things:
example:
ebay(a)dfjkdsjfksdj.nl
ebay(a)ldfhsdkfj.nl
ebay(a)dsfasdfasd.com

I cannot put all the possible pseudonyms in the list.

I want:
All mail for 1 to user a
All mail for 2 to user b
All mail for 3 to user c, except strangename(a)dsfasdfasd.com which must go to stangename

All mail for 4 to user admin exept a list of emplyees names to their account

Maybe I should edit this file /var/qmail/alias/.qmail-localdelivery-default

renee

Mail rules - Help!
« Reply #8 on: April 26, 2006, 11:44:22 AM »
Just got my wife to create and edit the /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases file.

This works fine after you use signal-event email-update (forgot to do that first)

I'll still try the * thing tonight, if it's not working I'll go with the 90aliases file.

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #9 on: April 26, 2006, 12:26:58 PM »
renee

> My first post is not the complete repesentation of the real thing:

It's usually better if you post your real problem, saves us wasting time and forum posts.

Keep in mind that the pseudonyms panel has been enhanced in sme7 to provide the functionality that the old virtual email aliases howto did for sme6.

******************************

>...I'll try the wildcard first thing tonight

I thought you said you already tried it and it didn't work ?


>...The Pseudonyms solution is not the solution I'm looking for.

It doesn't sound like you have even tried it, so how do you know it is not the solution ?


>... I cannot put all the possible pseudonyms in the list.

Why not, that is what the pseudonyms panel is for, it would be no different to entering the same information into a 90aliases file (or whatever file).


>... All mail for 1 to user renee

add this pseudonym

*@reneekloosterziel.nl  > renee


>... All mail for 2 to user linda

add this pseudonym

*@lindadenijs.nl  > linda


> ... All mail for 3 to user erik

add this pseudonym

*@sheilaenerik.com  > erik


>... except sheila(a)sheilaenerik.com which must go to sheila

That will go to sheila anyway without needing to add a pseudonym
ie messages sent to
sheila@any_domain_on_server
will go to
sheila@maindomain
unless otherwise directed in the pseudonyms panel.

You cannot add
sheila@sheilaenerik.com  > sheila
as a pseudonym anyway, as the panel will not allow forwarding to the same user account, (error = A pseudonym cannot point to the same account), so you would need to do somethimg like:

add this pseudonym

sheila@sheilaenerik.com  > sheila2


>... All mail for 4 to user admin

add this pseudonym

*@nicecreations.nl  > admin


>... exept a list of emplyees names to their account

same issue as above with sheila, the messages will go to the user accounts anyway, or you could do

employee1@nicecreations.nl  > employee1a

employee2@nicecreations.nl  > employee2a

employee3@nicecreations.nl  > employee3a


How hard is any of that that to do, especially when I have given you all the answers  ?
...

renee

Mail rules - Help!
« Reply #10 on: April 26, 2006, 12:53:01 PM »
I tought I covered the complete story in my first post. Sorry for that.

I did try the * solution but it didn't work. If this does work at your place I must be overlooking something. Let me try it again.

Editing the 90aliasses custom template gives me the option to use wildcards for sure.

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #11 on: April 26, 2006, 01:14:50 PM »
renee

> I did try the * solution but it didn't work.

Instead of saying it didn't work, tell us

what did you do
what did you expect
what didn't happen
what did happen


> If this does work at your place I must be overlooking something.

It works as I have explained, I tried it on a test system


> Editing the 90aliasses custom template gives me the option to use wildcards for sure

As I said previously the pseudonym panel enhancements replace the howto, they are effectively the same thing.
...

renee

Mail rules - Help!
« Reply #12 on: April 26, 2006, 01:47:49 PM »
I added a pseudonym
*@domain1.com -> erik

Sent an email to renee@domain1.com
I expected this to get delivered to erik but it did get delivered to renee.



After I removed the pseudonym I have edited the 90aliasses in the custom-templates folder and added this line:

domain1.com:erik

Sent an email to renee@domain1.com
I expected this to get delivered to erik and it did.

renee

Mail rules - Help!
« Reply #13 on: April 26, 2006, 08:51:41 PM »
Just tried the solution with pseudonyms.

1. Pseudonym "*@domain1.com" -> "User2"
Result: Mail for User1@domain1.com gets delivered to User1

2. Pseudonym "@domain1.com" -> "User2"
Result: Mail for User1@domain1.com gets delivered to User1

3. Pseudonym "domain1.com" -> "User2"
Result: Mail for User1@domain1.com gets delivered to User1

Edited the 90aliasses file, added this line:
domain1:User2
Result: Mail for User1@domain1.com gets delivered to User2

I'll stick to the 90aliasses file. Thanks RayMitchell for your help! 8-)

Offline raem

  • *
  • 3,972
  • +4/-0
Mail rules - Help!
« Reply #14 on: April 28, 2006, 10:46:27 AM »
renee

What version of sme7 ar eyou using, sme7RC1 ?

The pseudonyms panel should work the same as the aliases file does.
If you are having problems, which you do seem to be having, please report them to the bug tracker.
...