Rule to stop mail from being sent except to specific user

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Rule to stop mail from being sent except to specific user

Post by entropicsinkhole » 2010-04-19 19:32

5.3.2 B. 1769

I want to create a rule that restricts an account from sending to ANY email account except one specific account

The Criteria part seems pretty basic:

'From Equals restrictedaccount@mydomain.com'
AND
'To Not Equals allowedrecipient@mydomain.com'

But there doesn't seem to be an Action that fits what I want to do, which is block the email from being sent, throwing up an error message that indicates it can't be sent. Suggestions?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Rule to stop mail from being sent except to specific use

Post by ^DooM^ » 2010-04-19 20:26

You can't send an error message with a rule, you will need to use a script.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Rule to stop mail from being sent except to specific use

Post by entropicsinkhole » 2010-04-19 20:28

Darn. Thanks!

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Rule to stop mail from being sent except to specific use

Post by ^DooM^ » 2010-04-19 22:20

I am pretty sure rules are ran after the client has disconnected which is why you would need to use a script. It's the same reason why my request to add spam score through a rule cannot be done without major changes.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Rule to stop mail from being sent except to specific use

Post by mattg » 2010-04-20 01:37

Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply