Turn on PHP Error at Runtime

Sometimes when working with PHP , it is convenient to enable error temporarily on one particular page  to troubleshoot an issue.
If you want to enable error for just one page at runtime, use one of the followings.

<?php
// report all error on that page
error_reporting(E_ALL);
...
?>

or

<?php
// Report all PHP errors
error_reporting(-1);
...
?>

or

<?php
// Same as _reporting(E_ALL);
ini_set('error_reporting', E_ALL);
...
?>

When you are done fixing the issue, you can just remove it.

Reference
http://www.php.net/manual/en/function.error-reporting.php

fatal: parameter “smtpd_recipient_restrictions (POSTFIX)

maillog error message

fatal: parameter “smtpd_recipient_restrictions”: specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit.

Like the error message states: we need to add one of the followings in the smtpd_recipient_restriction section:
check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit.

Just add it. See my smtpd_recipient_restrictions below

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

Make sure you restart your POSTFIX server

Linux DNS Useful Websites

Linux DNS Useful Websites

If you ever tried to play with DNS, you will appreciate the following websites. DNS is just like programming the old PBX systems: you spend a great deal of time setting it up (anger, sleepless night , you name it) then you do not touch it in another 6 months or years.

Setting up DNS With Webmin
http://rimuhosting.com/support/bindviawebmin.jsp

DNS with Webmin
http://doxfer.com/Webmin/BINDDNSServer

BIND
http://www.centos.org/docs/5/html/5.2/Deployment_Guide/ch-bind.html

Centos Manual
http://www.centos.org/docs/5/

Setup DNS on Centos
http://www.lamolabs.org/blog/282/how-to-setup-a-dns-server-on-centos-5/

IBM DNS
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Frzakk%2Frzakkconceptbasic.htm

Could not open connection to the host on port 25: connect failed (POSTFIX)

Could not open connection to the host on port 25: connect failed (Postfix)

Are you getting this error when trying to connect to your Postfix server from a remote computer ?
Here are the steps that resolved this issue for me:

1.  Make sure DNS is fine and that you can ping the mail server from the remote Computer.

2.  Make sure that there is no firewall blocking the connections.

3.  Make sure that your ISP is not blocking port 25

4.  Make sure that you can telnet the mail server locally (on the same computer).

5.  Most importantly , Make sure you set up the  inet_interfaces flag accordingly:
    #inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost

6.  Make sure your MX record is set