Koozali.org: home of the SME Server

forward mail from mail@domain to user@domain

Offline 7eis

  • *
  • 47
  • +0/-0
forward mail from mail@domain to user@domain
« on: December 08, 2007, 11:28:45 PM »
I need to forward all incoming mail at mail@domain to a specific user.

I tried following code and then reconfigured
Code: [Select]
/sbin/e-smith/signal-event user-create mailno luck

I know this can be done as I previously managed to add 'mail' as a user in the server-manager and could successfully redirect the mail.

The db's help information isn't very helpfull, and I failed to find a topic with similar problem.

Please enlight me

Regards
7eis

« Last Edit: December 08, 2007, 11:30:55 PM by 7eis »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: forward mail from mail@domain to user@domain
« Reply #1 on: December 09, 2007, 01:20:48 AM »
7eis

I think you need to read the manual ie the Pseudonyms chapter, as that is a basic issue.

Add the whole address ie mail@yourdomain.com as a pseudonym
...

Offline 7eis

  • *
  • 47
  • +0/-0
Re: forward mail from mail@domain to user@domain
« Reply #2 on: December 09, 2007, 02:12:28 AM »
7eis

I think you need to read the manual ie the Pseudonyms chapter, as that is a basic issue.

Add the whole address ie mail@yourdomain.com as a pseudonym


Hi RayMitchell,

Thanks for your reply!

Adding a pseudonym for every singel domain and subdomain is not a good solution as we recieve mail in from multiple domains, and the fact that domains are frequently added/removed. Only the same 10-15 people use the server (no need to do the nick1 or nick@domain1 etc.)so the only sane solution would be the one that I mentioned previously.

Basic problem is that a user/group already is named mail - I just need to add them to the server-manager -> users to work around the "Error occurred while creating pseudonym in database." slash "Error: the account "mail" can't be created because there is already a system account of that name.".

Regards
7eis

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: forward mail from mail@domain to user@domain
« Reply #3 on: December 09, 2007, 07:37:30 AM »
I need to forward all incoming mail at mail@domain to a specific user.

I tried following code and then reconfigured
Code: [Select]
/sbin/e-smith/signal-event user-create mailno luck

I know this can be done as I previously managed to add 'mail' as a user in the server-manager and could successfully redirect the mail.

The db's help information isn't very helpfull, and I failed to find a topic with similar problem.

Please enlight me

Regards
7eis



A part from what problems having a user called 'mail' may cause, have you put the cart before the horse?

Maybe you need to populate the accounts database with your new user before running that command.
Regards,
William

IF I give advise.. It's only if it was me....

Offline 7eis

  • *
  • 47
  • +0/-0
Re: forward mail from mail@domain to user@domain
« Reply #4 on: December 09, 2007, 03:11:19 PM »
A part from what problems having a user called 'mail' may cause, have you put the cart before the horse?

Maybe you need to populate the accounts database with your new user before running that command.


I you've read my posts you would know that I do not wish to add a second user/group called 'mail', but simply add the 'mail' entry as a user to the server-manager's user-panel. I have done this previously on my current setup (sme 6.x->7.2) and it caused no problems what so ever.

A different solution that would allow me to forward mail's e-mail (mail@$domain) to an internal user that would be a great solution too.

I will look into the solution you suggested.

Regards

Offline raem

  • *
  • 3,972
  • +4/-0
Re: forward mail from mail@domain to user@domain
« Reply #5 on: December 09, 2007, 04:37:07 PM »
7eis

http://forums.contribs.org/index.php?topic=32869.0

As it clearly says though, you SHOULD NOT do what you want to do.
...

Offline 7eis

  • *
  • 47
  • +0/-0
Re: forward mail from mail@domain to user@domain
« Reply #6 on: December 09, 2007, 05:28:36 PM »
I am aware of the 'danger' i which I put my system, and I'll happily take the risk :lol:

For future reference this solved my problem:
Code: [Select]
db accounts set mail user
Best regards
7eis

Offline raem

  • *
  • 3,972
  • +4/-0
Re: forward mail from mail@domain to user@domain
« Reply #7 on: December 09, 2007, 05:35:23 PM »
7eis

You would be mush wiser to add pseudonyms to your system eg one for each domain ie
mail@domain1 > user1
mail@domain2 > user1
etc etc
It's not hard to do and does not interfere with system allocated accounts.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: forward mail from mail@domain to user@domain
« Reply #8 on: December 09, 2007, 05:40:20 PM »
To all

Quote
For future reference this solved my problem:
Code: [Select]
db accounts set mail user


For future reference to other readers, various accounts have been marked as system accounts and hidden from view for good reasons.
It is NOT WISE to change them and use them as normal accounts, as you may have unforseen ramifications at a later stage.
The pseudonyms panel provides an alternative means of creating "same name" email addresses for different domains that can be directed to different users or the same user.
These can be created to use existing system names or normal user created names.
« Last Edit: December 09, 2007, 05:42:01 PM by RayMitchell »
...