# postfix spam figthing

## petterg

Hi guys

What's your opinions on these ideas?

1a) Blacklist own domain

Lots of spam that arrives has from-adress equal to the servers hostname or domainname. Wouldn't there be an idea to set something like

```

smtpd_recipient_restrictions=

 reject_non_fqdn_recipient,

 permit_mynetworks,

 permit_sasl_authenticated,

 [b]reject_mydomainnames[/b]

```

This would stop unauthenticated IP's or unauthenticated users from sending mails using the servers own domainnames. Would it work? Disadvantages? What would be the best way to configure this? (note: virtual domains)

1b) 

Lots of spam that arrives has from-header equal to the to-header. Is it posible to stop mails where sender adress = rcpt adress? Disadvantages? What would be the best way to configure this?

2)

What kills the smtp server is when someone send a spammail to nonexistingUser@someOtherDomain.tld using existingUser@myDomain.tld as sender. This causes thousands of bounced mails from mailer-deamon@someOtherDomains.tld arrive within a few minutes. What would be the best way to stop such using the minimum of resources?

----------

## magic919

I think 1a and 1b amount to the same thing.  It is possible to restrict Postfix to do this.  This would probably cover your needs - http://www.postfix.org/RESTRICTION_CLASS_README.html#external

You can do anything about back-scatter mail.

----------

