Need to send emails to an alias, however that alias can only receive mail from a specific user
- I have the “managers@example.com” alias, and that alias has multiple email addresses.
- “managers@example.com” —> “manager1@example.com, manager2@example.com… like that.”
- If specific user sends mail to “managers@example.com,” then “manager1@example.com,manager2@example.com… like that.” will be received.
- Need control; only “md@example.com” can send mail to “managers@example.com.”.
I used the Rspamd rule, as below, and it worked. Is there any other way? Please let me know.
#####
– Only allow specific senders for the “managers@example.com” mailbox
if rcpt == “managers@example.com” then
if from ~= “md@example.com$” then
– Reject emails with any other sender address
rspamd_config:register_symbol({
name = ‘ALLOW_MD_SENDER’,
score = 9999.0, – High score to mark as spam
group = ‘mailcow’,
})
end
end
#####