After having some problems with ISPConfig mail, I reinstalled the lot on my dedicated server again today. The server name is: apollo.danieldavies.co.uk Code: root@apollo:/# hostname apollo.danieldavies.co.uk I am following the guide line by line for Ubuntu 5.10, and everything worked really well. I pointed the DNS server for my domain, studio-e.co.uk at my dedicated server. danieldavies.co.uk DNS is managed elsewhere, so i created two a records, ns1.danieldavies.co.uk and ns2.danieldavies.co.uk both to apollo. I created one account for the site, studio-e.co.uk, web1_daniel. I added the IMAP account to Evolution and sent a couple of test mails which were received, and I replied to them. Squirrelmail worked well also, allowed me to send an recieve. The problem came when I added a php contact form to my website. I have tried using both: Code: $from = "email@example.com"; mail("$to", "$subject", "$msg", "$headers", "-f$from"); and mail("$to", "$subject", "$msg", "$headers""); I sent an email through both mail functions, and it did not work either time. I also can no longer send or recieve emails to firstname.lastname@example.org from external accounts such as hotmail/gmail. No error emails are received when sending, and I have this showing up in the log when I send from the php form. Here is the output I get from tail -f on /var/log/mail.log: Code: Jan 31 21:03:05 apollo sendmail: l0VL355k008672: Authentication-Warning: apollo.danieldavies.co.uk: www-data set sender to email@example.com using -f Jan 31 21:03:05 apollo sendmail: l0VL355k008672: firstname.lastname@example.org, size=438, class=0, nrcpts=1, msgid=<200701312103.l0VL355k008672@apollo.danieldavies.co.uk>, relay=www-data@localhost Jan 31 21:03:06 apollo sm-mta: l0VL365O008673: from=<email@example.com>, size=788, class=0, nrcpts=1, msgid=<200701312103.l0VL355k008672@apollo.danieldavies.co.uk>, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1] Jan 31 21:03:06 apollo sendmail: l0VL355k008672: firstname.lastname@example.org, email@example.com (33/33), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30438, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l0VL365O008673 Message accepted for delivery) Jan 31 21:03:06 apollo sm-mta: l0VL365O008673: to=<firstname.lastname@example.org>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120788, relay=studio-e.co.uk. [126.96.36.199], dsn=4.0.0, stat=Deferred: Connection refused by studio-e.co.uk. And the tail output when I try using mail without the "-f$form" Code: Jan 31 21:05:56 apollo sendmail: l0VL5ufA008725: from=www-data, size=438, class=0, nrcpts=1, msgid=<200701312105.l0VL5ufA008725@apollo.danieldavies.co.uk>, relay=www-data@localhost Jan 31 21:05:57 apollo sm-mta: l0VL5vWm008726: from=<email@example.com>, size=681, class=0, nrcpts=1, msgid=<200701312105.l0VL5ufA008725@apollo.danieldavies.co.uk>, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1] Jan 31 21:05:58 apollo sendmail: l0VL5ufA008725: firstname.lastname@example.org, ctladdr=www-data (33/33), delay=00:00:02, xdelay=00:00:01, mailer=relay, pri=30438, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l0VL5vWm008726 Message accepted for delivery) Jan 31 21:05:58 apollo sm-mta: l0VL5vWm008726: to=<email@example.com>, ctladdr=<firstname.lastname@example.org> (33/33), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=120681, relay=studio-e.co.uk. [188.8.131.52], dsn=4.0.0, stat=Deferred: Connection refused by studio-e.co.uk. As I said, this was working before I tried to use the PHP mail, so I am confident that all the is correct, and Maildir is selected in the settings > mail. You can view the phpinfo() here: http://www.studio-e.co.uk/info.php. /etc/postfix/main.cf Code: smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no #delay_warning_time = 4h myhostname = apollo.danieldavies.co.uk alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname #mydestination = apollo.danieldavies.co.uk, dev.bytemark.co.uk, localhost.bytemark.co.uk, localhost relayhost = mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtpd_tls_auth_only = no smtp_use_tls = yes smtpd_use_tls = yes smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom mailbox_command = home_mailbox = Maildir/ mydestination = /etc/postfix/local-host-names virtual_maps = hash:/etc/postfix/virtusertable /etc/postfix/virtusertable Code: email@example.com web1_daniel firstname.lastname@example.org web1_daniel email@example.com web1_daniel firstname.lastname@example.org web1_daniel /etc/postfix/local-host-names Code: localhost apollo.danieldavies.co.uk localhost.apollo.danieldavies.co.uk localhost.danieldavies.co.uk www.studio-e.co.uk studio-e.co.uk I have a feeling that the failed mails from the form are staying in some kind of queue, which is preventing all future email getting through. Firstly, can anyone suggest anyway to get the php mail() function working Secondly, how can I clean out the queue, so all the failed emails are removed from the system Thanks in advance to anyone who can give any assistance on this issue. If anymore info is needed please ask.