Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[courier-users] Domain mailbox forward.

1 view
Skip to first unread message

Federico Baraldi

unread,
Dec 29, 2009, 4:26:08 AM12/29/09
to
Hi all, i need to forward all mailbox from mydomain.net to mydomain.com ... is there a simple setup to do the task in courier ??

Thank you ...

--
Federico Baraldi

GPG FP: 6907 438C 403E C896 5D67 75FD 9E17 7BA6 E975 5C08


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
courier-users mailing list
courie...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Sam Varshavchik

unread,
Dec 29, 2009, 7:13:05 AM12/29/09
to
Federico Baraldi writes:

> Hi all, i need to forward all mailbox from mydomain.net to mydomain.com ... is there a simple setup to do the task in courier ??

That depends on what you mean by "forward". You could mean at least four
different things:

1) Take all mail to mydomain.net, and forward it to whatever the MX for
mydomain.com is, without changing the recipient's address.

2) Replace any reci...@mydomain.net with reci...@mydomain.com, that
process the mail normally

3) Rewrite all recipient addresses in the headers from
reci...@mydomain.net to reci...@mydomain.com

4) Both #2 and #3.

#1 is simple. #2 and #3 (and #4) require additional work. And I suppose that
by "forward" you could mean something different altogether. So, you'll have
to explain what exactly you're trying to accomplish.

eculp

unread,
Dec 29, 2009, 8:51:18 AM12/29/09
to
Quoting Federico Baraldi <fede...@fbaraldi.it>:

> Hi all, i need to forward all mailbox from mydomain.net to
> mydomain.com ... is there a simple setup to do the task in courier ??
>

> Thank you ...

First you might want to check out:
# man makehosteddomains

Then you might want to add:
mydomain.net <tab> mydomain.com
then run:
# makehosteddomains
and confirm with some testing.

ed

Federico Baraldi

unread,
Dec 29, 2009, 12:40:45 PM12/29/09
to
I'm quite courious .... so can i have all four descriptions ??

My problem is that for an administrative error i'm not able to renew mydomain.net (valid until 30-06-2010) so i registered mydomain.com and i'd like that all mailbox
as name.s...@mydomain.net were redirected to name.s...@mydomain.com.

My user have been told to switch from mydomain.net to mydomain.com and to advise all possible sender .... we have 6 months ti perform the migration !!

I've added mydomain.com to hosteddomains and i've created all name.s...@mydomain.com mailboxes .... but i don't know which solution is the best .... perhaps both #2 and #3.

Thank you fro helping .... Bye.

Il giorno 29/dic/2009, alle ore 13.13, Sam Varshavchik ha scritto:

> Federico Baraldi writes:
>
>> Hi all, i need to forward all mailbox from mydomain.net to mydomain.com ... is there a simple setup to do the task in courier ??
>

> That depends on what you mean by "forward". You could mean at least four different things:
>
> 1) Take all mail to mydomain.net, and forward it to whatever the MX for mydomain.com is, without changing the recipient's address.
>
> 2) Replace any reci...@mydomain.net with reci...@mydomain.com, that process the mail normally
>
> 3) Rewrite all recipient addresses in the headers from reci...@mydomain.net to reci...@mydomain.com
>
> 4) Both #2 and #3.
>
> #1 is simple. #2 and #3 (and #4) require additional work. And I suppose that by "forward" you could mean something different altogether. So, you'll have to explain what exactly you're trying to accomplish.

--

Sam Varshavchik

unread,
Dec 29, 2009, 6:25:40 PM12/29/09
to
Federico Baraldi writes:

> I'm quite courious .... so can i have all four descriptions ??
>
> My problem is that for an administrative error i'm not able to renew mydomain.net (valid until 30-06-2010) so i registered mydomain.com and i'd like that all mailbox
> as name.s...@mydomain.net were redirected to name.s...@mydomain.com.

That would be something else entirely. "Forward" generally means doing
something that involves forwarding the mail to another server, which is not
the case here. This is why it's always best to explain exactly what you're
trying to accomplish.

> My user have been told to switch from mydomain.net to mydomain.com and to advise all possible sender .... we have 6 months ti perform the migration !!


>
> I've added mydomain.com to hosteddomains and i've created all name.s...@mydomain.com mailboxes .... but i don't know which solution is the best .... perhaps both #2 and #3.

You should not have to individually create new mailboxes immediately. The
makehosteddomains man page gives you a direct example of what you need to
do:

Each domain can optionally be followed by a single tab character, in
order to specify an alias for a domain, for example:

domain.com
mail.domain.com<TAB>domain.com
example.com<TAB>domain.com

First, we list the domain "domain.com" as a hosted domain. Then, we
also list the domain "mail.domain.com", which is an alias for
domain.com. The Courier mail server will take any address of the form
<add...@mail.domain.com>, rewrite it as <add...@domain.com>, and
attempt to deliver the mail to a local mailbox for that name. The third
entry does the same for "example.com"; mail addressed to
<add...@example.com> is delivered to the local mailbox
<add...@domain.com>.

In your case, your hosteddomains file should contain:

mydomain.net
mydomain.com<tab>mydomain.net

No changes to the names of accounts, for now. Now, either us...@mydomain.net
or us...@Mydomain.com will end up being delivered to your existing
us...@mydomain.net mailbox. This only affects actual mail delivery, the
headers, if any, in the messages remain unchanged. Mail servers generally do
not rewrite mail headers. Mail servers use message envelope sender and
recipient addresses, which are separate from the contents of any headers,
which, from the mail server's perspective, are for informative purposes
only.

At some point, though, you will have to flip this around, create a matching
us...@mydomain.com account to replace each existing us...@mydomain.net
address, then switch the domains in the hosteddomains file as well.

Sam Varshavchik

unread,
Dec 29, 2009, 9:46:54 PM12/29/09
to
Lars Althof writes:

> On 12/29/2009 5:25 PM, Sam Varshavchik wrote:
>>
>> In your case, your hosteddomains file should contain:
>>
>> mydomain.net
>> mydomain.com<tab>mydomain.net
>>

> Thank you for pointing that out. I had been using Webadmin for most of
> my configuration, and had not realized that this is possible. Could this
> be added to Webadmin?

Yes, it could. I'll make a note of it.

Federico Baraldi

unread,
Dec 30, 2009, 6:55:45 AM12/30/09
to
Thank you very much for pointing this out .... the only thing i'd like also to do is to teach my user to download mail from mydomain.com forgetting mydomain.net
so the first month i'd like to copy every mail from mydomain.net to mydomain.com (so that when a user reply to a message the sender sees the new mail address)
and from the second month i'll close the mydomain.net domain accounts manteining only the alias.

How can copy (or move) all mail from one domain to another one ??

Il giorno 30/dic/2009, alle ore 00.25, Sam Varshavchik ha scritto:

> Federico Baraldi writes:
>
>> I'm quite courious .... so can i have all four descriptions ??
>> My problem is that for an administrative error i'm not able to renew mydomain.net (valid until 30-06-2010) so i registered mydomain.com and i'd like that all mailbox
>> as name.s...@mydomain.net were redirected to name.s...@mydomain.com.
>
> That would be something else entirely. "Forward" generally means doing something that involves forwarding the mail to another server, which is not the case here. This is why it's always best to explain exactly what you're trying to accomplish.
>
>> My user have been told to switch from mydomain.net to mydomain.com and to advise all possible sender .... we have 6 months ti perform the migration !!
>> I've added mydomain.com to hosteddomains and i've created all name.s...@mydomain.com mailboxes .... but i don't know which solution is the best .... perhaps both #2 and #3.
>
> You should not have to individually create new mailboxes immediately. The makehosteddomains man page gives you a direct example of what you need to do:
>
> Each domain can optionally be followed by a single tab character, in
> order to specify an alias for a domain, for example:
>
> domain.com
> mail.domain.com<TAB>domain.com
> example.com<TAB>domain.com
>
> First, we list the domain "domain.com" as a hosted domain. Then, we
> also list the domain "mail.domain.com", which is an alias for
> domain.com. The Courier mail server will take any address of the form
> <add...@mail.domain.com>, rewrite it as <add...@domain.com>, and
> attempt to deliver the mail to a local mailbox for that name. The third
> entry does the same for "example.com"; mail addressed to
> <add...@example.com> is delivered to the local mailbox
> <add...@domain.com>.
>

> In your case, your hosteddomains file should contain:
>
> mydomain.net
> mydomain.com<tab>mydomain.net
>

> No changes to the names of accounts, for now. Now, either us...@mydomain.net or us...@Mydomain.com will end up being delivered to your existing us...@mydomain.net mailbox. This only affects actual mail delivery, the headers, if any, in the messages remain unchanged. Mail servers generally do not rewrite mail headers. Mail servers use message envelope sender and recipient addresses, which are separate from the contents of any headers, which, from the mail server's perspective, are for informative purposes only.
>
> At some point, though, you will have to flip this around, create a matching us...@mydomain.com account to replace each existing us...@mydomain.net address, then switch the domains in the hosteddomains file as well.

--

Sam Varshavchik

unread,
Dec 30, 2009, 5:53:33 PM12/30/09
to
Federico Baraldi writes:

> Thank you very much for pointing this out .... the only thing i'd like also to do is to teach my user to download mail from mydomain.com forgetting mydomain.net
> so the first month i'd like to copy every mail from mydomain.net to mydomain.com (so that when a user reply to a message the sender sees the new mail address)
> and from the second month i'll close the mydomain.net domain accounts manteining only the alias.
>
> How can copy (or move) all mail from one domain to another one ??

There's nothing to copy. The effect of your changes is replacing one
account's login ID/address with another.

The mail server takes the recipient's address, and looks up the account's
home directory, userid, and groupid. Then, the message gets delivered to the
given mailbox. For IMAP, POP3, and webmail, this is the same, except that
the corresponding server will server mail from the given account.

The effect of your changes is to simply add another address that goes to the
same userid, groupid, and home directory. Nothing needs to be moved.

Of course, you must have a test server, where you fully test all changes to
your mail server's configuration, before deploying them to production. You
should simply step through the entire migration process, on your test
server, until you understand how it works.


0 new messages