Re: unexpected delivery location
For the archives: On 23-8-2017 21:56, Noel wrote: Perhaps you can adjust your query or your database to return the desired result. Otherwise, use your scripting skills to generate a file, then automate the procedure. I ended up creating a file /etc/postfix/olddomain with this contents: /^([^@]*)@olddomain.com/ $(1)@newdomain.com and reference that in main.cf like: virtual_alias_maps = regexp:/etc/postfix/olddomain That seems to to the job nicely: Emails for exist...@olddomain.com are delivered to exist...@newdomain.com, and mails sent to nonexist...@olddomain.com receive DSN Undelivered Mail Returned to Sender, with: (expanded from ): user unknown Perfect. :-)
Re: unexpected delivery location
Hi, On 08/23/2017 09:56 PM, Noel wrote: Perhaps you can adjust your query or your database to return the desired result. Otherwise, use your scripting skills to generate a file, then automate the procedure. Thanks for the suggestion, I try something like that. Still feel that some simple config to make one domain an alias to another domain would be very useful. :-) MJ
Re: unexpected delivery location
On 8/23/2017 2:53 PM, mj wrote: > > On 08/23/2017 06:03 PM, Noel wrote: >> Don't use wildcard aliases. They break recipient validation and >> cause postfix to accept all addresses. >> >> Instead use 1-1 aliases, such as >> user1@olddomaon user1@newdomain >> user2@olddomaon user2@newdomain > > But we have 500+ addresses in ldap, surely there must be some > 'automated' way to 'transform' any incoming mail sent to > ran...@olddomain.com into ran...@newdomain.com? > > (and then have it processed regularly, so that bounces still work > for non-existant addresses and such) > > MJ Perhaps you can adjust your query or your database to return the desired result. Otherwise, use your scripting skills to generate a file, then automate the procedure. -- Noel Jones
Re: unexpected delivery location
Hi Noël, Thanks for your response! On 08/23/2017 06:03 PM, Noel wrote: Don't use wildcard aliases. They break recipient validation and cause postfix to accept all addresses. Instead use 1-1 aliases, such as user1@olddomaon user1@newdomain user2@olddomaon user2@newdomain But we have 500+ addresses in ldap, surely there must be some 'automated' way to 'transform' any incoming mail sent to ran...@olddomain.com into ran...@newdomain.com? (and then have it processed regularly, so that bounces still work for non-existant addresses and such) MJ
Re: unexpected delivery location
On 8/23/2017 4:30 AM, lists wrote: > Hi, > > Not sure what the lack of replies means... As postfix is also > involved, should I better ask there? > > It seems a little bit in between postfix and dovecot... > > Just to clearify one thing I wrote: > > On 22-8-2017 16:23, lists wrote: >> We're running dovecot 2.2.13, virtual users, with postfix. We >> have an olddomain and a new domainname. To 'translate' >> *@olddomain into > > With "translate" I mean that olddomain should be treated as if it > were newdomain. No translation, but more like an alias. > > MJ Don't use wildcard aliases. They break recipient validation and cause postfix to accept all addresses. Instead use 1-1 aliases, such as user1@olddomaon user1@newdomain user2@olddomaon user2@newdomain user3@olddomaon user3@newdomain ... -- Noel Jones
Re: unexpected delivery location
Hi, Not sure what the lack of replies means... As postfix is also involved, should I better ask there? It seems a little bit in between postfix and dovecot... Just to clearify one thing I wrote: On 22-8-2017 16:23, lists wrote: We're running dovecot 2.2.13, virtual users, with postfix. We have an olddomain and a new domainname. To 'translate' *@olddomain into With "translate" I mean that olddomain should be treated as if it were newdomain. No translation, but more like an alias. MJ