Stop a certain domain sending any email?

Discussion in 'Server Operation' started by edge, Jun 26, 2009.

  1. edge

    edge Active Member Moderator

    Is it possible to block one domain that I'm hosting on my ISPconfig2 system to send e-mail with postfix?

    Why?? I know that it sounds stupid, but some person found a way to send email through an application that I'm hosting.

    I'm working on a fix for this application, but for now the easiest (and fastest) way to fix this is to stop ANY email that is beeing send from this domain. Receiving email for this domain must still work!

    Thank you for any info on this.
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. edge

    edge Active Member Moderator

    That looks promising.
    Thank you
     
  4. edge

    edge Active Member Moderator

    Okay.

    To stop (discard) domain XYZ.TLD to send email with postfix use this in the /etc/postfix/header_checks
    Code:
    /^From: .*@XYZ\.TLD>/ DISCARD
     
    Last edited: Jun 28, 2009

Share This Page