Forwarding mail

Discussion in 'Installation/Configuration' started by jysse, Sep 8, 2005.

  1. jysse

    jysse New Member

    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
     
  2. till

    till Super Moderator

    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.
     
  3. jysse

    jysse New Member

    More information

    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
     
  4. till

    till Super Moderator


    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.
     
  5. jysse

    jysse New Member

    Same name

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

    Jysse
     
  6. till

    till Super Moderator

    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
     
  7. jysse

    jysse New Member

    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
     
  8. falko

    falko Super Moderator

    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.
     
  9. jysse

    jysse New Member

    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
     
  10. falko

    falko Super Moderator

    Is machinename.domain1.com a Co-Domain of the web site www.domain1.com? If so, remove it!
     
  11. jysse

    jysse New Member

    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
     
  12. falko

    falko Super Moderator

    What's in /etc/hosts? Can you post that file here?
     
  13. jysse

    jysse New Member

    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... :eek:

    Jysse
     
  14. falko

    falko Super Moderator

    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...
     
  15. jysse

    jysse New Member

    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
     
  16. jysse

    jysse New Member

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

    Jysse
     
  17. till

    till Super Moderator

    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:
     
  18. jysse

    jysse New Member

    still having problems

    Many thanks for your support so far. :)

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

    Jysse
     

Share This Page