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

Local/Virtual Delivery Agent Config Question

Expand Messages
  • Kevin Wilcox
    We have an application that I need to have all incoming e-mail for a given domain, delivered to a MySQL based mailboxes. Also, none of the recipients have a
    Message 1 of 4 , Jun 30, 2006
      We have an application that I need to have all incoming e-mail for a given domain, delivered to a MySQL based mailboxes. Also, none of the recipients have a unix account/mailbox on this system, they are users of a web based service. I've been scouring the postfix documentation and procmail documentation. My application will be analogous to procmail, but I do have some questions for the more experienced users:

      1. Because the recipients don't have accounts on the system, I was not sure if I need to use postfix's LDA (local) to deliver the messages or rely on virtual(5)/virutal(8)?

      2. If I do need to use virtual, it does not support a "mailbox_command" for obvious reasons. How do I invoke our proprietary delivery agent?

      3. If this is an LDA issue, how is the actual message passed to the LDA? I know some of the information is passed via environment variables, but does the rest come in via stdin or a filename?

      I assure you I spent time researching this before I made my post. I hope this is the right group to ask. I know some of these questions border on the development side of things.

      Any help you can give me would be greatly appreciated.

      Regards,
      Kevin




    • Magnus Bäck
      On Friday, June 30, 2006 at 23:08 CEST, ... Unless the users have real accounts (i.e. accounts accessible via getpwnam(3) and friends) you must make the domain
      Message 2 of 4 , Jul 1, 2006
        On Friday, June 30, 2006 at 23:08 CEST,
        Kevin Wilcox <6brshooter@...> wrote:

        > We have an application that I need to have all incoming e-mail for a
        > given domain, delivered to a MySQL based mailboxes. Also, none of the
        > recipients have a unix account/mailbox on this system, they are users
        > of a web based service. I've been scouring the postfix documentation
        > and procmail documentation. My application will be analogous to
        > procmail, but I do have some questions for the more experienced users:
        >
        > 1. Because the recipients don't have accounts on the system, I was not
        > sure if I need to use postfix's LDA (local) to deliver the messages or
        > rely on virtual(5)/virutal(8)?

        Unless the users have real accounts (i.e. accounts accessible via
        getpwnam(3) and friends) you must make the domain a virtual mailbox
        domain. That doesn't necessarily mean that you'll be using virtual(8),
        though.

        > 2. If I do need to use virtual, it does not support a
        > "mailbox_command" for obvious reasons. How do I invoke our proprietary
        > delivery agent?

        Define a service for the delivery agent in master.cf and set
        virtual_transport to point to that service. The default master.cf
        should already contain example services for maildrop and Cyrus.

        > 3. If this is an LDA issue, how is the actual message passed to the
        > LDA? I know some of the information is passed via environment
        > variables, but does the rest come in via stdin or a filename?

        Postfix passes messages to its services (local(8), virtual(8), pipe(8),
        lmtp(8), smtp(8), ...) via an internal undocumented protocol. In the
        case of pipe(8) where you supply a program to perform the actual
        delivery, the message is then passed to your program via stdin.

        > I assure you I spent time researching this before I made my post. I
        > hope this is the right group to ask. I know some of these questions
        > border on the development side of things.

        This group is fine for these questions.

        --
        Magnus Bäck
        magnus@...
      • Kevin Wilcox
        Magnus, Thank oy for your reply, with your input, I think I ve figured most of it out. I do have a couple more questions below: ... Since this is going to be a
        Message 3 of 4 , Jul 1, 2006
          Magnus,

          Thank oy for your reply, with your input, I think I've figured most of it out. I do have a couple more questions below:

          On 7/1/06, Magnus Bäck <magnus@...> wrote:
          On Friday, June 30, 2006 at 23:08 CEST,
               Kevin Wilcox <6brshooter@...> wrote:

          > We have an application that I need to have all incoming e-mail for a
          > given domain, delivered to a MySQL based mailboxes. Also, none of the
          > recipients have a unix account/mailbox on this system, they are users
          > of a web based service. I've been scouring the postfix documentation
          > and procmail documentation. My application will be analogous to
          > procmail, but I do have some questions for the more experienced users:
          >
          > 1. Because the recipients don't have accounts on the system, I was not
          > sure if I need to use postfix's LDA (local) to deliver the messages or
          > rely on virtual(5)/virutal(8)?

          Unless the users have real accounts (i.e. accounts accessible via
          getpwnam(3) and friends) you must make the domain a virtual mailbox
          domain. That doesn't necessarily mean that you'll be using virtual(8),
          though.


          Since this is going to be a virtual mailbox domain rather than a virtual alias, I think then I don't need to create an entry in virtual(5) correct? One point I forgot to mention in my original e-mail is that even though the recipients don't have mail boxes on the system, their domain name matches the domain name of the SMTP server.


          > 2. If I do need to use virtual, it does not support a
          > "mailbox_command" for obvious reasons. How do I invoke our proprietary
          > delivery agent?

          Define a service for the delivery agent in master.cf and set
          virtual_transport to point to that service. The default master.cf
          should already contain example services for maildrop and Cyrus.


          I understand how do add a virtual tranports in main.cf, how do I match that transport to the domain name? Based on what I've read, I think I do it in the transport(5) file. Is this correct?

          Also, I'll still need to configure main.cf to know about this domain. Is this correct?

          Thank you so much for your help.

          Regards,
          Kevin
           

        • Magnus Bäck
          On Sunday, July 02, 2006 at 00:10 CEST, ... Correct. You ll need to use the virtual table for aliases, though. ... With don t have mail boxes on the system ,
          Message 4 of 4 , Jul 1, 2006
            On Sunday, July 02, 2006 at 00:10 CEST,
            Kevin Wilcox <6brshooter@...> wrote:

            > On 7/1/06, Magnus Bäck <magnus@...> wrote:
            >
            > > Unless the users have real accounts (i.e. accounts accessible via
            > > getpwnam(3) and friends) you must make the domain a virtual mailbox
            > > domain. That doesn't necessarily mean that you'll be using
            > > virtual(8), though.
            >
            > Since this is going to be a virtual mailbox domain rather than a
            > virtual alias, I think then I don't need to create an entry in
            > virtual(5) correct?

            Correct. You'll need to use the virtual table for aliases, though.

            > One point I forgot to mention in my original e-mail is that even
            > though the recipients don't have mail boxes on the system, their
            > domain name matches the domain name of the SMTP server.

            With "don't have mail boxes on the system", I assume you're talking
            about local mailboxes connected to local (non-virtual) accounts.

            Just make sure you don't list the domain in question in two address
            classes. In this case you'd want to make sure you don't your domain
            in both mydestination and virtual_mailbox_domains. And yes, it's
            perfectly allright to have the server's own domain (mydomain) as a
            virtual mailbox domain. Postfix doesn't care.

            > > Define a service for the delivery agent in master.cf and set
            > > virtual_transport to point to that service. The default master.cf
            > > should already contain example services for maildrop and Cyrus.
            >
            > I understand how do add a virtual tranports in main.cf, how do I match
            > that transport to the domain name? Based on what I've read, I think I
            > do it in the transport(5) file. Is this correct?

            That's one way of doing it, but instead just set virtual_transport to
            the service you've created. Then all messages to virtual mailbox domains
            will be sent to your service.

            > Also, I'll still need to configure main.cf to know about this domain.
            > Is this correct?

            Yes. List all virtual mailbox domains in virtual_mailbox_domains
            and all valid recipients in those domains in virtual_mailbox_maps.

            --
            Magnus Bäck
            magnus@...
          Your message has been successfully submitted and would be delivered to recipients shortly.