[pfx] Re: Aliases with "@" in it
Op 09-04-2024 om 12:57 schreef Matus UHLAR - fantomas via Postfix-users: virtual_alias_maps and alias_maps have slightly different capabilities virtual_alias_maps - is processed when mail is being received - can be used to rewrite ANY destination mail address (including non-local recipients) - can be (usually is) used at SMTP level to validate recipients alias_maps - is used when delivering mail to local recipients - can include recipients from file - can feed mail to a program or a file - can change mail sender when "alias" is the recipient and "owner-alias" exists Preferrably use virtual_alias_maps, but if you need any of alias_maps features, use that one. Thanks for your explanation! With regards, Paul -- Paul van der Vlis Linux systeembeheer Groningen https://vandervlis.nl/ ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Aliases with "@" in it
Dnia 9.04.2024 o godz. 11:11:31 Paul van der Vlis via Postfix-users pisze: When I want to make an alias, I try this in /etc/aliases: "al...@domain.nl": j...@domain.nl But when I sent mail, I get a bounce with "user unknown". When I do this in /etc/aliases: alias: j...@domain.nl This works fine, but for all domains on this server. And that's not what I want. Do you know a way how to use aliases with an @ in it? Op 09-04-2024 om 11:46 schreef Jaroslaw Rafa via Postfix-users: You can't do it alias_maps= table (which by default points to /etc/aliases file). You should use virtual_alias_maps= table in main.cf file and define the aliases there. On 09.04.24 12:04, Paul van der Vlis via Postfix-users wrote: Thanks, it works. I thought I would not need this file anymore. virtual_alias_maps and alias_maps have slightly different capabilities virtual_alias_maps - is processed when mail is being received - can be used to rewrite ANY destination mail address (including non-local recipients) - can be (usually is) used at SMTP level to validate recipients alias_maps - is used when delivering mail to local recipients - can include recipients from file - can feed mail to a program or a file - can change mail sender when "alias" is the recipient and "owner-alias" exists Preferrably use virtual_alias_maps, but if you need any of alias_maps features, use that one. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. I feel like I'm diagonally parked in a parallel universe. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Aliases with "@" in it
Op 09-04-2024 om 11:46 schreef Jaroslaw Rafa via Postfix-users: Dnia 9.04.2024 o godz. 11:11:31 Paul van der Vlis via Postfix-users pisze: When I want to make an alias, I try this in /etc/aliases: "al...@domain.nl": j...@domain.nl But when I sent mail, I get a bounce with "user unknown". When I do this in /etc/aliases: alias: j...@domain.nl This works fine, but for all domains on this server. And that's not what I want. Do you know a way how to use aliases with an @ in it? You can't do it alias_maps= table (which by default points to /etc/aliases file). You should use virtual_alias_maps= table in main.cf file and define the aliases there. Thanks, it works. I thought I would not need this file anymore. Bye, Paul -- Paul van der Vlis Linux systeembeheer Groningen https://vandervlis.nl/ ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Aliases with "@" in it
Dnia 9.04.2024 o godz. 11:11:31 Paul van der Vlis via Postfix-users pisze: > When I want to make an alias, I try this in /etc/aliases: > "al...@domain.nl": j...@domain.nl > But when I sent mail, I get a bounce with "user unknown". > > When I do this in /etc/aliases: > alias: j...@domain.nl > This works fine, but for all domains on this server. And that's not > what I want. > > Do you know a way how to use aliases with an @ in it? You can't do it alias_maps= table (which by default points to /etc/aliases file). You should use virtual_alias_maps= table in main.cf file and define the aliases there. -- Regards, Jaroslaw Rafa r...@rafa.eu.org -- "In a million years, when kids go to school, they're gonna know: once there was a Hushpuppy, and she lived with her daddy in the Bathtub." ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: aliases for mailbox domain
On Tue, Apr 11, 2023 at 12:49:18AM +0800, tom--- via Postfix-users wrote: > > You can create virtual(5) aliases for any address you want, with > > any syntactically valid rewrite target(s) of your choice. > > > > Neither the LHS nor the RHS addresses need be in domains under your > > control. The virtual(5) alias table rewrites **all** recipient > > addresses. > > Thank you. So what’s the usage of virtual alias domains? Have you read: https://www.postfix.org/ADDRESS_CLASS_README.html The virtual alias domain class. Purpose: hosted domains where each recipient address is aliased to an address in a different domain, for example, a local UNIX system account or a remote address. A virtual alias example is given in the VIRTUAL_README file. Domain names are listed in virtual_alias_domains. The default value is $virtual_alias_maps for Postfix 1.1 compatibility. Valid recipient addresses are listed with the virtual_alias_maps parameter. The Postfix SMTP server rejects invalid recipients with "User unknown in virtual alias table". The default value is $virtual_maps for Postfix 1.1 compatibility. There is no mail delivery transport parameter. Every address must be aliased to an address in some other domain. Which also links to: https://www.postfix.org/VIRTUAL_README.html#canonical Perhaps implicit in the above references is that Postfix accepts incoming mail for (valid) recipients in virtual_alias_domains, even when the client is not listed in mynetworks or SASL authenticated, ... -- Viktor. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: aliases for mailbox domain
On 2023-04-10 23:10, Viktor Dukhovni via Postfix-users wrote: On Mon, Apr 10, 2023 at 04:19:28PM +0800, tom--- via Postfix-users wrote: And a real user t...@myposts.ovh which exists in dovecot-users table. After then, can I create aliases in virtual_alias_maps like follows? al...@myposts.ovh t...@myposts.ovh b...@myposts.ovh t...@myposts.ovh You can create virtual(5) aliases for any address you want, with any syntactically valid rewrite target(s) of your choice. Neither the LHS nor the RHS addresses need be in domains under your control. The virtual(5) alias table rewrites **all** recipient addresses. Thank you. So what’s the usage of virtual alias domains? Regards ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: aliases for mailbox domain
On Mon, Apr 10, 2023 at 04:19:28PM +0800, tom--- via Postfix-users wrote: > And a real user t...@myposts.ovh which exists in dovecot-users table. > > After then, can I create aliases in virtual_alias_maps like follows? > > al...@myposts.ovh t...@myposts.ovh > b...@myposts.ovh t...@myposts.ovh You can create virtual(5) aliases for any address you want, with any syntactically valid rewrite target(s) of your choice. Neither the LHS nor the RHS addresses need be in domains under your control. The virtual(5) alias table rewrites **all** recipient addresses. -- Viktor. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: aliases for mailbox domain
On 10.04.23 16:19, tom--- via Postfix-users wrote: Maybe I am not clear about virtual_mailbox_domains and virtual_alias_domains. Say I have this mailbox domain: myposts.ovh And a real user t...@myposts.ovh which exists in dovecot-users table. After then, can I create aliases in virtual_alias_maps like follows? al...@myposts.ovh t...@myposts.ovh b...@myposts.ovh t...@myposts.ovh you can and it should work. virtual_alias_maps is applied for every mail that comes to postfix, even for non-local domains. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. 99 percent of lawyers give the rest a bad name. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org