Postfix - How to block mails to some address?

Discussion in 'Server Operation' started by thavaht, Sep 11, 2008.

  1. thavaht

    thavaht New Member

    Hi all,

    Is there any way to tell postfix to no longer accept messages to some user mail address in my domain without deleting the account?

    Any help will be appreciated.

  2. memphis

    memphis New Member

    some time ago i have looked for a similar solution.

    Here ist my try in the german forum:


    I have created a file in which i wrote:

    This file i named header-ckeck.pcre

    And in the postfix i fill in this line:
  3. thavaht

    thavaht New Member

    Hi Memphis,

    Thank for your prompt reply. I’m still in doubt.

    The address I want to block mails to is: info[at]ests[dot]ac[dot]mz

    So under /etc/postfix/maps/ I created the file header_check.pcre with the following content:
    In the postfix I added the following line:
    Is that correct?
  4. falko

    falko Super Moderator ISPConfig Developer

    You can do this with the /etc/aliases file. Put something like
    web1_someuser: /dev/null
    (where web1_someuser is the username of the account for which you don't want to receive emails anymore) in it, run
    afterwards and restart Postfix.

Share This Page