Postfix local-host-name

Discussion in 'Installation/Configuration' started by citronz, Nov 7, 2007.

  1. citronz

    citronz New Member

    Aloha!

    Run out own ideas. Here is setup:
    Machine with ISPConfig with web service only (public).
    DNS name subdomain.domain.tld.
    Web hosts www.domain.tld and test.domain.tld.

    Mail for domain.tld is configured and working fine on another machine.
    MX records are working fine and I'm pretty sure it is not a DNS trouble.
    So far so good. But when machine tries to send out email (with php mail() function) all mails goes well except to [email protected]

    The reason for this is because in /etc/postfix/local-host-names above line
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    is record domain.tld and therefor in mail log i can see:

    Nov 4 00:01:23 subdomain sendmail[13538]: lA3M1N5n013538: [email protected], ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30522, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown

    Which is true - on this machine there are no such user. The question is - how to get rid of domain.tld in /etc/postfix/local-host-names

    In ISPConfig websites are configured with External Mailserver. No Co-domains. Just two websites there www.domain.tld and test.domain.tld. domain.tld web goes as ServerAlias to www.domain.tld.

    Also I've tried to modify manually /etc/postfix/local-host-names and after postfix restart everything works fine for a while ..till I make some changes in ISPConfig again :cool:

    Any help appreciated! Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please make sure that the commands:

    hostname

    and hostname -f

    do not return domain.tld
     
  3. citronz

    citronz New Member

    [[email protected] ~]# hostname
    subdomain.domain.tld
    [[email protected] ~]# hostname -f
    subdomain.domain.tld

    Now Im sure for 101% :)
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Is this problem solved, or do you still see domain.tld in /etc/postfix/local-host-names?
     
  5. citronz

    citronz New Member

    No, problem not solved. Just temporary solution - manually modifying
    /etc/postfix/local-host-names and restarting postfix each time I have changes in ISPConfig.
    Any clues from where that host is taken? So it's not in ISPConfig (only as ServerAlias in Aapche options), not in hostname, not in /etc/hosts.
    I run out of ideas where it can come from.

    Thanks!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you set domain.tld as co domain in one of your websites?
     
  7. citronz

    citronz New Member

    No, not now. I experemented with this. Putting domain.tld there as Co-domain of ww.domain.tld and setting mailserver to Extrenal, but no changes happend.
    Should it be there?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Any errors in /home/admispconfig/ispconfig/ispconfig.log? What's the output of
    Code:
    ls -la /root/ispconfig
    ?
     
  9. citronz

    citronz New Member

    /home/admispconfig/ispconfig/ispconfig.log shows only INFO reports. No errors there. Only actions when I do something in ISPConfig.

    Code:
    ls -la /root/ispconfig
    total 104
    drwxr-xr-x  9 root root  4096 2007-11-08 19:54 .
    drwxr-x---  7 root root  4096 2007-11-06 15:17 ..
    -rwxr-xr-x  1 root root 33004 2007-10-21 21:06 cronolog
    -rwxr-xr-x  1 root root  9673 2007-10-21 21:06 cronosplit
    drwxr-xr-x 12 root root  4096 2007-10-21 20:36 httpd
    drwxr-xr-x 15 root root  4096 2007-10-21 21:06 isp
    -rw-r--r--  1 root root     8 2007-11-08 19:54 .old_path_httpd_root
    drwxr-xr-x  6 root root  4096 2007-10-21 20:35 openssl
    drwxr-xr-x  6 root root  4096 2007-10-21 20:42 php
    drwxr-xr-x  4 root root  4096 2007-10-21 21:06 scripts
    drwxr-xr-x  4 root root  4096 2007-10-21 21:06 standard_cgis
    drwxr-xr-x  2 root root  4096 2007-10-21 21:06 sv
    -rwx------  1 root root  9389 2007-10-21 21:06 uninstall
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Looks ok so far.

    Did you set the mailserver of the Co-Domain to external? You can do that on the Options tab under Co-Domains.
     
  11. citronz

    citronz New Member

    Yes, this is how setup looks like at the moment. Mailserver is External. Maybe I should remove domain.tld as Co-domain? Now I have domain.tld- as Co-domain and as ServerAlias in Options for www.domain.tld. But I can't see nothing wrong with that.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    You dont have to remove the co-domain, just set mailserver to external under options of the co-domain.
     
  13. citronz

    citronz New Member

    Somehow that won't work.
    But it works fine for another domains and also works fine on other machines.

    However - this will be resolved cause I've plan to make same machine as mailserver for that domain too.
     

Share This Page