Changes between Version 107 and Version 108 of SystemAdministration/Default_VM_setup
- Timestamp:
- 09/28/18 13:26:32 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SystemAdministration/Default_VM_setup
v107 v108 182 182 ln -s deploy-assets/control-script/control.sh control.sh)" 183 183 }}} 184 ### Postfix configuration for host email (script) -> run as it is ###184 ### Postfix configuration for host email (script) -> define "SMTP_USER" "SMTP_PWD" and run as it is ### 185 185 186 186 {{{ … … 188 188 189 189 DOMAIN=clarin.eu 190 HOSTNAME=$(hostname -f) 190 191 ROOT_EMAIL=sysops@${DOMAIN} 191 192 SMTP_ADDR=vps.transip.email:587 … … 194 195 195 196 196 yum install cyrus-sasl cyrus-sasl-plain sendmail197 yum install postfix cyrus-sasl cyrus-sasl-plain 197 198 198 199 postconf -e "inet_protocols=ipv4" 199 200 postconf -e "mydomain=${DOMAIN}" 200 postconf -e "myhostname= `hostname | sed -E "s/\./-/g"`"201 postconf -e "myhostname=${HOSTNAME}" 201 202 postconf -e "myorigin=\$myhostname" 202 203 postconf -e "mydestination=\$myhostname,localhost.\$mydomain,localhost" … … 215 216 postconf -e "smtp_tls_note_starttls_offer=yes" 216 217 printf '%s\n' "/^(.+)@(.+)/ ${ROOT_EMAIL}" | tee -a /etc/postfix/virtual &> /dev/null 217 printf '%s\n' "/^(.+)@ ([a-zA-Z0-9\-]+)$/ vps-\${1}_at_\${2}@${DOMAIN}" | tee -a /etc/postfix/canonical &> /dev/null218 printf '%s\n' "/^(.+)@${HOSTNAME}$/ vps-\${1}_at_${HOSTNAME}@${DOMAIN}" | tee -a /etc/postfix/canonical &> /dev/null 218 219 printf '%s\n' "/^From:[[:space:]]+vps\-(.+)_at_(.+)@(.+)/ REPLACE From: \"VPS host mail [\${1}@\${2}]\" <vps-\${1}_at_\${2}@\${3}>" | tee -a /etc/postfix/header_checks &> /dev/null 219 220 printf '%s\n' "${SMTP_ADDR} ${SMTP_USER}:${SMTP_PWD}" | tee -a /etc/postfix/sasl_passwd &> /dev/null