Loading ...
Sorry, an error occurred while loading the content.

Re: Forwards with MySQL

Expand Messages
  • mouss
    ... why do you add otherdomain.com to your alias_domains table if you want mail to go to their MX? ... yes, there is a way. don t put it in the table:) ...
    Message 1 of 11 , Sep 1, 2006
    • 0 Attachment
      Alvaro MarĂ­n wrote:
      > Hi,
      >
      > I've configured Postfix to use MySQL tables with alias or forwardings:
      >
      > virtual_alias_domains=mysql:/etc/postfix/mysql-virtual_domains.cf
      >
      > virtual_alias_maps=mysql:/etc/postfix/mysql-virtual_aliases.cf
      >
      > where alias_domains table has for example:
      >
      > "domain.com"
      >
      > and the alias_maps table:
      >
      > "oneuser","domain.com","otheruser@..."
      >
      > 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.
      >
      why do you add otherdomain.com to your alias_domains table if you want
      mail to go to their MX?
      > Is there any way to send directly the message to the "otherdomain.com"'s
      > MX without searching on the table again?
      >
      yes, there is a way. don't put it in the table:)
      > Other thing that I want to ask is that if the alias_maps table has only
      > 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?
      >

      what doesn't work? anyway, "wildcard" aliases (@... =>
      $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).
    Your message has been successfully submitted and would be delivered to recipients shortly.