Difference between revisions of "Qpsmtpd:relay"

From SME Server
Jump to navigationJump to search
(Created page with "<span id="_top">Qpsmtpd#Plugins</span> = SYNOPSIS = relay - control whether relaying is permitted = DESCRIPTION = relay - check the following pl...")
 
(No difference)

Latest revision as of 13:36, 30 July 2017

Qpsmtpd#Plugins

SYNOPSIS

relay - control whether relaying is permitted

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.

CONFIG

Enable this plugin by adding it to config/plugins above the rcpt_* plugins

 # other plugins...

 relay

 # rcpt_* go here

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

 - 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
     ...

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.

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.

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:

  relay only 1

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

LICENSE

This software is free software and may be distributed under the same terms as qpsmtpd itself.