On 4/15/2011 4:14 AM, Jannis Kafkoulas wrote:
Hi,

Sometimes we receive mails with sender-domain our company,
i.e. from: any...@mycompany.com to: some...@mycompany.com which we'd like to 
block (the entire domain).
Can it be done e.g. by header checks?
Or is it possible at all?

You can block mail from the outside that has your domain as the envelope sender. This will have a fairly low (but non-zero) false positive rate.

You should not block mail from the outside that has your domain in the From: header. This will have a high false positive rate.

To block your domain in the envelope, use something like:

# main.cf
smtpd_recipient_restrictions =
  permit_mynetworks
#uncomment next line if using SASL
#  permit_sasl_authenticated
  reject_unauth_destination
  check_sender_access hash:/etc/postfix/sender_access
  ... other local rules ...


# sender_access
mydomain   REJECT mydomain not allowed in unauthenticated mail




  -- Noel Jones

Reply via email to