Limit sending email forwarding

Discussion in 'General' started by marceloleaes, Jul 2, 2024.

  1. marceloleaes

    marceloleaes New Member

    In some domains, I create email forwarding lists with all emails from the domain, for example [email protected], and each user of this domain receives a copy of the email sent.

    In some cases, I need to limit that only 1 user can send to this list, and also limit that external users cannot send to this address.

    How to make?
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Don't setup E-Mail Forwarding then. Just create a mailbox and setup a sieve rule for this mailbox to handle this with a condition filter.
    Something like this should do the trick (Be aware this is untest, you need to test this for yourself):

    Code:
    if address :is "from" "[email protected]" {
        setflag "\\Seen";
        fileinto "INBOX";
        redirect :copy "[email protected]";
        redirect :copy "[email protected]";
        redirect :copy "[email protected]";
        redirect :copy "[email protected]";
    } else {
        discard;
        stop;
    }

    Usefull ressources:
    https://doc.dovecot.org/configuration_manual/sieve/examples/
    https://www.fastmail.help/hc/en-us/articles/360058753794-Sieve-examples
    https://support.tigertech.net/sieve
     
    Taleman likes this.

Share This Page