custom reject message
modules/config/mail.scm
| 57 | 57 | # instead of /etc/passwd. | |
| 58 | 58 | table passwd file:/etc/mail/passwd | |
| 59 | 59 | ||
| 60 | + | table other-relays file:" relays-file " | |
| 61 | + | table blacklist file:" blacklist-file " | |
| 62 | + | ||
| 63 | + | # A simple spam filter | |
| 64 | + | filter spam-filter phase mail-from match mail-from <blacklist> reject \"555 Your spam level is over NINE THOUSAND!\" | |
| 65 | + | ||
| 60 | 66 | # port 25 is used only for receiving from external servers, and they may start a | |
| 61 | 67 | # TLS session if the want. | |
| 62 | - | listen on " interface " port 25 tls pki lepiller.eu | |
| 68 | + | listen on " interface " port 25 tls pki lepiller.eu filter spam-filter | |
| 63 | 69 | # For sending messages from outside of this server, you need to authenticate and | |
| 64 | 70 | # use TLS. | |
| 65 | 71 | listen on " interface " port 587 tls-require pki lepiller.eu mask-src auth <passwd> | |
… | |||
| 76 | 82 | # If you edit the file, you have to run \"smtpctl update table aliases\" | |
| 77 | 83 | table aliases file:" aliases-file " | |
| 78 | 84 | ||
| 79 | - | table other-relays file:" relays-file " | |
| 80 | - | table blacklist file:" blacklist-file " | |
| 81 | - | ||
| 82 | 85 | # We define some actions | |
| 83 | 86 | action receive maildir virtual <aliases> | |
| 84 | 87 | action outbound relay | |
… | |||
| 91 | 94 | # Then, we reject on some other conditions: | |
| 92 | 95 | ||
| 93 | 96 | # If the mail tries to impersonate us | |
| 94 | - | #match ! from src <other-relays> from any mail-from \"@lepiller.eu\" for any reject | |
| 97 | + | match !from src <other-relays> mail-from \"@lepiller.eu\" for any reject | |
| 95 | 98 | # If it comes from someone on the blacklist | |
| 96 | 99 | match from any mail-from <blacklist> reject | |
| 97 | 100 | ||