1 (edited by HV 2013-05-10 18:11:02)

Topic: forward to internal domain

==== Required information ====
- iRedMail version:  1.6.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  iRedAdmin-Pro-MySQL
- Linux/BSD distribution name and version: openSUSE 12.2 (i586)
- Related log if you're reporting an issue:
====
Hello,
I have a problem with email forwarding to other user in intranet domain. When I set some internet domain, everything is OK. When I set intranet domain (it does not exist in internet) after apply this addres is not in "Forward mails to address" field.
Old forward settings to intranet domain works fine and are visible
Thank you for your help
P.S. It became after upgrade, perhaps

2

Re: forward to internal domain

What do you mean "intranet domain"? Is it available by querying your internal DNS server?

Postfix queries non-hosted mail domains against DNS server(s) defined in /etc/resolv.conf (actually, /var/spool/postfix/etc/resolv.conf, you must keep them the same), if your "intranet domain" is available in your DNS server, it should work.

3 (edited by HV 2013-05-10 20:17:07)

Re: forward to internal domain

Yes, intranet domain is only on iRedMail server. It is intranet master DNS.
The file /var/spool/postfix/etc/resolv.conf contain:
nameserver 127.0.0.1
It is the same like /etc/resolv.conf
I can resolve the host.intranet from the system. MX record is correct. Forwards that exists is OK but I can not make another one.

4

Re: forward to internal domain

Is it possible for you to create a testing alias account forwarding to this intranet domain? Then send a testing email and paste us the full SMTP session log to help troubleshoot.

5 (edited by HV 2013-05-10 20:36:57)

Re: forward to internal domain

I am not an intranet mail server admin. I can not make test account here. But if I add alias and I want to add new members from intranet domain, it is the same situation, the "Members" field is clear after apply .
As I wrote. I can send emails to mail.intranet server from iRedMail.

6

Re: forward to internal domain

Well, i'm confused.

HV wrote:

I have a problem with email forwarding to other user in intranet domain. When I set some internet domain, everything is OK. When I set intranet domain (it does not exist in internet) after apply this addres is not in "Forward mails to address" field.

Could you please show us sample email addresses of both internal and intranet domains?

7 (edited by HV 2013-05-10 21:54:22)

Re: forward to internal domain

Of sure. Domains are real, names are not.
External address is: name@cak.cz
Internal address is: name@posta.intranet

From log:
May 10 14:46:15 mail postfix/smtp[20409]: D5F87D053E4: to=<name@posta.intranet>, relay=posta.intranet[192.168.171.5]:25, delay=0.31, delays=0.19/0/0/0.12, dsn=2.6.0, status=sent (250 2.6.0  <518D0802.05E.00206B6AD445.minolta-name2@cak.cz> Queued mail for delivery)
May 10 14:46:15 mail postfix/smtp[20489]: 47C42D053BB: to=<name@posta.intranet>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.9, delays=0.53/0/0/1.4, 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 D5F87D053E4)

DNS:
posta           IN      A       192.168.171.5
posta.intranet. IN      MX      10 posta.intranet.

8

Re: forward to internal domain

Could you please paste Postfix log of full SMTP session related to your testing email? I cannot find error in the log you pasted.

9 (edited by HV 2013-05-10 22:14:07)

Re: forward to internal domain

I have no error in log. I am only can not set addres with domain @posta.intranet in iRedAdmin as forward address

10

Re: forward to internal domain

Oh, i know why it happens. The domain name "@posta.intranet" is not considered as an valid domain name in iRedAdmin-Pro.
You can fix it with below steps:

*) Open file libs/iredutils.py, find below line:

# Mail address. +, = is used in SRS rewritten addresses.
regx_email = r'''[\w\-][\w\-\.\+\=]*@[\w\-][\w\-\.]*\.[a-zA-Z]{2,6}'''

# Domain name
regx_domain = r'''[\w\-][\w\-\.]*\.[a-z]{2,6}'''

You can simply replace '6' with '8' (length of string "intranet" in your intranet domain name) in above two lines, then restart Apache to reload modified code file. Now add your intranet address as forwarding address again, it should now be saved correctly.

Let me know whether it works for you or not.

WARNING: iRedAdmin will use '6' in above two code lines, so you have to update them after upgrading iRedAdmin. Maybe it's a good idea to use something like "intranet.com" or "fake-intranet.com" as your intranet domain if possible.

11

Re: forward to internal domain

BINGO smile
I know intranet is not good name but I am sure that domain does not exist wink
Thank you very much