Re: Per User Relay to From Old to New Postfix
The following uses two transport maps and no changes in relay_recipient_maps: Assuming that both machines will accept mail for every user@the-domain-in-question: - One transport map on the new machine, that sends mail for non-migrated user@the-domain-in-question to the old machine. - One transport map on the old machine, that sends mail for migrated user@the-domain-in-question to the new machine. To migrate a user, delete her from the transport map on the new machine before adding her to the transport map on the old machine, otherwise mail will loop. Wietse Thank you, Wietse, In testing this, on the old server I have my transport_maps directive pointing to a mysql table, with the following query and table: /SELECT nexthop FROM transport_map WHERE user = '%u'/ /transport_map table below:/ user nexthop u...@test.com smtp:[10.10.10.199] However, this doesn't seem to be doing anything. Sending email to the user results in delivery to the user on the old server and does not trigger a relay to the new server. I have been trying to understand what others have been saying about this on the various threads, but I'm unable to clarify in my limited understanding. What am I missing here?
Re: Per User Relay to From Old to New Postfix
Asai: > Greetings, > > Our organization is deploying a new upgraded Postfix server and we're > looking for various options to migrate users from the old to the new.? > One possibility, we hope, is to do it on a per user basis rather than > doing it all at once for a whole domain (which is also viable, but seems > to result in more downtime for users until IT staff can make their > rounds to their computers).? I have done some reading of documentation, > but I'm not clear on whether using relay_recipient_maps is an option, or > perhaps the transport_maps directive. > > So, is this possible in Postfix, to relay email from the old to the new > Postfix server on a per user basis, if so, what are some good options? The following uses two transport maps and no changes in relay_recipient_maps: Assuming that both machines will accept mail for every user@the-domain-in-question: - One transport map on the new machine, that sends mail for non-migrated user@the-domain-in-question to the old machine. - One transport map on the old machine, that sends mail for migrated user@the-domain-in-question to the new machine. To migrate a user, delete her from the transport map on the new machine before adding her to the transport map on the old machine, otherwise mail will loop. Wietse
Per User Relay to From Old to New Postfix
Greetings, Our organization is deploying a new upgraded Postfix server and we're looking for various options to migrate users from the old to the new. One possibility, we hope, is to do it on a per user basis rather than doing it all at once for a whole domain (which is also viable, but seems to result in more downtime for users until IT staff can make their rounds to their computers). I have done some reading of documentation, but I'm not clear on whether using relay_recipient_maps is an option, or perhaps the transport_maps directive. So, is this possible in Postfix, to relay email from the old to the new Postfix server on a per user basis, if so, what are some good options? Thank you, Asai
Re: How to hold a specific recipient
On 10/16/2019 4:48 PM, (lists) Denis BUCHER wrote: Hello everyone, I read a lot of emails on this ML and on the web without finding the solution, or I do something wrong. I just want that all emails to a specific recipient are put on hold. I thought this would work, but it doesn't : * main.cf : o smtpd_relay_restrictions = check_recipient_access hash:/etc/postfix/recipient_access permit_mynetworks permit_sasl_authenticated defer_unauth_destination * /etc/postfix/recipient_access : o em...@domain.ch HOLD * postmap /etc/postfix/recipient_access Thanks in advance a lot for any hint or help ! Denis That's (mostly) correct, although it should really be in smtpd_recipient_restrictions. Some random thoughts: Mail must arrive via SMTP for the smtpd restrictions to work. Mail arriving via postdrop or the "sendmail command" do no use smtpd restrictions. The smtp restrictions work on the envelope recipient address, which may not be the same as displayed in the To: header. The envelope recipient is what postfix shows in the logs. Mail that is rejected is not placed on hold. non-ascii garbage in main.cf or the access map can cause unexpected behavior. be sure to run "postmap hash:/etc/postfix/recipient_access" and "postfix reload" after editing main.cf. For further assistance, show your "postconf -nf" and log lines showing the mail you're trying to hold. -- Noel Jones
How to hold a specific recipient
Hello everyone, I read a lot of emails on this ML and on the web without finding the solution, or I do something wrong. I just want that all emails to a specific recipient are put on hold. I thought this would work, but it doesn't : * main.cf : o smtpd_relay_restrictions = check_recipient_access hash:/etc/postfix/recipient_access permit_mynetworks permit_sasl_authenticated defer_unauth_destination * /etc/postfix/recipient_access : o em...@domain.ch HOLD * postmap /etc/postfix/recipient_access Thanks in advance a lot for any hint or help ! Denis