Commit 792cdad1 authored by Steven Mondji-Lerider's avatar Steven Mondji-Lerider

Updating vhost creation configuration parameter to make the sendmail argument...

Updating vhost creation configuration parameter to make the sendmail argument to be login@<mailname_bounce>
The perpose is to hide the user real mail address while not receiving his bounces.
parent 89ae27ac
#!/bin/bash
# Update domain next-gen by fufroma
for CONFIG_FILE in \
/etc/alternc/local.sh \
/usr/lib/alternc/functions.sh \
......@@ -66,9 +65,9 @@ done
# sub_domaines.web_action = update and sub_domains.only_dns = false
IFS="$NEWIFS"
mysql_query "
select concat_ws('$IFS',lower(sd.type), if(length(sd.sub)>0,concat_ws('.',sd.sub,sd.domaine),sd.domaine), m.mail, sd.valeur )
from sub_domaines sd,membres m
where sd.compte=m.uid and sd.web_action ='UPDATE'
select concat_ws('$IFS',lower(sd.type), if(length(sd.sub)>0,concat_ws('.',sd.sub,sd.domaine),sd.domaine), concat_ws('@',m.login,v.value), sd.valeur )
from sub_domaines sd,membres m, variable v
where sd.compte=m.uid and sd.web_action ='UPDATE' and v.name='mailname_bounce'
;" | while read type domain mail valeur ; do
host_create "$type" "$domain" "$mail" "$valeur"
mysql_query "update sub_domaines sd set web_action='OK',web_result='$?' where lower(sd.type)='$type' and if(length(sd.sub)>0,concat_ws('.',sd.sub,sd.domaine),sd.domaine)='$domain' and sd.valeur='$valeur'; "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment