# Servico SMTP (Postfix) # Parametro 1: Diretorio onde estao os arquivos de configuracao (modelo) smtp () { get_org DIR_POSTFIX="$1" sed -e "s/LDAP_DN/$LDAP_DN/g" -e "s/DOMAIN/$DOMAIN/g" $DIR_POSTFIX/main.cf > /etc/postfix/main.cf sed -e "s/DOMAIN/$DOMAIN/g" $DIR_POSTFIX/expresso-dominios > /etc/postfix/expresso-dominios sed -e "s/DOMAIN/$DOMAIN/g" $DIR_POSTFIX/transport > /etc/postfix/transport #cp $DIR_POSTFIX/master.cf /etc/postfix/ postmap /etc/postfix/expresso-dominios postmap /etc/postfix/transport } smtp_rhel () { yum -y install postfix smtp $1 service postfix restart chkconfig postfix on } smtp_rhel6 () { RHEL6="rhel/6/etc/postfix" smtp_rhel $RHEL6 } smtp_debian () { apt-get -y install postfix smtp $1 /etc/init.d/postfix restart } smtp_debian-squeeze () { SQUEEZE="debian/squeeze/etc/postfix" smtp_debian $SQUEEZE }