Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried installing EHCP recently, which was a disaster because it's not optimized for keeping your database on a separate machine from the mail server--"localhost" is hard-coded just about everywhere.

After following these deceptively simple directions for uninstalling EHCP, I cannot send mail because my postfix installation was heavily reconfigured by EHCP's installation script.

What are the steps in fixing my postfix configuration, assuming I did not make a backup of my postfix directory before attempting to install?

share|improve this question
It might be worth checking if the install left the original files intact in /etc/postfix, otherwise simply restore from backup. – gparent May 21 '13 at 14:27
Could someone with 300 points please tag this question "ehcp" – Isaac Betesh May 21 '13 at 14:34

Restoring them from a backup, naturally, or from your configuration repository like etckeeper or your config management system.

If you don't have any of those, you'll end up doing your configuration work again.

share|improve this answer

Before trying this, I made /etc/postfix a git repo and made a commit of the current (post-EHCP) state.

  1. In /etc/postfix, I deleted the following files:

    (git) rm -r cacert.pem cakey.pem mysql-virtual_* sasl/ smtpd.cert smtpd.key

That left only the following files remaining:

  1. I removed the following lines from configuration:


ehcp_autoreply unix - n n - - pipe
  argv=/var/www/ehcp/misc/autoreply.php $sender $recipient


myhostname = ip-[FILTERED IP ADDRESS]
relayhost = 
mynetworks =,,,,
broken_sasl_auth_clients = yes
smtp_use_tls = yes
tls_random_source = dev:/dev/urandom
debug_peer_list = 
sender_canonical_maps = 

I also removed from every line containing 'mysql', 'smtpd' or 'virtual'

  1. I made the following changes in

    I changed the line beginning with "mydestination = " to: mydestination = $myhostname, localhost.$mydomain, localhost

    I uncommented the line "mynetworks style = hosts"

    I changed "debug_peer_level" from 1 to 2 (I don't think this part was really necessary).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.