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

Re: email address (user@domain.tld) as username?

Expand Messages
  • Viktor Dukhovni
    ... Generally, with dovecot delivery to local files, the destination domain should be a virtual mailbox domain, not a relay domain. main.cf: indexed =
    Message 1 of 16 , Sep 28 8:47 AM
    • 0 Attachment
      On Sat, Sep 28, 2013 at 12:47:22PM +0200, Peer Heinlein wrote:

      > Am 27.09.2013 15:07, schrieb Harald Koch:
      >
      > > It took me about 1/2 day to set up MySQL-based virtual users, complete
      > > with mail delivery, SMTP auth, and IMAP/POP auth (this is why I went the
      >
      > Use dovecot with a simple passwd-file-setup in /etc/dovecot/userdb and a
      > simple relay-domains setup in Postfix and you'll be ready after half an
      > hour.

      Generally, with dovecot delivery to local files, the destination domain
      should be a virtual mailbox domain, not a relay domain.

      main.cf:
      indexed = ${default_database_type}:${config_directory}/
      virtual_mailbox_domain = example.com
      virtual_transport = dovecot
      virtual_mailbox_maps = ${indexed}vmbox

      vmbox:
      # When the virtual transport is not virtual(8), the LHS of
      # virtual_mailbox_maps is used only for address validation,
      # and the RHS is ignored, but must be some non-empty string
      #
      user@... ACCEPT
      ...

      If the virtual users are stored in some database accessible to both
      Dovecot and Postfix, use the approrpriate table driver instead of
      the above table.

      --
      Viktor.
    • Stefan Foerster
      ... Can you explain the main differences with those two setups? Whether the domain that is served by dovecot is in virtual_mailbox_domains or relay_domains
      Message 2 of 16 , Oct 1, 2013
      • 0 Attachment
        * Viktor Dukhovni <postfix-users@...>:
        > On Sat, Sep 28, 2013 at 12:47:22PM +0200, Peer Heinlein wrote:
        > > Use dovecot with a simple passwd-file-setup in /etc/dovecot/userdb and a
        > > simple relay-domains setup in Postfix and you'll be ready after half an
        > > hour.
        >
        > Generally, with dovecot delivery to local files, the destination domain
        > should be a virtual mailbox domain, not a relay domain.

        Can you explain the main differences with those two setups? Whether
        the domain that is served by dovecot is in virtual_mailbox_domains or
        relay_domains doesn't seem to make much of a difference.

        virtual_mailbox_domains = example.com
        virtual_mailbox_maps = ${map}vmbox
        virtual_transport = dovecot

        relay_domains = example.com
        relay_recipient_maps = ${map}vmbox
        transport_maps = ${map}/foo
        # and there: "example.com dovecot:" or
        # "example.com lmtp:..."

        Granted, when LMTP delivery is used, the second setup makes it easier
        to use dynamic recipient verification, but apart from that, with maps
        available for Postfix... what's the difference? Both solutions seem
        pretty equivalent to me.


        Stefan
      • Wietse Venema
        ... mydestination, virtual_mailbox_domains are preferred for final delivery. Here. Postfix is the final MTA. Example: postfix- dovecot. relay_domains is
        Message 3 of 16 , Oct 2, 2013
        • 0 Attachment
          Stefan Foerster:
          > * Viktor Dukhovni <postfix-users@...>:
          > > On Sat, Sep 28, 2013 at 12:47:22PM +0200, Peer Heinlein wrote:
          > > > Use dovecot with a simple passwd-file-setup in /etc/dovecot/userdb and a
          > > > simple relay-domains setup in Postfix and you'll be ready after half an
          > > > hour.
          > >
          > > Generally, with dovecot delivery to local files, the destination domain
          > > should be a virtual mailbox domain, not a relay domain.
          >
          > Can you explain the main differences with those two setups? Whether
          > the domain that is served by dovecot is in virtual_mailbox_domains or
          > relay_domains doesn't seem to make much of a difference.

          mydestination, virtual_mailbox_domains are preferred for final
          delivery. Here. Postfix is the final MTA. Example: postfix->dovecot.

          relay_domains is preferred for transit mail. Here, Postfix is not
          the final MTA. Example: postfix->exchange.

          Under the covers it is all bits and you can hook up Dovecot or Exchange
          in any address class, virtual, relay, whatever.

          Wietse
        • Viktor Dukhovni
          ... Others will *understand* your configuration. When you need actual relay domains in the future, there ll be a sensible address class to add them to that is
          Message 4 of 16 , Oct 2, 2013
          • 0 Attachment
            On Wed, Oct 02, 2013 at 08:25:48AM +0200, Stefan Foerster wrote:

            > * Viktor Dukhovni <postfix-users@...>:
            > > On Sat, Sep 28, 2013 at 12:47:22PM +0200, Peer Heinlein wrote:
            > > > Use dovecot with a simple passwd-file-setup in /etc/dovecot/userdb and a
            > > > simple relay-domains setup in Postfix and you'll be ready after half an
            > > > hour.
            > >
            > > Generally, with dovecot delivery to local files, the destination domain
            > > should be a virtual mailbox domain, not a relay domain.
            >
            > Can you explain the main differences with those two setups? Whether
            > the domain that is served by dovecot is in virtual_mailbox_domains or
            > relay_domains doesn't seem to make much of a difference.

            Others will *understand* your configuration. When you need actual
            relay domains in the future, there'll be a sensible address class
            to add them to that is not already overloaded for an unrelated
            purpose.

            > virtual_mailbox_domains = example.com
            > virtual_mailbox_maps = ${map}vmbox
            > virtual_transport = dovecot

            This is cleaner, no need for a transport entry for each domain.

            > relay_domains = example.com
            > relay_recipient_maps = ${map}vmbox
            > transport_maps = ${map}/foo
            > # and there: "example.com dovecot:" or
            > # "example.com lmtp:..."
            >
            > Granted, when LMTP delivery is used, the second setup makes it easier
            > to use dynamic recipient verification, but apart from that, with maps
            > available for Postfix... what's the difference? Both solutions seem
            > pretty equivalent to me.

            Even with LMTP delivery, I'd use virtual mailbox domains, an LMTP
            delivery is not an SMTP relay hop. You can do dynamic recipient
            verification with either address class.

            --
            Viktor.
          Your message has been successfully submitted and would be delivered to recipients shortly.