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: >>>> >>>> ---------------------------------------------------------------- >>>> j...@domain.com 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 <nat...@domain.com>: Recipient address rejected: User unknown in >>>> virtual alias table. >>>> Please check the message recipient "nat...@domain.com" 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: >>> >>> ---------------------------------------------------------------- >>> nat...@domain.com 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: >> >> nat...@domain.com nat...@domain.com > 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 <nat...@domain.com>: User unknown in virtual alias table -------------------------------------------------------------------- And this in /var/log/mail.log: -------------------------------------------------------------------- Jun 6 21:10:41 mail2 postfix/error[3634]: 59B32100A50B: to=<nat...@domain.com>, 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
Description: OpenPGP digital signature