38 lines
919 B
Markdown
38 lines
919 B
Markdown
# Spoof Milter
|
|
Postfix does not provide libmilter so you will need to install that
|
|
```
|
|
apt install libmilter
|
|
```
|
|
may be provided by sendmail-devel on some systems
|
|
|
|
You will also need to install pymilter
|
|
```
|
|
pip install pymilter
|
|
```
|
|
|
|
## Installation
|
|
in /etc/postfix/mail.cf
|
|
```
|
|
smtpd_milters = inet:localhost:<portnumber> ...other filters...
|
|
```
|
|
Write systemd thing to run milter
|
|
```
|
|
/some/where/opendkim -l -u userid -p inet:<portnumber>@localhost ...other options...
|
|
```
|
|
|
|
### Other notes
|
|
Different milter settings for different client IP addresses
|
|
```
|
|
/etc/postfix/main.cf:
|
|
smtpd_milter_maps = cidr:/etc/postfix/smtpd_milter_map
|
|
smtpd_milters = inet:host:port, { inet:host:port, ... }, ...
|
|
|
|
/etc/postfix/smtpd_milter_map:
|
|
# Disable Milters for local clients.
|
|
# do this for local waterloo
|
|
127.0.0.0/8 DISABLE
|
|
192.168.0.0/16 DISABLE
|
|
::/64 DISABLE
|
|
2001:db8::/32 DISABLE
|
|
```
|