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

293235Re: virtual hosting problem

Expand Messages
  • Ansgar Wiechers
    May 18, 2013
    • 0 Attachment
      On 2013-05-18 doug@... wrote:
      > My problem is a regexp table used to fold domains that should be
      > delivered to the same mailbox stopped working. I solved the problem
      > by adding a hash table with all the extra names. This is a big
      > administrative deal (to us) as it adds several thousand emails to
      > maintain and sync as changes are made.
      >
      > This system is a postfix-cyrus running on FreeBSD 8.2
      >
      > From main.cf:
      >
      > mydestination = $myhostname, localhost.$mydomain, localhost
      > mydomain = safeport.com
      > relay_domains = $mydestination lighthouse.safeport.com mail3.safeport.com
      > allow_untrusted_routing = no
      > virtual_alias_maps = hash:/usr/local/etc/postfix/virtual
      > hash:/usr/local/etc/postfix/virtual1
      > regexp:/usr/local/etc/postfix/virtual.regexp
      > virtual_alias_domains = $virtual_alias_maps
      >
      > virtual1 is the extra table I added to make customer stuff work. I am
      > testing various solutions with our own domains.
      >
      > Sending to a safeport.us address gets:
      > 554 5.7.1 <doug@...>: Relay access denied
      >
      > virtual: doug@... doug
      > virtual.regexp: /^(.*)@safeport\.us$/ $1@...
      > MX record for safeport.us = 10 lighthouse.safeport.com
      >
      > postmap -q doug@... regexp:virtual.regexp
      > doug@...

      First and foremost: ALWAYS post the output of "postconf -n", NEVER the
      quote the contents of main.cf. Only the former is guaranteed to be your
      active configuration.

      That said, what you posted of your configuration does not list the
      domain safeport.us as either a local or a relay domain. That's most
      likely the reason why you get a "relay access denied". Change the line

      virtual_alias_domains = $virtual_alias_maps

      into this:

      virtual_alias_domains = safeport.us

      Furthermore, $mydestination is for local delivery of mail of which your
      server is the final destination. $relay_domains is for relaying mail for
      domains that your server is NOT the final destination of. Do NOT mix the
      two. Remove $mydestination from $relay_domains.

      Restart Postfix after you applied these changes.

      Regards
      Ansgar Wiechers
      --
      "All vulnerabilities deserve a public fear period prior to patches
      becoming available."
      --Jason Coombs on Bugtraq
    • Show all 4 messages in this topic