• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

contrib/H03-May-2022-886497

test/H22-Sep-2016-286214

COPYINGH A D12-Dec-201317.6 KiB340281

ChangesH A D22-Sep-201610.7 KiB294223

READMEH A D23-Jul-2015880 4325

README.eximH A D12-Dec-20132.9 KiB5645

README.mdH A D20-Sep-2016892 3822

policy-testH A D03-May-20226 KiB207119

postgreyH A D03-May-202238 KiB1,092583

postgrey_whitelist_clientsH A D03-May-20229.4 KiB275273

postgrey_whitelist_recipientsH A D03-May-2022198 86

README

1
2
3    Postgrey - a Postfix policy server for greylisting
4    ==================================================
5
6
7Requirements
8------------
9
10- Perl >= 5.6.0
11- Net::Server (Perl Module)
12- IO::Multiplex (Perl Module)
13- BerkeleyDB (Perl Module)
14- Berkeley DB >= 4.1 (Library)
15- Digest::SHA (Perl Module, only for --privacy option)
16- NetAddr::IP
17
18
19Documentation
20-------------
21
22See POD documentation in postgrey. Execute:
23
24  perldoc postgrey
25
26See also Postgrey's homepage:
27
28  http://postgrey.schweikert.ch/
29
30
31Mailing-List and getting Help
32-----------------------------
33
34There is a mailing-list for the discussion of postgrey, where you can
35also ask for help in case of trouble. To subscribe, send a mail with
36subject 'subscribe' to:
37
38  postgrey-request@list.ee.ethz.ch
39
40There is also a mailing-list archive, where you might find answers:
41
42  http://lists.ee.ethz.ch/wws/arc/postgrey
43

README.exim

1Using Postgrey with Exim
2------------------------
3Whilst Postgrey is designed to work with the Postfix MTA it is possible to
4get it to work with Exim.  This isn't the only way to get greylisting to
5work under Exim[1], and it might not even be the easiest.  Postgrey does,
6however, have some advantages over the alternatives that may be useful
7depending on your situation.
8
9In order to get Postgrey and Exim to cooperate we need to get Exim to
10implement enough of Postfix's access policy delegation protocol[2] to be
11able to talk to the Postgrey daemon, which we can do in an acl_smtp_rcpt ACL
12in Exim's config file:
13
14 defer log_message = greylisted host $sender_host_address
15       set acl_m0  = request=smtpd_access_policy\nprotocol_state=RCPT\nprotocol_name=${uc:$received_protocol}\nhelo_name=$sender_helo_name\nclient_address=$sender_host_address\nclient_name=$sender_host_name\nsender=$sender_address\nrecipient=$local_part@$domain\n\n
16       set acl_m0  = ${sg{${readsocket{/var/run/postgrey}{$acl_m0}{5s}{}{action=DUNNO}}}{action=}{}}
17       message     = ${sg{$acl_m0}{^\\w+\\s*}{}}
18       condition   = ${if eq{${uc:${substr{0}{5}{$acl_m0}}}}{DEFER}{true}{false}}
19
20Whilst this ACL looks complicated, all it really does tells Exim to defer
21incoming e-mail if it is greylisted and has no effect once the greylisting
22period is over.  It fails safe in the sense that it'll pass all e-mail
23without deferring it if it can't talk to Postgrey (the hard-coded
24"action=DUNNO").  It's also worth noting that it isn't a full implementation
25of Postfix's policy protocol -- it is just enough to get the greylisting job
26done in a reasonably sane way.
27
28You'll obviously need to adjust the above ACL to match your setup.  In
29particular you might need to change the socket path from /var/run/postgrey.
30You should also check that you're not already using $acl_m0 for something
31else (you can change all occurrences of $acl_m0 to any unused variable
32between $acl_m1 and $acl_m9 if you are).
33
34Postfix's protocol allows for a policy server to prepend a header on
35delivered e-mail, and Postgrey uses this to notify users of how long mail
36was delayed for. If you want to make use of this feature, you need the
37following ACL somewhere under your defer one:
38
39  warn message     = ${sg{$acl_m0}{^\\w+\\s*}{}}
40       condition   = ${if eq{${uc:${substr{0}{7}{$acl_m0}}}}{PREPEND}{true}{false}}
41
42Once you've changed your Exim config, you'll also need to set up and
43configure Postgrey.  You do this as you would for Postfix, except that you
44need to add the --exim option to the postgrey command line.  This alters the
45behavior of Postgrey slightly and makes it close the connection as Exim's
46readsocket expansion expects.
47
48You can test your new configuration using Exim's -bh command line option to
49emulate SMTP sessions from a variety of different places.
50
51--
52- Guy Antony Halse <guy@rucus.ru.ac.za>
53
54[1] http://www.greylisting.org/implementations/exim.shtml
55[2] http://www.postfix.org/SMTPD_POLICY_README.html
56

README.md

1[![Build Status](https://api.travis-ci.org/schweikert/postgrey.svg)](https://travis-ci.org/schweikert/postgrey)
2
3# Postgrey - a Postfix policy server for greylisting
4
5## Requirements
6
7- Perl >= 5.6.0
8- Net::Server (Perl Module)
9- IO::Multiplex (Perl Module)
10- BerkeleyDB (Perl Module)
11- Berkeley DB >= 4.1 (Library)
12- Digest::SHA (Perl Module, only for --privacy option)
13- NetAddr::IP
14
15
16## Documentation
17
18See POD documentation in postgrey. Execute:
19
20    perldoc postgrey
21
22See also Postgrey's homepage:
23
24    http://postgrey.schweikert.ch/
25
26
27## Mailing-List and getting Help
28
29There is a mailing-list for the discussion of postgrey, where you can
30also ask for help in case of trouble. To subscribe, send a mail with
31subject 'subscribe' to:
32
33    postgrey-request@list.ee.ethz.ch
34
35There is also a mailing-list archive, where you might find answers:
36
37   http://lists.ee.ethz.ch/wws/arc/postgrey
38