Help!

1 Address to 2 Users


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Genreal Discussions RSS
Next:  Serial console and Xen  
Author Message
Wayne
External


Since: Oct 27, 2006
Posts: 3



PostPosted: Wed Aug 08, 2007 10:59 pm    Post subject: 1 Address to 2 Users
Archived from groups: comp>os>linux>misc (more info?)

Hey,

I am running a small mail server with multiple domains on it.

I now need to setup one address on the one domain that forwards to two local
users.
What would the best way to achieve this be ?

Any help would be appreciated.

Thank you,

Wayne
Back to top
Chris F.A. Johnson
External


Since: Oct 06, 2004
Posts: 589



PostPosted: Wed Aug 08, 2007 10:59 pm    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-08-08, Wayne wrote:
> Hey,
>
> I am running a small mail server with multiple domains on it.
>
> I now need to setup one address on the one domain that forwards to two local
> users.
> What would the best way to achieve this be ?

Put it in /etc/aliases. This will sent mail addressed to
someone RemoveThis @example.com to local users qwerty and uiop:

someone RemoveThis @example.com:qwerty,uiop

Restart your mailserver or run newaliases after making the change.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Back to top
Steve Wampler
External


Since: Dec 08, 2004
Posts: 58



PostPosted: Wed Aug 08, 2007 10:59 pm    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Chris F.A. Johnson wrote:
> On 2007-08-08, Wayne wrote:
>> Hey,
>>
>> I am running a small mail server with multiple domains on it.
>>
>> I now need to setup one address on the one domain that forwards to two local
>> users.
>> What would the best way to achieve this be ?
>
> Put it in /etc/aliases. This will sent mail addressed to
> someone.TakeThisOut@example.com to local users qwerty and uiop:
>
> someone.TakeThisOut@example.com:qwerty,uiop
>
> Restart your mailserver or run newaliases after making the change.

Hmmm, does this really work? I thought /etc/aliases only worked
for one domain (works if the aliases are common across all domains
or there's only one domain.

Still, if it works, it's a simple fix - try it!

If it doesn't work and you're using sendmail, look into the
virtusertable feature - you can map a domain-specific name
with it and, by mapping to an aliases set up as above, get
that domain-specific name to map to two local users, ala:

virtusertable entry:
someone.TakeThisOut@example.com double_local_user

/etc/aliases entry:
double_local_user:qwerty,uiop

Note that you'll have to run make in /etc/mail after setting virtusertable,
and probably also restart sendmail.


--
Steve Wampler -- swampler.TakeThisOut@noao.edu
The gods that smiled on your birth are now laughing out loud.
Back to top
Keith Keller
External


Since: Jun 21, 2006
Posts: 458



PostPosted: Wed Aug 08, 2007 10:59 pm    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-08-08, Chris F.A. Johnson <cfajohnson.TakeThisOut@gmail.com> wrote:
> Put it in /etc/aliases. This will sent mail addressed to
> someone.TakeThisOut@example.com to local users qwerty and uiop:
>
> someone.TakeThisOut@example.com:qwerty,uiop
>
> Restart your mailserver or run newaliases after making the change.

IIRC you will need to run newaliases whether or not you restart the
mailserver; the MTAs I know will not produce a new aliases db on
startup. (For sendmail and Postfix, restarting the daemon is not
needed; dunno about Exim.)

--keith


--
kkeller-usenet.TakeThisOut@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Back to top
Chris F.A. Johnson
External


Since: Oct 06, 2004
Posts: 589



PostPosted: Wed Aug 08, 2007 10:59 pm    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-08-08, Keith Keller wrote:
> On 2007-08-08, Chris F.A. Johnson <cfajohnson RemoveThis @gmail.com> wrote:
>> Put it in /etc/aliases. This will sent mail addressed to
>> someone RemoveThis @example.com to local users qwerty and uiop:
>>
>> someone RemoveThis @example.com:qwerty,uiop
>>
>> Restart your mailserver or run newaliases after making the change.
>
> IIRC you will need to run newaliases whether or not you restart the
> mailserver; the MTAs I know will not produce a new aliases db on
> startup. (For sendmail and Postfix, restarting the daemon is not
> needed; dunno about Exim.)

For postfix, either will do. I don't remember about others; it's
been a while.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Back to top
Wayne
External


Since: Oct 27, 2006
Posts: 3



PostPosted: Thu Aug 09, 2007 11:17 am    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hey,

I'ved used the first option of editing /etc/aliases with the example
someone.TakeThisOut@example.com:qwerty,uiop

Which has worked, will continue testing it but thanks to all for the help!

Wayne.

someone.TakeThisOut@example.com:qwerty,uiop

"Wayne" <wayne.TakeThisOut@domain.com> wrote in message
news:1186606762.602122@wblv-ip-nnrp-1...
> Hey,
>
> I am running a small mail server with multiple domains on it.
>
> I now need to setup one address on the one domain that forwards to two
> local users.
> What would the best way to achieve this be ?
>
> Any help would be appreciated.
>
> Thank you,
>
> Wayne
>
Back to top
Steve Wampler
External


Since: Dec 08, 2004
Posts: 58



PostPosted: Thu Aug 09, 2007 11:52 am    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Wayne wrote:
> Hey,
>
> I'ved used the first option of editing /etc/aliases with the example
> someone.RemoveThis@example.com:qwerty,uiop
>
> Which has worked, will continue testing it but thanks to all for the help!
>
> Wayne.
>
> someone.RemoveThis@example.com:qwerty,uiop

A simple test would be (since you have multiple domains) is to send
some mail to "someone@another_example.com" and see if it goes to those
two local users or not. I'm curious to know if it does as (on
my CentOS system [sendmail], at least), "man aliases" says:

Aliasing occurs only on local names.

-Steve

--
Steve Wampler -- swampler.RemoveThis@noao.edu
The gods that smiled on your birth are now laughing out loud.
Back to top
Dances With Crows
External


Since: Sep 16, 2006
Posts: 307



PostPosted: Thu Aug 09, 2007 8:33 pm    Post subject: Re: 1 Address to 2 Users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steve Wampler staggered into the Black Sun and said:
> Wayne wrote:
>> I'ved used the first option of editing /etc/aliases with the example
>> someone RemoveThis @example.com:qwerty,uiop
>>
>> Which has worked, will continue testing it but thanks to all for the
>> help!
> A simple test would be (since you have multiple domains) is to send
> some mail to "someone@another_example.com" and see if it goes to those
> two local users or not. I'm curious to know if it does as (on my
> CentOS system [sendmail], at least), "man aliases" says:
> Aliasing occurs only on local names.

I'm not sure, but I think this means that the aliases will be expanded
only if the domain another_example.com matches a domain that the MTA is
accepting mail for. At least when I had exim set up as accepting mail
for dom1.example.com and dom2.example.com , mail to
production@dom[12].example.com sent mail to all the people on the
"production" alias. The Fine Manual for your MTA probably has the full
story spelled out in excruciating detail if you really want to know.

--
"sometimes I am called upon to program stuff." -- Dag
"I suppose that program stuffing is to programs as gerbil stuffing is
to gerbils." -- AJ Rosenthal (on ASR 04/14/2002)
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Genreal Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum