Re: how to create a CATCHALL Alias?

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 ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-11-2004
Magnus Bäck
 
Posts: n/a
Default Re: how to create a CATCHALL Alias?

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0