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

Lmtp between hosts? (postfix/dovecot/ldap)

Expand Messages
  • k bah
    I have 2 hosts: (a) - dovecot-1.0.5-6 - postfix-2.4.5-20 - It s not the mx record for the domain, just holds the mailboxes - Postfix uses LDAP for user
    Message 1 of 5 , Apr 2, 2008
    • 0 Attachment
      I have 2 hosts:

      (a)
      - dovecot-1.0.5-6
      - postfix-2.4.5-20
      -> It's not the mx record for the domain, just holds the mailboxes
      -> Postfix uses LDAP for user lookup, dovecot too.
      -> Works ok if I set it to be the final mail destination, with Cyrus and Dovecot LDA (mailbox_transport).
      -> Has no domain associated (dns) with this ip address

      (b)
      - postfix-2.3.2-28
      -> Has the mx record for that domain, has ip address that the domain points to. (users @ domain.org)
      -> Works ok if I install dovecot and set the mailbox_transport to be on this machine, both with dovecot and cyrus.


      What I'm trying to do:

      Have host (b) to receive mails for that domain, and by setting it's transport_maps to be /etc/postfix/transport, and there (tranport maps) point to host (a), using ltmp:

      "domain.org lmtp:ip_address_machine_A:24"

      ("domain.org lmtp:inet:ip_address_machine_A:24" does not work, gives me

      "fatal: valid hostname or network address required in server description: inet:ip_address_machine_A:24")


      Both machines have /etc/services with lmtp to port 24 tcp/udp.
      http://www.postfix.org/transport.5.html was not so clear to me.
      Ok, when I took out the "inet" part on the transport maps file, it connected to the host (a), which has this on master.cf:

      "machine_A_ip_address:24 inet n - n - - lmtp"

      it "worked", since machine (b) (received the mail and has mx record) delivered the mail to machine (a) (holds mailboxes, runs dovecot), but that stopped, machine (b) connects to port 24 on machine (a), and stays there, connected, without saying nothing (sniffed it). When I kill the connection (kill postfix on machine (a)), machine (b) complains on the log file:

      postfix/lmtp[704]: msg_id: to=<xx@...>, relay=machine_A[machine_A]:24, delay=223, delays=0.08/0.01/223/0, dsn=4.4.2, status=deferred (lost connection with machine_A[machine_A] while receiving the initial server greeting).


      -- questions --

      I don't know if I'm doing things wrong (configuration error) or the wrong thing (should try other ways), so my questions:

      1) Is this setup going to work ever, or it's wrong to try to get it to work? I want to hold mailboxes on a different host, and now I got to use dovecot (in case I hear: "try it with cyrus instead" =o)).

      2) Viewing from the machine that receives the mail, and has mx record, the transport should be lmtp, right? Since it's now a matter of "delivery".

      Postfix:
      <...> -> <qmgr> -> (<local> or <smtp> or <pipe>)

      When using lmtp, I'm in <local>??

      I mean, to get the message to the other machine (just mailboxes, no mx) I SHOULD USE LMTP(?)

      3) Viewing from the machine holding the mailboxes, is there a way to make dovecot listen on that port? Or should I continue to use Postfix, and use postfix on this machine to deliver to dovecot (dovecot lda config works ok if using 1 and only 1 machine for everything - mx record, mailboxes). With Cyrus I talked lmtp directly, Postfix receives the mail and uses lmtp to talk to cyrus, using a unix socket.


      If anyone replies to the topic, and the discussion goes deeper on some of the alternatives, I paste my configs and come with further details, since what's working isolated I didn't paste here. Previous tests with just Cyrus or Dovecot on 1 machine setup worked, so I think it would just "bloat" the mail with information.


      thanks

      =


      --
      Powered by Outblaze
    • mouss
      ... what s this supposed to do? lmtp is a transport, it doesn t listen on an IP:port. use smtp to pass mail to the other machine.
      Message 2 of 5 , Apr 2, 2008
      • 0 Attachment
        k bah wrote:
        > I have 2 hosts:
        >
        > (a)
        > - dovecot-1.0.5-6
        > - postfix-2.4.5-20
        > -> It's not the mx record for the domain, just holds the mailboxes
        > -> Postfix uses LDAP for user lookup, dovecot too.
        > -> Works ok if I set it to be the final mail destination, with Cyrus and Dovecot LDA (mailbox_transport).
        > -> Has no domain associated (dns) with this ip address
        >
        > (b)
        > - postfix-2.3.2-28
        > -> Has the mx record for that domain, has ip address that the domain points to. (users @ domain.org)
        > -> Works ok if I install dovecot and set the mailbox_transport to be on this machine, both with dovecot and cyrus.
        >
        >
        > What I'm trying to do:
        >
        > Have host (b) to receive mails for that domain, and by setting it's transport_maps to be /etc/postfix/transport, and there (tranport maps) point to host (a), using ltmp:
        >
        > "domain.org lmtp:ip_address_machine_A:24"
        >
        > ("domain.org lmtp:inet:ip_address_machine_A:24" does not work, gives me
        >
        > "fatal: valid hostname or network address required in server description: inet:ip_address_machine_A:24")
        >
        >
        > Both machines have /etc/services with lmtp to port 24 tcp/udp.
        > http://www.postfix.org/transport.5.html was not so clear to me.
        > Ok, when I took out the "inet" part on the transport maps file, it connected to the host (a), which has this on master.cf:
        >
        > "machine_A_ip_address:24 inet n - n - - lmtp"
        >

        what's this supposed to do? lmtp is a transport, it doesn't listen on an
        IP:port.

        use smtp to pass mail to the other machine.
        > it "worked", since machine (b) (received the mail and has mx record) delivered the mail to machine (a) (holds mailboxes, runs dovecot), but that stopped, machine (b) connects to port 24 on machine (a), and stays there, connected, without saying nothing (sniffed it). When I kill the connection (kill postfix on machine (a)), machine (b) complains on the log file:
        >
        > postfix/lmtp[704]: msg_id: to=<xx@...>, relay=machine_A[machine_A]:24, delay=223, delays=0.08/0.01/223/0, dsn=4.4.2, status=deferred (lost connection with machine_A[machine_A] while receiving the initial server greeting).
        >
        >
        > -- questions --
        >
        > I don't know if I'm doing things wrong (configuration error) or the wrong thing (should try other ways), so my questions:
        >
        > 1) Is this setup going to work ever, or it's wrong to try to get it to work? I want to hold mailboxes on a different host, and now I got to use dovecot (in case I hear: "try it with cyrus instead" =o)).
        >
        > 2) Viewing from the machine that receives the mail, and has mx record, the transport should be lmtp, right? Since it's now a matter of "delivery".
        >
        > Postfix:
        > <...> -> <qmgr> -> (<local> or <smtp> or <pipe>)
        >
        > When using lmtp, I'm in <local>??
        >
        > I mean, to get the message to the other machine (just mailboxes, no mx) I SHOULD USE LMTP(?)
        >
        > 3) Viewing from the machine holding the mailboxes, is there a way to make dovecot listen on that port? Or should I continue to use Postfix, and use postfix on this machine to deliver to dovecot (dovecot lda config works ok if using 1 and only 1 machine for everything - mx record, mailboxes). With Cyrus I talked lmtp directly, Postfix receives the mail and uses lmtp to talk to cyrus, using a unix socket.
        >
        >
        > If anyone replies to the topic, and the discussion goes deeper on some of the alternatives, I paste my configs and come with further details, since what's working isolated I didn't paste here. Previous tests with just Cyrus or Dovecot on 1 machine setup worked, so I think it would just "bloat" the mail with information.
        >
        >
        > thanks
        >
        > =
        >
        >
        >
      • Wietse Venema
        ... The Postfix LMTP CLIENT can t be used for RECEIVING mail. Wietse
        Message 3 of 5 , Apr 2, 2008
        • 0 Attachment
          k bah:
          > "machine_A_ip_address:24 inet n - n - - lmtp"

          The Postfix LMTP CLIENT can't be used for RECEIVING mail.

          Wietse
        • k bah
          Ok, since this is a lmtp *client*, of course, I was completely wrong. And about using lmtp from one host to another, ok, it s clear now, I got to use smtp. Now
          Message 4 of 5 , Apr 2, 2008
          • 0 Attachment
            Ok, since this is a lmtp *client*, of course, I was completely wrong. And about using lmtp from one host to another, ok, it's clear now, I got to use smtp.

            Now I can read the manual http://www.postfix.org/transport.5.html and I can see things better:

            I use smtp to deliver to the other machine, and local_transport says (man): "This is the default for final delivery to domains listed with mydestination". This tells me to make the second machine, holding mailboxes, be destination to that domain. On this second machine I set mydestination main.cf config option to be that domain too:

            "$myhostname, localhost.$mydomain, the-mail-domain.org".

            It works.
            But, conceptually, it's right? Should I use virtual_transport/virtual_mailbox_domains? The machine holding mailboxes does not have a domain, and will not have one. Users will use the machine with the domain for their mails, for sending mail (smtp), and only webmail, no imap/pop access.

            Leave the way it is, or use virtual_transport?


            thanks again.



            =


            --
            Powered by Outblaze
          • Wietse Venema
            ... Use virtual_transport etc. for LOCAL delivery. See http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup for delivery to a down-stream host.
            Message 5 of 5 , Apr 2, 2008
            • 0 Attachment
              k bah:
              > Ok, since this is a lmtp *client*, of course, I was completely wrong. And about using lmtp from one host to another, ok, it's clear now, I got to use smtp.
              >
              > Now I can read the manual http://www.postfix.org/transport.5.html and I can see things better:
              >
              > I use smtp to deliver to the other machine, and local_transport says (man): "This is the default for final delivery to domains listed with mydestination". This tells me to make the second machine, holding mailboxes, be destination to that domain. On this second machine I set mydestination main.cf config option to be that domain too:
              >
              > "$myhostname, localhost.$mydomain, the-mail-domain.org".
              >
              > It works.
              > But, conceptually, it's right? Should I use virtual_transport/virtual_mailbox_domains? The machine holding mailboxes does not have a domain, and will not have one. Users will use the machine with the domain for their mails, for sending mail (smtp), and only webmail, no imap/pop access.
              >
              > Leave the way it is, or use virtual_transport?

              Use virtual_transport etc. for LOCAL delivery.

              See http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup for
              delivery to a down-stream host.

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