0

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?

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

2 Answers 2

1

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.

0

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:

access
canonical
generic
header_checks
main.cf
master.cf
relocated
transport
virtual
  1. I removed the following lines from configuration:

In master.cf:

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

In main.cf:

myhostname = ip-[FILTERED IP ADDRESS]
relayhost = 
mynetworks = 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/16, 10.0.0.0/8,  172.16.1.0/24
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 main.cf every line containing 'mysql', 'smtpd' or 'virtual'

  1. I made the following changes in main.cf:

    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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .