postfix - php -mysql setup problems!!

Discussion in 'Server Operation' started by matto1376, Nov 28, 2005.

  1. matto1376

    matto1376 New Member

    hello, here goes, I need some help from someone with a bigger brain!! mine is exhausted after getting through the how-to for fedora 4!! (great job on that by the way!!)

    so far, things have worked, I have ISPConig running and am able to setup and serve multiple sites in a static environment.

    so my next challenge is to get active pages and mail happening.....which is were I'm stalling. I can't get a php script to process, (formemail) and I'm not sure where to start and diagnose. mail doesn't seem to work either, are there any more detailed checks I can run?

    as I said, I followed the perfect setup and things have been good until now, I'm just not sure where to go from here!!

    thanks in advance, and sorry for the ignorance.
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

  3. matto1376

    matto1376 New Member

    tried test files.....

    thanks for the reply.....!
    i have tried the test files....the php file gives me alot of config info. is that what i should have expected and is there anything in that output that would be of interest?

    ssi.shtml gives me a page with this:
    Dynamic HTML with Server Side Includes
    Date/Time on the server:
    Name of this HTML file:
    Installed server software:
    Your web browser:

    with the other file i wasn sure what to do other than what was in the test file post.

    sorry to not be of more of a help, but what do you suggest from here??what else can i tell you to further describe whats going on?

    thanks!
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    This means you don't see the source code of the PHP file in the browser? Then PHP is working!:)

    Is it possible that your formemail problem is realted to register_globals? http://www.howtoforge.com/forums/showthread.php?t=87
     
  5. matto1376

    matto1376 New Member

    im getting there...!!!!

    ive read a lot of forum posts in the last 36 hours.....what a wealth of knowledge!! im getting exicted cause things are starting to work....

    ok, this means php is working....cool
    i have now sorted out mail in the internal network, that is, i can send a message between 2 users that i have created on a site in ISPconfig. I had to adjust the postfix config file to have the right host.

    but, how to I get my mx records in dns sorted?? is this what i have to do next?

    I am now trying to send a mail message from an external domain into my network. this is what I get from the external mail server when i try to send outside in:

    Date: Tuesday, November 29, 2005 11:07 AM
    From: Mail Administrator <Postmaster@mx.bigpond.com> Add to address book
    To: matto@bigpond.com Add to address book
    Subject: Mail System Error - Returned Mail
    Attachment: 2

    View message details
    This Message was undeliverable due to the following reason:

    Each of the following recipients was rejected by a remote mail server.
    The reasons given by the server are included to help you determine why
    each recipient was rejected.

    Recipient: <matt@mydomain.com.au>
    Reason: 5.7.1 <matt@mydomain.com.au>... Relaying denied


    Please reply to <Postmaster@mx.bigpond.com>
    if you feel this message to be in error.


    i will post what my mail log says when i try to send from mydomain.com.au to an external (bigpond.com) address.
    i guess its something to do with this mx thing??


    thanks!!
    matt
     
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please post the output of
    Code:
    dig mx mydomain.com.au
     
  7. matto1376

    matto1376 New Member

    more info....

    [root@mydomain ~]# dig mx mydomain.com.au

    ; <<>> DiG 9.3.1 <<>> mx mydomain.com.au
    ;; global options: printcmd
    ;; connection timed out; no servers could be reached


    whats doing here?! what haven´t i done??

    by the way, if i try and send a mail message to an external domain from mine, this is what i get in the mail log.....


    Nov 29 11:27:55 mydomain postfix/smtp[20706]: 697E417466E: to=<matto@bigpond.com>, relay=none, delay=21, status=deferred (Host or domain name not found. Name service error for name=bigpond.com type=MX: Host not found, try again)
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's in /etc/resolv.conf?
     
  9. matto1376

    matto1376 New Member

    unchartered territory here for me...im reading as much as i can!!

    ; generated by /sbin/dhclient-script
    nameserver 192.168.0.1

    thanks
     
  10. matto1376

    matto1376 New Member

    mail sending now works to external domain

    ok, i read about the dns issue someone else had. i plugged in different DNS servers in resolv.conf and now it relays. it must not have liked my dhcp dns.
    but it seems i have a dns problem.....can´t receive mail from an external domain.
    this is from the mail log :

    Nov 30 02:00:08 domain postfix/smtp[6201]: D5F9117464E: to=<root@my.domain>, relay=none, delay=1, status=bounced (Host or domain name not found. Name service error for name=my.domain type=A: Host not found)
    Nov 30 02:00:08 domain postfix/qmgr[6039]: D5F9117464E: removed

    im not sure about this dns setup or how to check if itś set up correctly.
    today my isp got me to setup my server as a domain child namserver, what does this mean exactly??
    inside my own network i obviously want to resolve my sites to my own server with a private ip, but outside i want the public....the public internet side is cool, but the inside, hmmm.....what do i do there?
    bit confused now!!
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Run
    Code:
    dig A my.domain
    and see if you get an Answer Section.
     
  12. matto1376

    matto1376 New Member

    dig a results

    [root@domain ~]# dig a my.domain

    ; <<>> DiG 9.3.1 <<>> a oc.apatula
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 42903
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;my.domain. IN A

    ;; AUTHORITY SECTION:
    . 1130 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2005112900 1800 900 604800 86400

    ;; Query time: 342 msec
    ;; SERVER: 145.253.2.75#53(145.253.2.75)
    ;; WHEN: Wed Nov 30 10:11:18 2005
    ;; MSG SIZE rcvd: 103


    thats for my local server....for the domain i am trying to send mail to which is hosted on this server, the dig a result is:

    ;; QUESTION SECTION:
    ;www.mattsdomain.com.au. IN A

    ;; ANSWER SECTION:
    www.mattsdomain.com.au. 38146 IN A 144.135.130.10

    ;; Query time: 343 msec
    ;; SERVER: 145.253.2.75#53(145.253.2.75)
    ;; WHEN: Wed Nov 30 10:15:17 2005
    ;; MSG SIZE rcvd: 58

    so it resolves to a public ip.....when queried from my server...am I giving you the right info??

    here is the mx result for mattsdomain.com.au......

    ; <<>> DiG 9.3.1 <<>> mx mattsdomain.com.au
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2901
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mattsdomain.com.au. IN MX

    ;; ANSWER SECTION:
    mattsdomain.com.au. 38400 IN MX 10 mx1.netserver.com.au.
    mattsdomain.com.au. 38400 IN MX 20 mx2.netserver.com.au.
    mattsdomain.com.au. 38400 IN MX 50 mx3.netserver.com.au.

    ;; Query time: 743 msec
    ;; SERVER: 145.253.2.75#53(145.253.2.75)
    ;; WHEN: Wed Nov 30 10:17:13 2005
    ;; MSG SIZE rcvd: 109

    I can conclude so far that obtaining dns for a sever via dhcp settings causes problems...
    did you know what this domain child nameserver is??

    thanks!!
    matt
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    This means when you send an email to mattsdomain.com.au it is sent to mx1.netserver.com.au. I don't think mx1.netserver.com.au is your server!?
     
  14. matto1376

    matto1376 New Member

    you guys must get a good laugh out of some of these fiascos!!

    thats right, that mx1.netserver.com.au is the address of the isp that used to host mattsdomain before I decided to rig up my own linux box at home....they redelegated dns to point to my adsl router, but I take it they also have to change the MX records.....??
    I'll investigate and post what happens!

    thanks!
    matt
     
  15. matto1376

    matto1376 New Member

    mx sorted

    i just spoke to the isp and they said the mx records had not been changed, just the ip address the domain was pointing to.
    so hopefully once that propagtes things will be ok.
    then i will test the php script again.
     
  16. matto1376

    matto1376 New Member

    here is the latest....

    an aside...
    all my services except mysql now report as offline in ispconfig
    but they still work....?


    with the mail,

    <1133336268.6487.4.camel@apatula> Queued mail for delivery)
    Nov 30 18:38:27 apatula postfix/qmgr[5423]: 2DDAD174648: removed
    Nov 30 18:44:49 apatula postfix/smtpd[7634]: connect from imta08ps.mx.bigpond.com[144.140.83.193]
    Nov 30 18:44:49 apatula postfix/smtpd[7634]: C1DF2174648: client=imta08ps.mx.bigpond.com[144.140.83.193]
    Nov 30 18:44:49 apatula postfix/cleanup[7638]: C1DF2174648: message-id=<31353817.1133336683983.JavaMail.root@web03ps>
    Nov 30 18:44:49 apatula postfix/qmgr[5423]: C1DF2174648: from=<mattoconnell@bigpond.com>, size=771, nrcpt=1 (queue active)
    Nov 30 18:44:49 apatula postfix/smtpd[7634]: disconnect from imta08ps.mx.bigpond.com[144.140.83.193]
    Nov 30 18:44:50 apatula postfix/smtp[7639]: C1DF2174648: to=<web15_matt@apatula.apatula>, orig_to=<matt@cattlecountry.com.au>, relay=none, delay=1, status=bounced (Host or domain name not found. Name service error for name=apatula.apatula type=A: Host not found)
    Nov 30 18:44:50 apatula postfix/cleanup[7638]: C3DF4174655: message-id=<20051130074450.C3DF4174655@oc.apatula>
    Nov 30 18:44:50 apatula postfix/qmgr[5423]: C3DF4174655: from=<>, size=2645, nrcpt=1 (queue active)
    Nov 30 18:44:50 apatula postfix/qmgr[5423]: C1DF2174648: removed
    Nov 30 18:44:52 apatula postfix/smtp[7642]: C3DF4174655: to=<mattoconnell@bigpond.com>, relay=extmail.bigpond.com[144.140.90.13], delay=2, status=sent (250 Message received: 20051130074448.EXKP20305.imta05sl.mx.bigpond.com@oc.apatula)
    Nov 30 18:44:52 apatula postfix/qmgr[5423]: C3DF4174655: removed


    these are the actual domains by the way.....oc.apatula is me
    dig mx of my receiving domain now points to my public ip on my router

    any ideas here??! dont you get sick of this?!
     
  17. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    ISPConfig monitors your services on 127.0.0.1. If you have configured your services to run on another IP address than 127.0.0.1, ISPConfig will show them as offline even if they are working...

    apatula.apatula doesn't exist in DNS. So either you set up your own DNS server in your local network and create apatula.apatula on it and then enter this name server in /etc/resolv.conf, or you enter apatula.apatula in /etc/hosts.
     
  18. matto1376

    matto1376 New Member

    working now....

    ok so finally it works!!
    it just needed an A record on my server of the right address. crazy.
    so now onto the php formemail script. i will put that in a seperate thread i think!

    thanks for your help falko, ur a patient man.
     

Share This Page