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

Custom maildir from Qmail to Postfix plan.

Expand Messages
  • Matteo Niccoli
    Hi, Suppose to have 1.000.000 maildir mailboxes using this path: /MAIL/$1/$2/$3/$4/$5/$address.$domain/folders/Maildir/ where $1 is the first letter of the
    Message 1 of 7 , Sep 24, 2008
    • 0 Attachment
      Hi,

      Suppose to have 1.000.000 maildir mailboxes using this
      path:

      /MAIL/$1/$2/$3/$4/$5/$address.$domain/folders/Maildir/

      where $1 is the first letter of the recipient, $2 is the
      second, and so on. Like this example:

      foobar@...

      /MAIL/f/o/o/b/a/foobar.antani/folders/Maildir/

      If we have an address with length less of 5 characters,
      we shift the domain on the left:

      foo@...

      /MAIL/f/o/o/a/n/foo.antani/folders/Maildir/

      In /folders/ dir we have also .qmail files.

      Actually we use a patched version of Qmail to deliver
      email to this mailboxes, but my boss ask me to write a
      migration plan from Qmail to Postfix.

      How to fix this using postfix? We need to patch source
      code like Qmail, o we can solve it using some workaround
      or smart configuration?

      Thanks! Bye.
    • Wietse Venema
      Matteo Niccoli: [ Charset ISO-8859-15 unsupported, converting... ] ... Look at the virtual(8) delivery agent. It uses lookup tables to map a recipient to a
      Message 2 of 7 , Sep 24, 2008
      • 0 Attachment
        Matteo Niccoli:
        [ Charset ISO-8859-15 unsupported, converting... ]
        > Hi,
        >
        > Suppose to have 1.000.000 maildir mailboxes using this
        > path:
        >
        > /MAIL/$1/$2/$3/$4/$5/$address.$domain/folders/Maildir/
        >
        > where $1 is the first letter of the recipient, $2 is the
        > second, and so on. Like this example:
        >
        > foobar@...
        >
        > /MAIL/f/o/o/b/a/foobar.antani/folders/Maildir/
        >
        > If we have an address with length less of 5 characters,
        > we shift the domain on the left:
        >
        > foo@...
        >
        > /MAIL/f/o/o/a/n/foo.antani/folders/Maildir/
        >
        > In /folders/ dir we have also .qmail files.
        >
        > Actually we use a patched version of Qmail to deliver
        > email to this mailboxes, but my boss ask me to write a
        > migration plan from Qmail to Postfix.
        >
        > How to fix this using postfix? We need to patch source
        > code like Qmail, o we can solve it using some workaround
        > or smart configuration?

        Look at the virtual(8) delivery agent. It uses lookup tables
        to map a recipient to a pathname, and to look up the UID/GID
        information. Such tables can be generated programmatically.

        http://www.postfix.org/virtual.8.html
        http://www.postfix.org/VIRTUAL_README.html

        Wietse
      • Ralf Hildebrandt
        ... Or look at dovecot s deliver, since your users probably want to access this data as well. dovecot s deliver is indexing the mailboxes on delivery, thus
        Message 3 of 7 , Sep 24, 2008
        • 0 Attachment
          * Wietse Venema <wietse@...>:

          > Look at the virtual(8) delivery agent. It uses lookup tables
          > to map a recipient to a pathname, and to look up the UID/GID
          > information. Such tables can be generated programmatically.
          >
          > http://www.postfix.org/virtual.8.html
          > http://www.postfix.org/VIRTUAL_README.html

          Or look at dovecot's deliver, since your users probably want to access
          this data as well. dovecot's deliver is indexing the mailboxes on
          delivery, thus making mailbox polling really cheap.

          --
          Ralf Hildebrandt (Ralf.Hildebrandt@...) snickebo@...
          Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
          http://www.arschkrebs.de I'm looking for a job
          "Plonk /excl./: The sound a newbie makes as he falls to the bottom of a
          kill file." - From the Jargon File.
        • mouss
          ... use dovecot or maildrop to deliver mail.
          Message 4 of 7 , Sep 24, 2008
          • 0 Attachment
            Matteo Niccoli wrote:
            > Hi,
            >
            > Suppose to have 1.000.000 maildir mailboxes using this
            > path:
            >
            > /MAIL/$1/$2/$3/$4/$5/$address.$domain/folders/Maildir/
            >
            > where $1 is the first letter of the recipient, $2 is the
            > second, and so on. Like this example:
            >
            > foobar@...
            >
            > /MAIL/f/o/o/b/a/foobar.antani/folders/Maildir/
            >
            > If we have an address with length less of 5 characters,
            > we shift the domain on the left:
            >
            > foo@...
            >
            > /MAIL/f/o/o/a/n/foo.antani/folders/Maildir/
            >
            > In /folders/ dir we have also .qmail files.
            >
            > Actually we use a patched version of Qmail to deliver
            > email to this mailboxes, but my boss ask me to write a
            > migration plan from Qmail to Postfix.
            >
            > How to fix this using postfix? We need to patch source
            > code like Qmail, o we can solve it using some workaround
            > or smart configuration?
            >

            use dovecot or maildrop to deliver mail.
          • Matteo Niccoli
            ... So is not possible attach a simple script that receive as stdin the email address, return on stdout the mailbox pathname, so the virtual deliver agent
            Message 5 of 7 , Sep 25, 2008
            • 0 Attachment
              Wietse Venema ha scritto:
              > Look at the virtual(8) delivery agent. It uses lookup tables
              > to map a recipient to a pathname, and to look up the UID/GID
              > information. Such tables can be generated programmatically.
              >
              > http://www.postfix.org/virtual.8.html
              > http://www.postfix.org/VIRTUAL_README.html

              So is not possible attach a simple script that receive as stdin
              the email address, return on stdout the mailbox pathname, so
              the virtual deliver agent write on that path? I have to generate
              these tables with cron or something else? I'm worried about
              number of active mailboxes I'm running now.
            • Victor Duchovni
              ... The virtual(8) delivery table uses lookup tables to find the mailbox location. Postfix lookup tables include: - Indexed files, e.g. Berkeley DB hash/btree
              Message 6 of 7 , Sep 25, 2008
              • 0 Attachment
                On Thu, Sep 25, 2008 at 03:06:10PM +0200, Matteo Niccoli wrote:

                > Wietse Venema ha scritto:
                > >Look at the virtual(8) delivery agent. It uses lookup tables
                > >to map a recipient to a pathname, and to look up the UID/GID
                > >information. Such tables can be generated programmatically.
                > >
                > >http://www.postfix.org/virtual.8.html
                > >http://www.postfix.org/VIRTUAL_README.html
                >
                > So is not possible attach a simple script that receive as stdin
                > the email address, return on stdout the mailbox pathname, so
                > the virtual deliver agent write on that path?

                The virtual(8) delivery table uses lookup tables to find the mailbox
                location.

                Postfix lookup tables include:

                - Indexed files, e.g. Berkeley DB hash/btree or CDB.
                - LDAP
                - MySQL, PgSQL
                - additional tables reported by "postconf -m".

                If you use a non-Postifx "VDA", such as "maildrop" (or dovecot's delivery
                agent) or deliver via LMTP, the external code may support additional
                lookup mechanisms.

                A table mechanism is much more efficient than (multiple for shell scripts)
                fork/exec for every lookup.

                --
                Viktor.

                Disclaimer: off-list followups get on-list replies or get ignored.
                Please do not ignore the "Reply-To" header.

                To unsubscribe from the postfix-users list, visit
                http://www.postfix.org/lists.html or click the link below:
                <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                If my response solves your problem, the best way to thank me is to not
                send an "it worked, thanks" follow-up. If you must respond, please put
                "It worked, thanks" in the "Subject" so I can delete these quickly.
              • Wietse Venema
                ... You could fork-and-exec a postmap command to query the databases and read stdout from that command, but that would be inefficient. Wietse
                Message 7 of 7 , Sep 25, 2008
                • 0 Attachment
                  Matteo Niccoli:
                  > Wietse Venema ha scritto:
                  > > Look at the virtual(8) delivery agent. It uses lookup tables
                  > > to map a recipient to a pathname, and to look up the UID/GID
                  > > information. Such tables can be generated programmatically.
                  > >
                  > > http://www.postfix.org/virtual.8.html
                  > > http://www.postfix.org/VIRTUAL_README.html
                  >
                  > So is not possible attach a simple script that receive as stdin
                  > the email address, return on stdout the mailbox pathname, so
                  > the virtual deliver agent write on that path? I have to generate
                  > these tables with cron or something else? I'm worried about
                  > number of active mailboxes I'm running now.

                  You could fork-and-exec a "postmap" command to query the databases
                  and read stdout from that command, but that would be inefficient.

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