If your having the issue where you send a email to a email account on your Ispconfig server and you receive a message like this:

Relay Access Denied State 14

You will need to double check your postfix config. Run this command below to fix two entries in your postfix install.

postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
postconf -e 'mydestination = /etc/postfix/local-host-names'

After that restart postfix.

service postfix restart

And you should no longer receive that message.

I recently ran into this issue, and I know there are many others out there having this issue. The problem is simple, postfix runs but it doesn’t respond to telnet requests. This normally is due to the fact postfix isn’t running properly and something isn’t configured properly. In my case a recent update causes postfix to be switched to a seconded mta and exim was the main mta. Because of this, when I started postfix, I would get a line like this in the maillog:

fatal: open database /etc/aliases.db: No such file or directory

Most said to just run newaliases but when I did, it didn’t create the /etc/aliases.db file that needs to be there. This is exactly what I did to get everything back in order, bare in mind I use centos 5.6 x64 in this example.

1. Reset the MTA back to postfix:
alternatives --config mta

Selected postfix, which was number 2 in the selection and hit enter. Now Postfix is the main MTA.

2. Run newaliases
newaliases

3. Confirm everything

Check to make sure /etc/aliases.db was created. Double check your postfix/main.cf config

4. Reload postfix

Once you checked both files you should now have a working install of postfix. Reload postfix, and then check your maillog for any other errors.

service postfix reload

You can send emails but you cannot receive emails. People that send you email get a message similar to this one:

May 1 03:14:52 mail postfix/smtp[62798]: 23CA4BD6B40: to=, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.example.com loops back to myself)

Postfix did found a dns reply to your email server, but it hasn’t been configured to deal with address such as root@mail.example.com. In other words, your server is configured to accept user@example.com but not as user@mail.example.com. This is well known config problem with virtual domain. To fix this error either add system FQDN to mydestination or relay_domains. Postfix accepts mail for domain listed in virtual_mailbox_domains, virtual_alias_domains, and domains that resolve to IP addresses listed in inet_interfaces and proxy_interfaces. Update mydestination using postconf or by editing main.cf file:

mydestination = localhost.$mydomain, localhost, mail.example.com

Once you are done:
service postfix reload

If you run ISPConfig, you need to edit the local-host-names file in the postfix folder.

vi /etc/postfix/local-host-names

MAKE SURE YOU ADD AFTER (#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####)
And add your host name to your server. I.E. I had to add server2039.myhosting.com to it and it fixed it.
Of course don’t forget to reload postfix.

service postfix reload