postfix.sh 280 B

1234567891011
  1. #!/bin/bash
  2. trap "postfix stop" EXIT
  3. sed -i "/^user/c\user = ${DBUSER}" /opt/postfix/conf/sql/*
  4. sed -i "/^password/c\password = ${DBPASS}" /opt/postfix/conf/sql/*
  5. sed -i "/^dbname/c\dbname = ${DBNAME}" /opt/postfix/conf/sql/*
  6. postfix -c /opt/postfix/conf start
  7. sleep infinity