1

Topic: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
==== Hello,

Pls let me know can we configure iRedAdmin-Pro-LDAP domain Relay/Transport Setting step by setp

I want to authenticate in one mail server forward it to relay my two postfix mail gateways servers install with iRedMail-0.8.1

Thanks
Chinthaka

2

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Steps:

- Click "Domains and Accounts" in the main navigation bar. It will list mail domains hosted on your server.
- Click the gear icon beside the domain name which you want to configure relay setting. It will redirect you to domain profile page.
- Click tab "Relay", then fill in the relay setting you want.

Screenshot for your reference:

http://www.iredmail.org/images/iredadmin/domain_profile_relay.png

3

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Hi  Zhang,

Thanks for post,

What is the next configuration if for for relay i am now to this ..

let say my relay is name is getaway.domain.com

- Do i need config any where in postfix ?
- How can forward all mails to getaway.domain.com relay to out side?
- How do I make authenticate with ISP getaway.ISP.com to relay my mail with iRedAdmin-Pro

Thanks
Chinthaka

4

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

chinthaka wrote:

- Do i need config any where in postfix ?

No. All are configured by iRedMail.

chinthaka wrote:

- How can forward all mails to getaway.domain.com relay to out side?

Fill below string as relay:

smtp:gateway.domain.com:25

- Postfix will connect to server listed in the MX record of gateway.domain.com, through port 25.
- If you prefer connecting to server listed in A record of gateway.domain.com, please use "smtp:[gateway.domain.com]:25" (without quotes) instead.
- If you prefer connecting to port 587 (submission), replace "25" with "587".

Please refer to Postfix manual page for more details and samples:
http://www.postfix.org/transport.5.html

chinthaka wrote:

- How do I make authenticate with ISP getaway.ISP.com to relay my mail with iRedAdmin-Pro

You must list username/password in a file, then config Postfix parameter smtp_sasl_password_maps for authentication.
Reference: http://postfix.state-of-mind.de/patrick … rvers.html

5

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

I have added in to domain relay setting but mails still getting deliver local servers

smtp:gateway.domain.com:25

6

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Oops, i didn't realize you want to relay all emails, then you need Postfix parameter "relayhost =" in /etc/postfix/main.cf instead. For example:

relayhost = smtp:gateway.domain.com:25

7

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

So  /etc/postfix/main.cf  relay setting should be like below to

Domain1 relayhost = smtp:gateway1.domain.com:25
Domain2 relayhost = smtp:gateway2.domain.com:25
Domain3 relayhost = smtp:gateway3.domain.com:25

am I correct ?

8

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Postfix has only one "relayhost" setting, otherwise you have to use sender_dependent_relayhost_maps instead.
Reference: http://www.postfix.org/postconf.5.html# … yhost_maps

I'm confused now. You have 3 servers, let's say they're server #1, #2, #3. Here's my questions:

- Which is iRedMail server?
- Which server you want to configure relay setting and relay all emails to gateway.domain.com?
- Is gateway.domain.com hosted on one of your 3 servers?

9 (edited by chinthaka 2012-08-03 14:26:34)

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Here is the answers below

- Which is iRedMail server?  >>>  Server 1 - mail.domain.com
- Which server you want to configure relay setting and relay all emails to gateway.domain.com? >>> pls see below
- Is gateway.domain.com hosted on one of your 3 servers? I have two servers to configure as gateway

Sorry about it .. I'll clear you now

I have three mail server now

Server 1  - mail.domain.com
Server 2  - gateway1.domain.com
Server 3  - gateway2.domain.com

I have three domains have host it server "mail.domain1.com" "mail.domain2.com" "mail.domain3.com"

Now I want to relay as below

domain1.com forward to Server 1  (mail.domain.com)
domain2.com forward to Server 2 (gateway1.domain.com)
domain3.com forward to Server 3 (gateway2.domain.com)

I want load balance server1 (mail.domain.com) to mail deliver out site from  gateway1 & gateway2

iRedMail server & iRedAdmin-Pro-LDAP installed on - Server 1 - mail.domain.com 

all mail user account created on Server 1
Domain or user can send limit max 250 mail per hour

ALL three Domain MX point to mail.domain.com

This is the setup I am going to do.

I think now my requirement clear to you smile


ZhangHuangbin wrote:

Postfix has only one "relayhost" setting, otherwise you have to use sender_dependent_relayhost_maps instead.
Reference: http://www.postfix.org/postconf.5.html# … yhost_maps

I'm confused now. You have 3 servers, let's say they're server #1, #2, #3. Here's my questions:

- Which is iRedMail server?
- Which server you want to configure relay setting and relay all emails to gateway.domain.com?
- Is gateway.domain.com hosted on one of your 3 servers?

Post's attachments

Drawing1.jpg
Drawing1.jpg 33.46 kb, file has never been downloaded. 

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

10

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

It's clear now, the picture helps a lot.

chinthaka wrote:

Now I want to relay as below

domain1.com forward to Server 1  (mail.domain.com)
domain2.com forward to Server 2 (gateway1.domain.com)
domain3.com forward to Server 3 (gateway2.domain.com)

all mail user account created on Server 1

Here's how:

- Don't set relayhost in Postfix main.cf.
- Don't set per-domain relay setting for domain1.com. So that all emails sent to domain1.com will be delivered locally (on mail.domain.com).
- Set per-domain relay setting with iRedAdmin-Pro for domain2.com, the value should be: smtp:gateway1.domain.com:25
- Set per-domain relay setting with iRedAdmin-Pro for domain3.com, the value should be: smtp:gateway2.domain.com:25

Let me know whether it works for you or not.

11

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Oops its.... not working we may miss some where ..

mail still deliver via local dovecot .. how can i route all domain2 and domain3 mails to two gateways..

12

Re: iRedAdmin-Pro-LDAP domain Relay/Transport Setting

Please paste related log in /var/log/maillog to help troubleshoot.