Re: Forwards with MySQL
- Alvaro Marín wrote:
> Kai Fürstenberg wrote:You can also set permissions on single tables in a complete database. So
>> Then I have a suggestion. Extend your domains table by an additional
>> column "active" (Boolean). Then add an additional where clause to your
>> WHERE active=1. Set active state of gmail to 0, the others to 1.
>> This will prevent the addition of gmail com to your virtual domains and
>> postfix does not recognise this as virtual domain, because of active
>> state 0.
>> This will also solve the transport problem.
> Umm...I'll try it...good idea :)
>> But why don't you just secure your database, that no one else has access
>> to it? Then just leave away gmail.com. That would be much easier.
> The database will be accessed (via PHP) by more people than me...but
> I've been thinking that perhaps putting a restriction in PHP to don't
> let insert domains with the MX record different that the machine.
you can set access rights for your users for the complete database
except the domains table, where only you have access to.
- Alvaro Mar?n:
> Kai F_rstenberg wrote:DO NOT list gmail.com in your own domain tables!! Mail will
> > You can use transport_maps. Forward otheruser@... via smtp
> > to the other MX. Anyhow you should/must add this user to the table:
> > "otheruser","otherdomain.com","otheruser@...". Postfix
> > always looks in the table but the alias mapping is the same. It then can
> > take the transport_maps to forward the message to a different server.
> I've tried with that (configuring transport table too):
> mysql> select * from email_domains;
> | domain |
> | gmail.com |
> | pruebas.domain.com |
bounce with "user unknown in virtual alias table".
- Wietse Venema wrote:
> DO NOT list gmail.com in your own domain tables!! Mail willYes, I know it, that is what I want to avoid :)
> bounce with "user unknown in virtual alias table".
- Alvaro Marín wrote:
> Hi,why do you add otherdomain.com to your alias_domains table if you want
> I've configured Postfix to use MySQL tables with alias or forwardings:
> where alias_domains table has for example:
> and the alias_maps table:
> This example runs fine, but if for example I add "otherdomain.com" to
> alias_domains table, it search for the user "otheruser" in MySQL table
> (logically) instead of send the mail to the MX.
mail to go to their MX?
> Is there any way to send directly the message to the "otherdomain.com"'syes, there is a way. don't put it in the table:)
> MX without searching on the table again?
> Other thing that I want to ask is that if the alias_maps table has onlywhat doesn't work? anyway, "wildcard" aliases (@... =>
> 2 fields (alias and destination) I can use for example:
> @... -> ouser@...
> to forward all the accounts from @domain to other account, but if I
> create that table with 3 fields (alias_user, alias_domain and
> destination) this doesn't work...any idea?
$destination) break recipient validation. don't return them. since
you're using mysql, you can do a lot of things. just say what you _want
to accomplish_ (not what you tried).