On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("WScript.Network")
Set objUser = GetObject("LDAP://" & objNetwork.ComputerName)
objUser.Put "someComputerAttribute", objSysInfo.UserName
objUser.SetInfo
add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue
$email=Read-Host 'What is eMail?'
get-recipient -results unlimited | where {$_.emailaddresses -match $email} | select name,emailaddresses,recipienttype|Out-GridView
server {
listen 80;
server_name data.exemple.com;
if ($http_host ~ "(?i)(data\.exemple\.com)$") {
rewrite ^(.*) /web/$1 last;
}
location /web// {
proxy_pass http://data.exemple.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 500;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert/mail.crt;
ssl_certificate_key /etc/nginx/conf.d/cert/mail.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
server_name mx.example.com;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
if ($http_host ~ "(?i)(mx\.example\.com)$") {
rewrite ^(.*) /web/$1 last;
}
location /web// {
proxy_pass https://mx.example.com;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 500;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}