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

  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?

  4. falko

    falko Super Moderator Howtoforge Staff

    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?
  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
    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 <[email protected]> Add to address book
    To: [email protected] 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: <[email protected]>
    Reason: 5.7.1 <[email protected]>... Relaying denied

    Please reply to <[email protected]>
    if you feel this message to be in error.

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

  6. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    dig mx
  7. matto1376

    matto1376 New Member

    more info....

    [root@mydomain ~]# dig mx

    ; <<>> DiG 9.3.1 <<>> mx
    ;; 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=<[email protected]>, relay=none, delay=21, status=deferred (Host or domain name not found. Name service error for type=MX: Host not found, try again)
  8. falko

    falko Super Moderator Howtoforge Staff

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

    matto1376 New Member

    unchartered territory here for reading as much as i can!!

    ; generated by /sbin/dhclient-script

  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=<[email protected]>, 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

    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

    ;my.domain. IN A

    . 1130 IN SOA 2005112900 1800 900 604800 86400

    ;; Query time: 342 msec
    ;; SERVER:
    ;; 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:

    ; IN A

    ;; ANSWER SECTION: 38146 IN A

    ;; Query time: 343 msec
    ;; SERVER:
    ;; WHEN: Wed Nov 30 10:15:17 2005
    ;; MSG SIZE rcvd: 58

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

    here is the mx result for

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

    ; IN MX

    ;; ANSWER SECTION: 38400 IN MX 10 38400 IN MX 20 38400 IN MX 50

    ;; Query time: 743 msec
    ;; SERVER:
    ;; 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??

  13. falko

    falko Super Moderator Howtoforge Staff

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

    matto1376 New Member

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

    thats right, that 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!

  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[]
    Nov 30 18:44:49 apatula postfix/smtpd[7634]: C1DF2174648:[]
    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=<[email protected]>, size=771, nrcpt=1 (queue active)
    Nov 30 18:44:49 apatula postfix/smtpd[7634]: disconnect from[]
    Nov 30 18:44:50 apatula postfix/smtp[7639]: C1DF2174648: to=<[email protected]>, orig_to=<[email protected]>, 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=<[email protected]>
    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=<[email protected]>,[], delay=2, status=sent (250 Message received: [email protected]ula)
    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

    ISPConfig monitors your services on If you have configured your services to run on another IP address than, 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