• caglararli@hotmail.com
  • 05386281520

Whitelist mail domains and users to smtp on mail server

Çağlar Arlı      -    17 Views

Whitelist mail domains and users to smtp on mail server

Lately our mail server (postfix 2.9.6, ubuntu 12.04, courier) got compromised by spammers that are send plenty of dummy mails to many recipients.

The spammers used two different ways:

  1. using real domain on my server but fake user account that didn't exist
  2. using fake sender mail (user and domain),

I had to blacklist each one by one on /etc/postfix/main.cf:

smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

/etc/postfix/sender_access:

fake-domain.com   DISCARD
fakeuser@realdomain.com DISCARD

Is there a way to secure my server more as to allow only some white-list that contains the server's real domain and all user accounts I have, and block any other fake senders?