1

Topic: is there possible to setup multiserver in iredmail

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):LDAP
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi Zhang,
http://wiki.zarafa.com/index.php/Postfi … rver_setup

the link is best describe of what i want, is there possible to do that on iredmail?

Thanks
Napoleon

2

Re: is there possible to setup multiserver in iredmail

Yes.

The key of the tutorial is this sentence:

When a user on server Mail2 sends an email to an internal user on server Mail3, the Postfix MTA on server Mail2 will connect via LMTP protocol to server Mail3. All emails sends to external email domains are relayed via the main MTA (mail1).

iRedMail supports and enabled LMTP by default, so you can try to tune the per-user transport to "lmtp:[server]:24".

Note: lmtp is listening on 127.0.0.1 by default, you need to update /etc/dovecot/dovecot.conf to make it listening on external IP address, or simply use '0.0.0.0' to listen on all available network interfaces then control the access with firewall.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by napoleon.lam 2018-11-27 16:09:57)

Re: is there possible to setup multiserver in iredmail

Dear Zhang,
1. in which files so you can try to tune the per-user transport to "lmtp:[server]:24"?
2. make a sample of 2 user on how to make per-user transport

Thanks
Napoleon

4

Re: is there possible to setup multiserver in iredmail

We have document for you: https://docs.iredmail.org/per-account.transport.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: is there possible to setup multiserver in iredmail

Dear Zhang,
  the document is hard to understand, please guide me

As for this information I found. the testing environment should be
Server A - User 1, User 2 & User 3
Server B - User 4, User 6

Both installation using domain example.com and that i should config to have when i am on Server A as user 1, I send a email to User 4. the mail should arrived successfully on Server B and vise versa

6

Re: is there possible to setup multiserver in iredmail

- Let's say Server A has IP address "192.168.1.1", you need to update LDAP attribute "mtaTransport" of user 1/2/3 to "lmtp:inet:192.168.1.1:24".
- - Let's say Server B has IP address "192.168.1.2", you need to update LDAP attribute "mtaTransport" of user 4/6 to "lmtp:inet:192.168.1.2:24".

Again, check /etc/dovecot/dovecot.conf, make sure LMTP service is listening on 0.0.0.0, so that server A/B can connect and deliver emails to each other.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

7

Re: is there possible to setup multiserver in iredmail

Dear Zhang,
1. LDAP attributes using iredadmin - pro ?
2. let said 192.168.1.1 is the mail server Mail 1 in this example http://wiki.zarafa.com/index.php/Postfi … rver_setup
which is the server to received email, and mail2 mail3 mail4 users send mail to outside is thru mail1, my question is how do i do that?

3. I follow some hints you give me https://docs.iredmail.org/per-account.transport.html
    using iredadmin i create all the users in our domain, and configure relay on user that is not on the sites to the server it belong, it worked! but i don't know if it is the correct way.

Thanks
Napoleon

8

Re: is there possible to setup multiserver in iredmail

napoleon.lam wrote:

1. LDAP attributes using iredadmin - pro ?

Check the tutorial:
https://docs.iredmail.org/per-account.transport.html

napoleon.lam wrote:

which is the server to received email, and mail2 mail3 mail4 users send mail to outside is thru mail1, my question is how do i do that?

FYI: https://docs.iredmail.org/relayhost.html

napoleon.lam wrote:

    using iredadmin i create all the users in our domain, and configure relay on user that is not on the sites to the server it belong, it worked! but i don't know if it is the correct way.

Yes, under the "Relay" tab in user profile page.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

9

Re: is there possible to setup multiserver in iredmail

Dear Zhang,

  I got this error on mail log of Mail 1
  relay=none, delay=536, delays=535/1/0/0.05, dsn=4.3.0, status=deferred (unknown mail transport error)

after i add the IP address of server A in Postfix /etc/postfix/main.cf on Server B (Server B is Mail 1 on our discussion)
by the advise below
https://forum.iredmail.org/topic12145-i … mmand.html

thanks
Napoleon

10

Re: is there possible to setup multiserver in iredmail

napoleon.lam wrote:

  relay=none, delay=536, delays=535/1/0/0.05, dsn=4.3.0, status=deferred (unknown mail transport error)

Which transport did you set?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

11

Re: is there possible to setup multiserver in iredmail

this is my configuration, it should be dovecot i Think

Post's attachments

mail1.jpg
mail1.jpg 39.33 kb, file has never been downloaded. 

mail2.jpg
mail2.jpg 47.11 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

12 (edited by napoleon.lam 2018-11-30 17:20:47)

Re: is there possible to setup multiserver in iredmail

This is the maillog for Mail 2 (It seem successfully relay to Mail 1 [10.8.0.154]
Nov 30 15:50:32 ct-mailsitesTX postfix/amavis/smtp[92711]: 9B0BC4176B: to=<napoleonlam@mysecretreceiver.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.1, delays=0.1/0.04/0/0.93, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 6BF214176E)
Nov 30 15:50:32 ct-mailsitesTX postfix/smtp[92718]: 6BF214176E: to=<napoleonlam@mysecretreceiver.com>, relay=10.8.0.154[10.8.0.154]:25, delay=0.28, delays=0.06/0.05/0.03/0.13, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 9895D40C8D)

-----------------------------------------------------------------------------------------------
This is from Mail 1 maillog
Nov 30 17:10:40 ct-mailsites2 postfix/qmgr[48245]: 0F11040CB5: from=<mario.lee@aaa.com>, size=2698, nrcpt=1 (queue active)
Nov 30 17:10:40 ct-mailsites2 postfix/smtp[95535]: fatal: valid hostname or network address required in server description: smtp:[10.8.0.159]:25
Nov 30 17:10:41 ct-mailsites2 postfix/qmgr[48245]: warning: private/smtp socket: malformed response
Nov 30 17:10:41 ct-mailsites2 postfix/qmgr[48245]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Nov 30 17:10:41 ct-mailsites2 postfix/master[48243]: warning: process /usr/libexec/postfix/smtp pid 95535 exit status 1
Nov 30 17:10:41 ct-mailsites2 postfix/master[48243]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
Nov 30 17:10:41 ct-mailsites2 postfix/error[95536]: 0F11040CB5: to=<napoleonlam@mysecretreceiver.com>, relay=none, delay=84535, delays=84534/1.1/0/0.05, dsn=4.3.0, status=deferred (unknown mail transport error)
Nov 30 17:10:49 ct-mailsites2 clamd[1180]: Database correctly reloaded (6724677 signatures)

It said unknown mail transport error

13

Re: is there possible to setup multiserver in iredmail

You did it wrong.

"Relay received mail to" should be something like: "lmtp:inet:[ip-of-destination-server]:24" (without quotes).

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

14 (edited by napoleon.lam 2018-12-03 09:49:00)

Re: is there possible to setup multiserver in iredmail

ZhangHuangbin wrote:

You did it wrong.

"Relay received mail to" should be something like: "lmtp:inet:[ip-of-destination-server]:24" (without quotes).

Dear Zhang,
  Presently i used iredadmin pro on config, and as the instruction above "lmtp:inet:[ip-of-destination-server]:24"  where am i do the configure?

my iredadmin pro config have do almost i guess what you said, but it still lied on the same error, could you tell me where do i do the configuration?

Post's attachments

iredrelay1.jpg
iredrelay1.jpg 79.48 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

15

Re: is there possible to setup multiserver in iredmail

- "Relay received mail to -> lmtp:inet:10.8.0.154:24
- Leave "Relay outgoing email to" empty.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

16 (edited by napoleon.lam 2018-12-06 15:03:45)

Re: is there possible to setup multiserver in iredmail

ZhangHuangbin wrote:

- "Relay received mail to -> lmtp:inet:10.8.0.154:24
- Leave "Relay outgoing email to" empty.

Thanks Zhang, that solved the mail 2 to send outside thru mail 1.
but I found out that mail 1 can not send email to user on mail 2 now which previously had success.


No route to host as below
Dec  6 14:56:45 ct-mailsitesTX postfix/lmtp[365464]: BE22741768: to=<mario.lee@aaa.com>, relay=none, delay=499, delays=498/0.02/1/0, dsn=4.4.1, status=deferred (connect to 10.8.0.154[10.8.0.154]:24: No route to host)

17

Re: is there possible to setup multiserver in iredmail

1: Is server with IP address "10.8.0.154" running?
2: Again, check /etc/dovecot/dovecot.conf, make sure LMTP service is listening on 0.0.0.0, so that server A/B can connect and deliver emails to each other.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

18 (edited by napoleon.lam 2018-12-06 15:18:43)

Re: is there possible to setup multiserver in iredmail

ZhangHuangbin wrote:

1: Is server with IP address "10.8.0.154" running?
2: Again, check /etc/dovecot/dovecot.conf, make sure LMTP service is listening on 0.0.0.0, so that server A/B can connect and deliver emails to each other.

1. Yes
2. okey let me check (is this need to on both mail server?

19 (edited by napoleon.lam 2018-12-06 15:36:29)

Re: is there possible to setup multiserver in iredmail

inet_listener lmtp {
        # Listen on localhost (ipv4)
        #address = 127.0.0.1
        address = 0.0.0.0
        port = 24
    }
set on both /etc/dovecot/dovecot.conf
have restart the dovecot service by systemctl restart dovecot
but still mail 1 could not send to mail 2


Log from Mail 1 (mail 1 to mail 2)

Dec  6 15:30:09 ct-mailsites2 postfix/amavis/smtp[1311]: 12A0140BD4: to=<mario.lee@aaa.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.2, delays=0.17/0.04/0/0.98, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1973B40C71)
Dec  6 15:30:09 ct-mailsites2 postfix/qmgr[807]: 12A0140BD4: removed
Dec  6 15:30:09 ct-mailsites2 postfix/smtp[1322]: Untrusted TLS connection established to 10.8.0.159[10.8.0.159]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Dec  6 15:30:09 ct-mailsites2 postfix/smtp[1322]: 1973B40C71: to=<mario.lee@aaa.com>, relay=10.8.0.159[10.8.0.159]:25, delay=0.52, delays=0.06/0.06/0.23/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 8C3C741738)
Dec  6 15:30:09 ct-mailsites2 postfix/qmgr[807]: 1973B40C71: removed

Log from mail 2 (the recipient server)

Dec  6 15:31:57 ct-mailsitesTX postfix/qmgr[861]: 746B541799: from=<napoleon.lam@aaa.com>, size=2687, nrcpt=1 (queue active)
Dec  6 15:31:57 ct-mailsitesTX postfix/qmgr[861]: 981EA41797: from=<napoleon.lam@aaa.com>, size=2687, nrcpt=1 (queue active)
Dec  6 15:31:57 ct-mailsitesTX postfix/qmgr[861]: 0929B41796: from=<napoleon.lam@aaa.com>, size=2693, nrcpt=1 (queue active)
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1392]: connect to 10.8.0.154[10.8.0.154]:24: No route to host
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1391]: connect to 10.8.0.154[10.8.0.154]:24: No route to host
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1390]: connect to 10.8.0.154[10.8.0.154]:24: No route to host
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1391]: 981EA41797: to=<mario.lee@aaa.com>, relay=none, delay=977, delays=976/0.01/1/0, dsn=4.4.1, status=deferred (connect to 10.8.0.154[10.8.0.154]:24: No route to host)
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1392]: 0929B41796: to=<mario.lee@aaa.com>, relay=none, delay=1004, delays=1003/0.02/1/0, dsn=4.4.1, status=deferred (connect to 10.8.0.154[10.8.0.154]:24: No route to host)
Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1390]: 746B541799: to=<mario.lee@aaa.com>, relay=none, delay=532, delays=531/0.02/1/0, dsn=4.4.1, status=deferred (connect to 10.8.0.154[10.8.0.154]:24: No route to host)
Dec  6 15:33:29 ct-mailsitesTX postfix/anvil[1302]: statistics: max connection rate 1/60s for (smtpd:10.8.0.154) at Dec  6 15:30:09
Dec  6 15:33:29 ct-mailsitesTX postfix/anvil[1302]: statistics: max connection count 1 for (smtpd:10.8.0.154) at Dec  6 15:30:09
Dec  6 15:33:29 ct-mailsitesTX postfix/anvil[1302]: statistics: max cache size 1 at Dec  6 15:30:09

20

Re: is there possible to setup multiserver in iredmail

napoleon.lam wrote:

Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1392]: connect to 10.8.0.154[10.8.0.154]:24: No route to host

It's like a network issue, not iRedMail configuration.
Can you connect to port 24 with tool like 'telnet' on localhost, AND from another server (A to B, B to A)?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

21

Re: is there possible to setup multiserver in iredmail

ZhangHuangbin wrote:
napoleon.lam wrote:

Dec  6 15:31:58 ct-mailsitesTX postfix/lmtp[1392]: connect to 10.8.0.154[10.8.0.154]:24: No route to host

It's like a network issue, not iRedMail configuration.
Can you connect to port 24 with tool like 'telnet' on localhost, AND from another server (A to B, B to A)?

I have learned that the setup is other else to have it worked.
it just configure the right setting on relay. no need to involved lmtp

Thanks Zhang for your support.

22

Re: is there possible to setup multiserver in iredmail

Would you mind sharing your working solution?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

23

Re: is there possible to setup multiserver in iredmail

ZhangHuangbin wrote:

Would you mind sharing your working solution?

Please look at above on my setting on 2018-11-30 09:29:52 (the 2 images) I am sure i have reboot the server.

I changes back, and it worked all the way. i don't know why there is problem on that day, but it should be that setting.
I did not used lmtp presently and it work just as i expected.

Thanks anyway
Napoleon

24

Re: is there possible to setup multiserver in iredmail

OK, thanks for sharing. smile

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee