PDA

View Full Version : Forwarding mail


jysse
8th September 2005, 14:41
If I set mail forwarding to a certain user it work's okay. After I remove this setting (and save) forwarding is still active.
How do I remove it permanently ?

Jysse

till
8th September 2005, 15:31
If I set mail forwarding to a certain user it work's okay. After I remove this setting (and save) forwarding is still active.
How do I remove it permanently ?

Jysse

Forwarding is removed if you empty the forwaring field and click on save.
It may take up to a minute until the changed forwarding information is saved to the config files.

jysse
9th September 2005, 09:53
Forwarding is removed if you empty the forwaring field and click on save.
It may take up to a minute until the changed forwarding information is saved to the config files.

I did try that and found that problem is not related to mail forwarding. It's something with the mail system.
This is a little bit difficult to explain but I'll try with my bad english.
I have two domains. Let's say they are domain1.com and domain2.com.
Mail services with domain1.com works ok. In domain2.com there is mail user called info@domain2.com. Before I set this mail forwarding like this info@domain2.com goes to user1@domain1.com. When I removed this setting mail is still received by user1@domain1.com
I tested more and found out that no matter what mail address I use to domain2.com it goes to user1@domain1.com.
Example: mailto info@domain2.com > goes to user1@domain1.com
mailto xxx@domain2.com (does not exist) > goes to user1@domain1.com

These two isp sites have same kind of settings. Only difference that I found
is PHP Safe mode. It is enabled in domain2.com.

Jysse

till
9th September 2005, 10:16
I did try that and found that problem is not related to mail forwarding. It's something with the mail system.
This is a little bit difficult to explain but I'll try with my bad english.
I have two domains. Let's say they are domain1.com and domain2.com.
Mail services with domain1.com works ok. In domain2.com there is mail user called info@domain2.com. Before I set this mail forwarding like this info@domain2.com goes to user1@domain1.com. When I removed this setting mail is still received by user1@domain1.com
I tested more and found out that no matter what mail address I use to domain2.com it goes to user1@domain1.com.
Example: mailto info@domain2.com > goes to user1@domain1.com
mailto xxx@domain2.com (does not exist) > goes to user1@domain1.com

These two isp sites have same kind of settings. Only difference that I found
is PHP Safe mode. It is enabled in domain2.com.

Jysse


As i understand you have a website in ISPConfig with the domain domain1.com. Is domain1.com also the domainname of your Server?

Postfix cant handle email correctly when the domainname of the server is identical to the domainname of one of the virtual sites. Postfix then routes all email to the first site.

jysse
9th September 2005, 10:22
As i understand you have a website in ISPConfig with the domain domain1.com. Is domain1.com also the domainname of your Server?

Postfix cant handle email correctly when the domainname of the server is identical to the domainname of one of the virtual sites. Postfix then routes all email to the first site.

Yes, that's correct, they are with the same name. Can you tell me how do I fix it ?

Jysse

till
9th September 2005, 10:46
Yes, that's correct, they are with the same name. Can you tell me how do I fix it ?

Jysse

Try to change your hostname to something like server1.domain1.com, maybe that is enough:

echo server1.domain.com > /etc/hostname
/bin/hostname -F /etc/hostname

Then set the new server hostname in the ispconfig configuration file:

/home/admispconfig/ispconfig/lib/config.inc.php

jysse
9th September 2005, 11:22
Try to change your hostname to something like server1.domain1.com, maybe that is enough:

echo server1.domain.com > /etc/hostname
/bin/hostname -F /etc/hostname

Then set the new server hostname in the ispconfig configuration file:

/home/admispconfig/ispconfig/lib/config.inc.php

I was not correct with these settings. Here is some more information. Hope it helps, thanx so far. :)

from server:
/etc/hostname = machinename.domain1.com

From ispconfig (domain1):

server = machinename.domain1.com
hostname = www
domain = domain1.com
ip address = 192.168.1.2

Domain2:

server = machinename.domain1.com
hostname = www
domain = domain2.com
ip address = 192.168.1.2

falko
9th September 2005, 18:03
What's in /etc/postfix/main.cf as myhostname or mydomain? I guess it's www.domain1.com so you should change it to machinename.domain1.com and restart Postfix.

jysse
10th September 2005, 08:24
What's in /etc/postfix/main.cf as myhostname or mydomain? I guess it's www.domain1.com so you should change it to machinename.domain1.com and restart Postfix.

Sorry, it's already machinename.domain1.com ...

I tried to restart postfix but same problem exist. Any more suggestions ?
Shall I examine logs and if so which one ?

Jysse

falko
11th September 2005, 19:13
Is machinename.domain1.com a Co-Domain of the web site www.domain1.com? If so, remove it!

jysse
11th September 2005, 19:39
Is machinename.domain1.com a Co-Domain of the web site www.domain1.com? If so, remove it!

Checked that from ispconfig but it was not so. Although there was and empty co-domain which had only ip (servers) but no name. I removed it.
Also I changed nameserver's ip's to correct values but problem still exists.
I have a feeling that I have misunderstood something with settings.

Shall I try to change server's hostname ? I have not tried it yet.

Thanks, Jysse

falko
11th September 2005, 19:48
What's in /etc/hosts? Can you post that file here?

jysse
11th September 2005, 20:20
What's in /etc/hosts? Can you post that file here?

127.0.0.1 localhost.localdomain localhost machinename
192.168.1.2 machinename.domain1.com machinename

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

machinename is a replacement for the real name... :o

Jysse

falko
11th September 2005, 20:37
Can you try to put a completely different hostname into /etc/postfix/main.cf (e.g. www.example.com) and restart Postfix? Just for testing purposes...

jysse
11th September 2005, 20:57
Can you try to put a completely different hostname into /etc/postfix/main.cf (e.g. www.example.com) and restart Postfix? Just for testing purposes...

Tried that too with a line:

myhostname = www.example.com

Same problem continues. I have not said it before but sending mail works fine from both domains.

Jysse

jysse
13th September 2005, 07:40
Tried that too with a line:

myhostname = www.example.com

Same problem continues. I have not said it before but sending mail works fine from both domains.

Jysse

Can somebody help me with this ? Still having the same problem...

Jysse

till
13th September 2005, 08:50
I've no idea what it might be than the things falko already posted. Falko will be back from hollidays in 2 days, maybe he has another idea :cool:

jysse
15th September 2005, 07:40
I've no idea what it might be than the things falko already posted. Falko will be back from hollidays in 2 days, maybe he has another idea :cool:

Many thanks for your support so far. :)

Falko, I know that you are busy but can you help me with this ?

Jysse