Skip to content

Instantly share code, notes, and snippets.

@pedropalhari
Last active May 12, 2022 20:03
Show Gist options
  • Save pedropalhari/d346a70794eaabc6d2891111ff839ff4 to your computer and use it in GitHub Desktop.
Save pedropalhari/d346a70794eaabc6d2891111ff839ff4 to your computer and use it in GitHub Desktop.
Disabe mail-in-a-box SPAM. Making all emails go to the inbox.
- Modify the SpamAssassin file
$ nano /etc/spamassassin/local.cf
- Add all domains as whitelisted from SpamAssassin, anywhere on the file
whitelist_from *@*
- Disable postgrey by creating a new .local file with whitelists and whitelisting every domain
$ nano /etc/postgrey/whitelist_clients.local
- Anywhere on the file
/.*/
- You may also try to modify the MIAB managed whitelisted clients, without the ".local" and the end. Though, you are in risk of it being overwritten by a MIAB upgrade.
- Disable Postfix sender address verification
$ nano /etc/postfix/main.cf
- Find the line with "smtpd_sender_restrictions" and remove all restrictions, leaving it as
smtpd_sender_restrictions=
- Restart all processes
$ sudo service spamassassin restart
$ sudo service spampd restart
$ sudo service postfix restart
- (OPTIONAL) Increase redirects to be more than 4 at a time
$ nano /etc/dovecot/conf.d/90-sieve.conf
- (OPTIONAL) Uncomment and modify the following line
sieve_max_redirects = 12
- (OPTIONAL) Restart dovecot
$ sudo service dovecot restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment