This is a discussion on Re: how to create a CATCHALL Alias? within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Thursday, November 11, 2004 at 14:21 CET, Danilo - NetworkBrasil <danilo@networkbrazil.com.br> wrote: > I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Thursday, November 11, 2004 at 14:21 CET,
Danilo - NetworkBrasil <danilo@networkbrazil.com.br> wrote: > I have a postfix + mysql solution here.. >=20 > This is the structure of my ALIAS table on Mysql: >=20 > mysql> desc alias; > +-------------+--------------+------+-----+---------------------+------= -+ > | Field | Type | Null | Key | Default | Extra= | > +-------------+--------------+------+-----+---------------------+------= -+ > | address | varchar(255) | | PRI | | = | > | goto | text | | | | = | > | domain | varchar(255) | | | | = | > | create_date | datetime | | | 0000-00-00 00:00:00 | = | > | change_date | datetime | | | 0000-00-00 00:00:00 | = | > | active | tinyint(4) | | | 1 | = | > +-------------+--------------+------+-----+---------------------+------= -+ > 6 rows in set (0.00 sec) Whatever. Don't think in terms of MySQL tables. That's not how Postfix works. Translating the abstract solution to an SQL query is the last thing you need to do. > I'm trying to create an alias to delivery mail to all users. Okay, but that's not a catch-all alias. > How can i accomplish this? >=20 > I tried to put this on table alias: >=20 > Address =3D catchall@domain.com > Goto =3D @domain.com > Domain =3D domain.com >=20 > But, it didn't worked as well virtual(5) contains information about how virtual alias lookups work. Postfix has no built-in support for sending a message to all users. You have to construct a query that for a certain input returns all addresses. Unless you want to maintain such an alias, the query below would work. It returns all rows if the lookup key equals the desired alias, and returns zero rows otherwise. SELECT address FROM alias_table WHERE 'allusers@example.com' =3D '%s' --=20 Magnus B=E4ck magnus@dsek.lth.se |