3,045 bytes added
, 13:36, 30 July 2017
<span id="_top">[[Qpsmtpd#Plugins]]</span>
= [[#___top|SYNOPSIS]] =
relay - control whether relaying is permitted
= [[#___top|DESCRIPTION]] =
relay - check the following places to see if relaying is allowed:
''$ENV{RELAYCLIENT}''
''config/norelayclients'', ''config/relayclients'', ''config/morerelayclients''
The search order is as shown and cascades until a match is found or the list is exhausted.
Note that ''norelayclients'' is the first file checked. A match there will override matches in the subsequent files.
= [[#___top|CONFIG]] =
Enable this plugin by adding it to config/plugins above the rcpt_* plugins
<pre> # other plugins...
relay
# rcpt_* go here</pre>
== [[#___top|relayclients]] ==
A list of IP addresses that are permitted to relay mail through this server.
Each line in ''relayclients'' is one of: - a full IP address
<pre> - partial IP address terminated by a dot or colon for matching whole networks
192.168.42.
2001:db8:e431:ae06:
...
- a network/mask, aka a CIDR block
10.1.0.0/24
2001:db8:e431:ae06::/64
...</pre>
== [[#___top|morerelayclients]] ==
Additional IP addresses that are permitted to relay. The syntax of the config file is identical to ''relayclients'' except that CIDR (net/mask) entries are not supported. If you have many (>50) IPs allowed to relay, most should likely be listed in ''morerelayclients'' where lookups are faster.
== [[#___top|norelayclients]] ==
''norelayclients'' allows specific clients, such as a mail gateway, to be denied relaying, even though they would be allowed by ''relayclients''. This is most useful when a block of IPs is allowed in relayclients, but several IPs need to be excluded.
The file format is the same as morerelayclients.
== [[#___top|RELAY ONLY]] ==
The relay only option restricts connections to only clients that have relay permission. All other connections are denied during the RCPT phase of the SMTP conversation.
This option is useful when a server is used as the smart relay host for internal users and external/authenticated users, but should not be considered a normal inbound MX server.
It should be configured to be run before other RCPT hooks! Only clients that have authenticated or are listed in the relayclient file will be allowed to send mail.
To enable relay only mode, set the '''only''' option to any true value in ''config/plugins'' as shown:
<pre> relay only 1</pre>
= [[#___top|AUTHOR]] =
2012 - Matt Simerson - Merged check_relay, check_norelay, and relayonly
2006 - relay_only - John Peackock
2005 - check_norelay - Copyright Gordon Rowell <gordonr@gormand.com.au>
2002 - check_relay - Ask Bjorn Hansen
= [[#___top|LICENSE]] =
This software is free software and may be distributed under the same terms as qpsmtpd itself.
<!-- Generated Sun Jul 30 08:35:34 EDT 2017 using
perldoc -T -ohtml /usr/share/qpsmtpd/plugins/relay |pandoc -f html -t mediawiki |sed 1 i\\n\n\n<span id="_top">[[Qpsmtpd#Plugins]]</span> |sed -e s#</d.>##
-->
----
[[Category:Qpsmtpd|relay]]