How to Restrict Remote Deliveries for an Account

How to block a specific account to send remote messages except to specific recipients.

Solution

We will detail below the steps required to create such a rule for one user:

- Login to the Webadmin interface.
- Click the Security & Filtering button.
- Click the Acceptance & Routing link.
- Click the Advanced Settings tab.
- Click the Add acceptance / routing rule button.
- Type a name for the rule (ex.: restrict_acc).
- In the Conditions section use the selection box to select the Email item from the Sender category and click the Add condition button. Type the local account name for which the restriction must be enforced in the newly added condition.
- For incoming messages that match must be set to ALL of the conditions below.
- In the Conditions section use the selection box to select the Email is local item from the Recipient category and click the Add condition button. Keep the default setting of the condition.
- In the Conditions section use the selection box to select the Email item from the Recipient category and click the Add condition button. After adding this condition select the Is not option and type the remote recipient address to which messages should be allowed. Repeat this step for all the remote addresses to which the local account should be allowed to send messages.
- In the Actions section use the selection box to select the Action item from the SMTP category and click the Add action button. In the newly added action select the Reject option for the SMTP action and type a message that will be issued whenever a message is rejected (Ex: You are not allowed to send messages to this recipient!).
- Click the Save configuration button to save and apply the new rule.
OS: LinuxWindowsFreeBSDNetBSDOpenBSDSolaris
Distros: WindowsDEB based distros amd64FreeBSD 7.x