Module for managing IIS SMTP server configuration on Windows servers. The Windows features 'SMTP-Server' and 'Web-WMI' must be installed.
wmi
Get the IPGrant list for the SMTP virtual server.
A dictionary of the IP and subnet pairs.
CLI Example:
salt '*' win_smtp_server.get_connection_ip_list
Get the active log format for the SMTP virtual server.
server (str) -- The SMTP server name.
A string of the log format name.
CLI Example:
salt '*' win_smtp_server.get_log_format
Get all available log format names and ids.
A dictionary of the log format names and ids.
CLI Example:
salt '*' win_smtp_server.get_log_format_types
Get the RelayIpList list for the SMTP virtual server.
server (str) -- The SMTP server name.
A list of the relay IPs.
Note
A return value of None corresponds to the restrictive 'Only the list below' GUI parameter with an empty access list, and setting an empty list/tuple corresponds to the more permissive 'All except the list below' GUI parameter.
CLI Example:
salt '*' win_smtp_server.get_relay_ip_list
Get the value of the setting for the SMTP virtual server.
A dictionary of the provided settings and their values.
CLI Example:
salt '*' win_smtp_server.get_server_setting settings="['MaxRecipients']"
Get the SMTP virtual server names.
A list of the SMTP virtual servers.
CLI Example:
salt '*' win_smtp_server.get_servers
Set the IPGrant list for the SMTP virtual server.
A boolean representing whether the change succeeded.
CLI Example:
salt '*' win_smtp_server.set_connection_ip_list addresses="{'127.0.0.1': '255.255.255.255'}"
Set the active log format for the SMTP virtual server.
A boolean representing whether the change succeeded.
CLI Example:
salt '*' win_smtp_server.set_log_format 'Microsoft IIS Log File Format'
Set the RelayIpList list for the SMTP virtual server.
Due to the unusual way that Windows stores the relay IPs, it is advisable to retrieve the existing list you wish to set from a pre-configured server.
For example, setting '127.0.0.1' as an allowed relay IP through the GUI would generate an actual relay IP list similar to the following:
['24.0.0.128', '32.0.0.128', '60.0.0.128', '68.0.0.128', '1.0.0.0', '76.0.0.0',
'0.0.0.0', '0.0.0.0', '1.0.0.0', '1.0.0.0', '2.0.0.0', '2.0.0.0', '4.0.0.0',
'0.0.0.0', '76.0.0.128', '0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0',
'255.255.255.255', '127.0.0.1']
Note
Setting the list to None corresponds to the restrictive 'Only the list below' GUI parameter with an empty access list configured, and setting an empty list/tuple corresponds to the more permissive 'All except the list below' GUI parameter.
A boolean representing whether the change succeeded.
CLI Example:
salt '*' win_smtp_server.set_relay_ip_list addresses="['192.168.1.1', '172.16.1.1']"
Set the value of the setting for the SMTP virtual server.
Note
The setting names are case-sensitive.
A boolean representing whether all changes succeeded.
CLI Example:
salt '*' win_smtp_server.set_server_setting settings="{'MaxRecipients': '500'}"