[Dovecot] Lmtp between hosts? (postfix/dovecot/ldap)
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@xx.yy>, 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:
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)).
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(?)
- 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
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@xx.yy>, 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:
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)).
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(?)
- 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
=
participants (3)
-
k bah
-
mouss
-
wietse@porcupine.org