1

Topic: Transport per-domain (backup MX)

Hi,

I know that it's possible to forward mail directly -per user.

But I wonder if with an iRedMail configuration, I can forward directly all mail for example.com to an exchange using postfix.

MX1 example.com --> iRedMail --> LDAP Domain (dc=example,dc=com) --> exemple.com (exchange) --> MUA (client)

Thanks

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Transport per-domain (backup MX)

Of course you can.

Change 'mtaTransport' of your domain object, such as:

dn: domainName=test.com,o=domains,dc=iredmail,dc=org
mtaTransport: smtp:Your_Exchange_Server:25

3 (edited by crossfire972 2009-10-13 21:17:18)

Re: Transport per-domain (backup MX)

Thanks to your quick reply.

I set :
domainBackupMX = yes
dn: domainName=test.com,o=domains,dc=iredmail,dc=org
mtaTransport: smtp:Exchange_Server:25
add the IP address of Exchange_Server to mynetworks in /etc/postfix/main.cf

I try with a exist mailbox i get this :
to=<xxxx@test.com>, relay=dovecot, delay=0.09, delays=0.01/0.03/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
But it's don't arrive in the xxxx@Exchange_Server

If I try to send a mail to a mailbox which not apear in the ldap database I get this:
Recipient address rejected: User unknown in relay recipient table; from=<xxxxx@gmail.com> to=<xxxxx@exchange_server> proto=ESMTP helo=<mail-ew0-f225.google.com>

How can I get the job done ???

Thanks

4

Re: Transport per-domain (backup MX)

Does it work without 'domainBackupMX'?

5

Re: Transport per-domain (backup MX)

I get this for mailbox witch doesn't exist:
NOQUEUE: reject: RCPT from ey-out-2122.google.com[74.125.78.25]: 550 5.1.1 <xxxx@test.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<xxxx@gmail.com> to=<xxxx@test.com> proto=ESMTP helo=<ey-out-2122.google.com>

But reffering to this in  (relay_domains = /etc/postfix/ldap_relay_domains.cf)
query_filter    = (&(objectClass=mailDomain)(domainName=%s)(domainBackupMX=yes)(accountStatus=active)(enabledService=mail))
result_attribute= domainName

To work I think that domainBackupMX must to be set to "yes"

6

Re: Transport per-domain (backup MX)

I'm confused.

You want to receive mails, and then relay them to your exchange server, right?

If so, you don't need to use backup mx.
You can host your domain as a normal mail domain, but relay all mails to exchange server with 'mtaTransport=smtp:XXX:25' in domain LDAP data.

7 (edited by crossfire972 2009-10-13 21:59:59)

Re: Transport per-domain (backup MX)

Ok, so I don't have to create all accounts.

just create the domain in the LDAP database and set 'mtaTransport=smtp:XXX:25'.

Postfix will directly send all the mails to my exchange

8

Re: Transport per-domain (backup MX)

I confirm with this configuration :
dn: domainName=test.com,o=domains,dc=iredmail,dc=org
mtaTransport: smtp:Your_Exchange_Server:25

I get :
550 5.1.1 <xxxx@testcom>: Recipient address rejected: User unknown in virtual mailbox table;

And receive a MAILER-DEAMON undelivery mail

9

Re: Transport per-domain (backup MX)

if you don't want to create user accounts in iredmail, you have to config this domain as backup mx, but you can't reject spams before relay to exchange server.

if you want to host this domain as backup mx, set 'domainBackupMX=yes' & 'mtaTransport=smtp:xxx:25' in this domain, and comment 'relay_recipient_maps' in postfix main.cf.

10

Re: Transport per-domain (backup MX)

Well done...

Thanks a lot

11

Re: Transport per-domain (backup MX)

Hi, @crossfire972.

Please help us to review this FAQ:

- [FAQ] How to relay your mails per-domain or per-user (LDAP solution)
  http://www.iredmail.org/forum/topic334- … ution.html

12

Re: Transport per-domain (backup MX)

I will please to help you to review th FAQ but I still ha ve an issue:

When I try to send a mail from a outside address to a mailbox list in the iRedMail LDAP database ("dovecot mode") I get this :

connect from smtp21.xxxxxx.com[8x.1x.2xx.xx]
NOQUEUE: reject: RCPT from smtp21.xxxxxx.com[8x.1x.2xx.xx]: 450 4.7.1 <test@example.com>: Recipient address rejected: Policy Rejection- Please try later.; from=<xxxxx@personal.com> to=<test@example.com> proto=ESMTP helo=<smtp21.xxxxx.com>
disconnect from smtp21.xxxxxx.com[8x.1x.2xx.xx]

The question is :

Where can I set the Policy Rejection ??
Can I set direct transport mode and local delivery mode at the same time ??

Thanks

13

Re: Transport per-domain (backup MX)

Recipient address rejected: Policy Rejection- Please try later.;

This is greylisting, it's SAFE to ignore this msg.

Reference: http://greylisting.org/

14

Re: Transport per-domain (backup MX)

Alright my bad it wor perfectly...

How can I help you for this FAQ ??

15 (edited by crossfire972 2009-11-09 23:00:38)

Re: Transport per-domain (backup MX)

Sorry, to have to  up this topic, but,

when I test this configuration again,

I get this message and the mail is delayes in queue:

status=deferred (lost connection with hostmx.com[xxx.xxx.xxx.xxx] while receiving the initial server greeting).

Why is that ???

16

Re: Transport per-domain (backup MX)

lost connection with hostmx.com

It seems a network connection issue.

17

Re: Transport per-domain (backup MX)

Thanks and sorry for the disturb,
it was an issue of the remote mail server.