1 (edited by jsehlmeyer 2010-04-17 03:14:30)

Topic: Transports?

I just setup an iRedMail OS machine, and I must say it was the easiest and quickest mail server setup I've ever encountered.

The only issue I have is due more with my setup than the iRedMail software.

I have two spam/mail servers in my DMZ.  Each host a different domain.  The problem comes when a user on the iRedMail server wants to send an email to a user on the other server (server B).

Server A is the iRedMail server

I know previously, I had to setup a transport map such as: benrose.org-> smtp:[192.168.50.5] on Server A to point to Server B.

I'm using MySQL backend, and I've tried adding a line to the table, but can't seem to get it to work.
I've tried adding
benrose.org  smtp:[192.168.50.5]
and also
benrose.org smtp:[192.168.50.5]:25

But each time, when a user on Server A goes to send to Server B, Server A complains the user is unknown in virtual mailbox table.
Do I have to add a wildcard to Server A to accept all mail for benrose.org even though it hosts no mailboxes for the domain?

Thanks,
Jason

*** EDIT ***
I forgot to mention the why.  The server does an MX lookup to our Bind server in the DMZ, but that brings back the external IP, so the server has no way of contacting the server, it just times out.

I've tried adding a hosts entry, but it still looks like its doing an MX lookup instead of reading the hosts file.

----

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

2

Re: Transports?

jsehlmeyer wrote:

I've tried adding a hosts entry, but it still looks like its doing an MX lookup instead of reading the hosts file.

check the /var/spool/postfix/etc/hosts 

postfix would use the hosts files.

3

Re: Transports?

shake wrote:
jsehlmeyer wrote:

I've tried adding a hosts entry, but it still looks like its doing an MX lookup instead of reading the hosts file.

check the /var/spool/postfix/etc/hosts 

postfix would use the hosts files.

Thanks for the tip.  I did stumble across this hosts file, and made the change there also; however, still no dice.

I was able to get it to work by:
1. Creating a domain with the name of our other internally hosted domain with a transport of smtp:[192.168.50.5]
2. and then creating a virtual alias for this domain which said From: @domain.com To: @domain.com

This allowed the server to process the emails destined for our other server and transported them over.

Not a pretty solution, especially if there we had many domains, but it works.

4 (edited by borki 2010-04-24 01:02:55)

Re: Transports?

Hi

I have the same problem - I want some domains just relay to another server (e.g. customer domain, we do anti-spam/anti-virus and relay to their corporate server behind leased line).

If I add a new domain and set "Check this box to relay all mails of this domain" and enter a relay host eg. smtp:[192.168.1.1]:25 it always complains about "User unknown in virtual mailbox table". We did this before with a MySQL backend and it worked.. I don't see the problem here (just enabled LDAP Debugging) and it returns with the correct "mtaTransport" settings..

The trick from jsehlmeyer works, but I had some side effects in the Admin-GUI (seeing mail aliases from other domains in this particular domain..)

Why does this not work? Any ideas?

Reto

-- EDIT:
It seems, that the ldap lookup in "relay_domains" does not work.. it never returns an entry, since the query asks for domainBackupMX=yes. I removed this in /etc/postfix/ldap_relay_domains.cf to look like the following:

(&(objectClass=mailDomain)(|(domainName=sonnenblick.ch)(&(enabledService=domainalias)(domainAliasName=sonnenblick.ch)))(accountStatus=active)(enabledService=mail))

But this doesnt help... any hints welcome!

5

Re: Transports?

Hi, @jsehlmeyer & @borki.

Did you try to set 'relay_domains = $mydestination' and comment out 'relay_recipient_maps'?

6

Re: Transports?

Hi

I have set the followin:
..
relay_domains = $mydestination, proxy:ldap:/etc/postfix/ldap_relay_domains.cf
..
#relay_recipient_maps = proxy:ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf

/etc/init.d/postfix reload

-> No success, user unkwown in virtual table..

Anybody successfully relaying mail to another smtp server?

7

Re: Transports?

Can you please post related maillog which extract from log file? original log content

8

Re: Transports?

Hi

It worked with the howto from your site (http://www.iredmail.org/forum/topic334- … ution.html). I missed the manual addition of "domainBackupMX=yes" for each domain in ldap.

Is there anything planned to make this more comfortable?