Delivery to accounts of the same domain on two different servers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Delivery to accounts of the same domain on two different servers

Daniel Bareiro
Hi all!

I am gradually migrating the accounts of a server (let's say
mail1.domain.com) to another server (let's say mail2.domain.com).

In mail2.domain.com I'm using something like this:

----------------------------------------------------------------
virtual_alias_domains = domain.com
virtual_alias_maps = hash:/etc/postfix/virtual
----------------------------------------------------------------

Where /etc/postfix/virtual has something like this:

----------------------------------------------------------------
[hidden email]       john
----------------------------------------------------------------

John is a SASL user (fortunately I was able to get this to work. I will
soon respond to my other thread indicating what the problem was).
Delivery on this way is working. The current MX is mail1.domain.com and
mail2.domain.com is receiving emails via fetchmail.

The issue arises when a mailbox migrated to be used from
mail2.domain.com wants to send an email to a non-migrated mailbox. I get
something like this:

----------------------------------------------------------------
An error occurred while sending mail. The mail server responded:
5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
virtual alias table.
 Please check the message recipient "[hidden email]" and try again.
----------------------------------------------------------------

Is there a way to get Postfix at mail2.domain.com knows that the
mailboxes of domain.com for non-migrated accounts are at
mail1.domain.com? Maybe using a transport table?


Thanks in advance for your time.

Kind regards,
Daniel


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Delivery to accounts of the same domain on two different servers

Daniel Bareiro
Hi again.

On 06/06/17 12:11, Daniel Bareiro wrote:

> I am gradually migrating the accounts of a server (let's say
> mail1.domain.com) to another server (let's say mail2.domain.com).
>
> In mail2.domain.com I'm using something like this:
>
> ----------------------------------------------------------------
> virtual_alias_domains = domain.com
> virtual_alias_maps = hash:/etc/postfix/virtual
> ----------------------------------------------------------------
>
> Where /etc/postfix/virtual has something like this:
>
> ----------------------------------------------------------------
> [hidden email]       john
> ----------------------------------------------------------------
>
> John is a SASL user (fortunately I was able to get this to work. I will
> soon respond to my other thread indicating what the problem was).
> Delivery on this way is working. The current MX is mail1.domain.com and
> mail2.domain.com is receiving emails via fetchmail.
>
> The issue arises when a mailbox migrated to be used from
> mail2.domain.com wants to send an email to a non-migrated mailbox. I get
> something like this:
>
> ----------------------------------------------------------------
> An error occurred while sending mail. The mail server responded:
> 5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
> virtual alias table.
>  Please check the message recipient "[hidden email]" and try again.
> ----------------------------------------------------------------
>
> Is there a way to get Postfix at mail2.domain.com knows that the
> mailboxes of domain.com for non-migrated accounts are at
> mail1.domain.com? Maybe using a transport table?
>
>
> Thanks in advance for your time.
I've tried something like this:

----------------------------------------------------------------
[hidden email] smtp:mail1.domain.com:25
----------------------------------------------------------------

and adding:

----------------------------------------------------------------
transport_maps = hash:/etc/postfix/transport
----------------------------------------------------------------

But I'm still getting the "Recipient address rejected: User unknown in
virtual alias table" message.

Any help is appreciated.


Kind regards,
Daniel


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Delivery to accounts of the same domain on two different servers

Wietse Venema
Daniel:

Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.

> Hi again.
>
> On 06/06/17 12:11, Daniel Bareiro wrote:
>
> > I am gradually migrating the accounts of a server (let's say
> > mail1.domain.com) to another server (let's say mail2.domain.com).
> >
> > In mail2.domain.com I'm using something like this:
> >
> > ----------------------------------------------------------------
> > virtual_alias_domains = domain.com
> > virtual_alias_maps = hash:/etc/postfix/virtual
> > ----------------------------------------------------------------
> >
> > Where /etc/postfix/virtual has something like this:
> >
> > ----------------------------------------------------------------
> > [hidden email]       john
> > ----------------------------------------------------------------
> >
> > John is a SASL user (fortunately I was able to get this to work. I will
> > soon respond to my other thread indicating what the problem was).
> > Delivery on this way is working. The current MX is mail1.domain.com and
> > mail2.domain.com is receiving emails via fetchmail.
> >
> > The issue arises when a mailbox migrated to be used from
> > mail2.domain.com wants to send an email to a non-migrated mailbox. I get
> > something like this:
> >
> > ----------------------------------------------------------------
> > An error occurred while sending mail. The mail server responded:
> > 5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
> > virtual alias table.
> >  Please check the message recipient "[hidden email]" and try again.
> > ----------------------------------------------------------------
> >
> > Is there a way to get Postfix at mail2.domain.com knows that the
> > mailboxes of domain.com for non-migrated accounts are at
> > mail1.domain.com? Maybe using a transport table?
> >
> >
> > Thanks in advance for your time.
>
> I've tried something like this:
>
> ----------------------------------------------------------------
> [hidden email] smtp:mail1.domain.com:25
> ----------------------------------------------------------------
>
> and adding:
>
> ----------------------------------------------------------------
> transport_maps = hash:/etc/postfix/transport
> ----------------------------------------------------------------
>
> But I'm still getting the "Recipient address rejected: User unknown in
> virtual alias table" message.

Instead of removing the user from virtual_alias_maps, replace it with
a 1:1 mapping:

[hidden email] [hidden email]

        Wietse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Delivery to accounts of the same domain on two different servers

Daniel Bareiro

On 06/06/17 17:44, Wietse Venema wrote:

> Daniel:

Hi, Wietse.

What an honor to receive this response from you :)

> Checking application/pgp-signature: FAILURE

Here the signature is validated correctly with Thunderbird and Mutt.
Maybe the client does not have the public key (ID 14E61D37) and so was
not able to validate the signature?

> -- Start of PGP signed section.
>> Hi again.
>>
>> On 06/06/17 12:11, Daniel Bareiro wrote:
>>
>>> I am gradually migrating the accounts of a server (let's say
>>> mail1.domain.com) to another server (let's say mail2.domain.com).
>>>
>>> In mail2.domain.com I'm using something like this:
>>>
>>> ----------------------------------------------------------------
>>> virtual_alias_domains = domain.com
>>> virtual_alias_maps = hash:/etc/postfix/virtual
>>> ----------------------------------------------------------------
>>>
>>> Where /etc/postfix/virtual has something like this:
>>>
>>> ----------------------------------------------------------------
>>> [hidden email]       john
>>> ----------------------------------------------------------------
>>>
>>> John is a SASL user (fortunately I was able to get this to work. I will
>>> soon respond to my other thread indicating what the problem was).
>>> Delivery on this way is working. The current MX is mail1.domain.com and
>>> mail2.domain.com is receiving emails via fetchmail.
>>>
>>> The issue arises when a mailbox migrated to be used from
>>> mail2.domain.com wants to send an email to a non-migrated mailbox. I get
>>> something like this:
>>>
>>> ----------------------------------------------------------------
>>> An error occurred while sending mail. The mail server responded:
>>> 5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
>>> virtual alias table.
>>>  Please check the message recipient "[hidden email]" and try again.
>>> ----------------------------------------------------------------
>>>
>>> Is there a way to get Postfix at mail2.domain.com knows that the
>>> mailboxes of domain.com for non-migrated accounts are at
>>> mail1.domain.com? Maybe using a transport table?
>>>
>>>
>>> Thanks in advance for your time.

>> I've tried something like this:
>>
>> ----------------------------------------------------------------
>> [hidden email] smtp:mail1.domain.com:25
>> ----------------------------------------------------------------
>>
>> and adding:
>>
>> ----------------------------------------------------------------
>> transport_maps = hash:/etc/postfix/transport
>> ----------------------------------------------------------------
>>
>> But I'm still getting the "Recipient address rejected: User unknown in
>> virtual alias table" message.

> Instead of removing the user from virtual_alias_maps, replace it with
> a 1:1 mapping:
>
> [hidden email] [hidden email]

I was able to resolve it by commenting the "virtual_alias_domains" line
on /etc/postfix/main.cf. On that way users who are not in
/etc/postfix/virtual are sent via relayhost. What do you think? Anyway
maybe your solution is better because in the end all users will have to
be in /etc/postfix/virtual :)

Thank you for your time and interest. Much appreciated.

Kind regards,
Daniel


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Delivery to accounts of the same domain on two different servers

Daniel Bareiro
Hi again, Wietse.

On 06/06/17 18:27, Daniel wrote:

>>>> I am gradually migrating the accounts of a server (let's say
>>>> mail1.domain.com) to another server (let's say mail2.domain.com).
>>>>
>>>> In mail2.domain.com I'm using something like this:
>>>>
>>>> ----------------------------------------------------------------
>>>> virtual_alias_domains = domain.com
>>>> virtual_alias_maps = hash:/etc/postfix/virtual
>>>> ----------------------------------------------------------------
>>>>
>>>> Where /etc/postfix/virtual has something like this:
>>>>
>>>> ----------------------------------------------------------------
>>>> [hidden email]       john
>>>> ----------------------------------------------------------------
>>>>
>>>> John is a SASL user (fortunately I was able to get this to work. I will
>>>> soon respond to my other thread indicating what the problem was).
>>>> Delivery on this way is working. The current MX is mail1.domain.com and
>>>> mail2.domain.com is receiving emails via fetchmail.
>>>>
>>>> The issue arises when a mailbox migrated to be used from
>>>> mail2.domain.com wants to send an email to a non-migrated mailbox. I get
>>>> something like this:
>>>>
>>>> ----------------------------------------------------------------
>>>> An error occurred while sending mail. The mail server responded:
>>>> 5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
>>>> virtual alias table.
>>>>  Please check the message recipient "[hidden email]" and try again.
>>>> ----------------------------------------------------------------
>>>>
>>>> Is there a way to get Postfix at mail2.domain.com knows that the
>>>> mailboxes of domain.com for non-migrated accounts are at
>>>> mail1.domain.com? Maybe using a transport table?
>>>>
>>>>
>>>> Thanks in advance for your time.

>>> I've tried something like this:
>>>
>>> ----------------------------------------------------------------
>>> [hidden email] smtp:mail1.domain.com:25
>>> ----------------------------------------------------------------
>>>
>>> and adding:
>>>
>>> ----------------------------------------------------------------
>>> transport_maps = hash:/etc/postfix/transport
>>> ----------------------------------------------------------------
>>>
>>> But I'm still getting the "Recipient address rejected: User unknown in
>>> virtual alias table" message.

>> Instead of removing the user from virtual_alias_maps, replace it with
>> a 1:1 mapping:
>>
>> [hidden email] [hidden email]

> I was able to resolve it by commenting the "virtual_alias_domains" line
> on /etc/postfix/main.cf. On that way users who are not in
> /etc/postfix/virtual are sent via relayhost. What do you think? Anyway
> maybe your solution is better because in the end all users will have to
> be in /etc/postfix/virtual :)
>
> Thank you for your time and interest. Much appreciated.

I've tried your suggestion by adding on /etc/postfix/virtual those users
that have not been migrated using the syntax you indicated and leaving
without commenting the line with 'virtual_alias_domains'. Unfortunately
this has not worked.

Now, when I try to do the sending, instead of getting the error in a
Thunderbird window, I get a bounce message saying something like:

--------------------------------------------------------------------
This is the mail system at host mail2.domain.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<[hidden email]>: User unknown in virtual alias table

--------------------------------------------------------------------

And this in /var/log/mail.log:

--------------------------------------------------------------------
Jun  6 21:10:41 mail2 postfix/error[3634]: 59B32100A50B:
to=<[hidden email]>, relay=none, delay=0.04, delays=0.02/0.01/0/0.02,
dsn=5.1.1, status=bounced (User unknown in virtual alias table)
--------------------------------------------------------------------

Maybe I'm missing something?

As I mentioned in a previous message, commenting in main.cf the line of
'virtual_alias_domains' and leaving /etc/postfix/virtual containing only
migrated accounts, I can send email to non-migrated accounts through
relayhost. Although it would be nice to know why it did not work what
you had suggested.


Thanks in advance.

Kind regards,
Daniel


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Delivery to accounts of the same domain on two different servers

Bill Cole-3
In reply to this post by Daniel Bareiro
On 6 Jun 2017, at 17:27, Daniel wrote:

>> Checking application/pgp-signature: FAILURE
>
> Here the signature is validated correctly with Thunderbird and Mutt.
> Maybe the client does not have the public key (ID 14E61D37) and so was
> not able to validate the signature?

That key (long ID 6696BF1B14E61D37) as it exists on public keyservers is
not valid for the address you are using here: [hidden email]

Loading...