Corey Hickman via Postfix-users:
> Hello
> 
> I have basic postfix/dovecot installation.
> How can I setup postfix or dovecot to reject the specified domain in sender?
> I know I can setup sieve script to discard messages from that
> domain, but this method sounds rather rigid.

If the list is short, it can go in main.cf:

/etc/postfix/main.cf:
    smtpd_sender_restrictions = inline:{
        { example.com = reject }
        { other.example = reject} }

Otherwise some external file will do:

/etc/postfix/main.cf:
   smtpd_sender_restrictions = hash:/etc/postfix/sender-access

/etc/postfix/sender-access:
    example.com reject
    other.example reject

Run "postmap /etc/postfix/sender-access" after editing the file.

> Or shall I install rspamd etc to make a reject policy for that?

That would work too, as long as rspamd etc care called from a Postfix
SMTP daemon that receives mail directly from the network (not from
a Postfix SMTP daemon that receives mail from a content filter).

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to