This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
hints:classic_linux_mail_flow [2021/03/02 12:25] admin [Run Procmail and SpamAssassin] |
hints:classic_linux_mail_flow [2021/03/05 17:26] admin [Run Procmail and SpamAssassin] |
||
---|---|---|---|
Line 12: | Line 12: | ||
Postfix then feeds the same message to Rspamd in real time, i.e., while the same SMTP transaction is in progress. | Postfix then feeds the same message to Rspamd in real time, i.e., while the same SMTP transaction is in progress. | ||
- | |||
- | Rspamd does a large number of spam checks, including checking the headers added by OpenDKIM, and checking for DMARC and SPF records in DNS.((For more information about how DKIM, SPF, and DMARC records work, see [[hints: | ||
Rspamd feeds the same message to Clamd, which checks for viruses and returns a result to Rspamd. | Rspamd feeds the same message to Clamd, which checks for viruses and returns a result to Rspamd. | ||
- | Rspamd then returns its final findings to Postfix, which may ask Postfix to: | + | Rspamd does a large number of spam checks, including checking the headers added by OpenDKIM, and checking for DMARC and SPF records in DNS.((For more information about how DKIM, SPF, and DMARC records work, see [[hints: |
+ | |||
+ | Rspamd then returns its final findings to Postfix. These findings | ||
- | * Accept the message because it contains no spam and no virus. | ||
* Reject the message because it contains a virus. | * Reject the message because it contains a virus. | ||
* Reject the message because it contains guaranteed spam. | * Reject the message because it contains guaranteed spam. | ||
* Greylist the message because it contains likely spam. | * Greylist the message because it contains likely spam. | ||
+ | * Accept the message because it contains no spam and no virus. | ||
- | Postfix acts on these findings. It will accept the message from the remote SMTP client, or it will send a permanent rejection reply to the remote SMTP client, or it will do greylisting by sending a temporary rejection to the remote SMTP client (which means try again later).((Most infected Microsoft Windows machines that are part of a botnet being used to send spam will not retry sending the same spam message, so greylisting eliminates almost all spam sent by such machines. The next time the same client sends a message from the same sender to the same recipient, within a predetermined period, it will not be greylisted.)) | + | Postfix acts on these findings. It will send a permanent rejection reply to the remote SMTP client |
If Postfix accepts the message, it expands aliases and domain names until it determines the final recipient, which in Classic Linux is always a Linux user. Let's call that user the first user, also called USER. | If Postfix accepts the message, it expands aliases and domain names until it determines the final recipient, which in Classic Linux is always a Linux user. Let's call that user the first user, also called USER. | ||
Line 44: | Line 44: | ||
Taking into account these preferences, | Taking into account these preferences, | ||
- | Because spam-checking is done in sequence by Rspamd and SpamAssassin, | + | Because spam-checking is done in sequence by Rspamd and SpamAssassin, |
If the first user has a .forward file that sends mail elsewhere, Procmail is not run, and therefore SpamAssassin is not run. | If the first user has a .forward file that sends mail elsewhere, Procmail is not run, and therefore SpamAssassin is not run. | ||
Line 50: | Line 50: | ||
If the first user's .forward file causes mail to go to a second user, then Postfix goes back to the step **check for .forward file** above, and looks for the second user's .forward file, if any. If the second user doesn' | If the first user's .forward file causes mail to go to a second user, then Postfix goes back to the step **check for .forward file** above, and looks for the second user's .forward file, if any. If the second user doesn' | ||
- | If the first user's .forward file causes mail to go off-site (i.e., mail is forwarded to some other place like Gmail, Yahoo, etc.), then SpamAssassin will never run for the first user. However, Rspamd already ran, so guaranteed | + | If the first user's .forward file causes mail to go off-site (i.e., mail is forwarded to some other place like Gmail, Yahoo, etc.), then SpamAssassin will never run for the first user. However, Rspamd already ran, so guaranteed |
===== Spam thresholds ===== | ===== Spam thresholds ===== | ||
Line 60: | Line 60: | ||
Because of Rspamd' | Because of Rspamd' | ||
- | You can make the amount of spam much lower by [[hints: | + | You can make the amount of forwarded |