Difference between revisions of "Postfix/Postgrey"

From ArchWiki
Jump to: navigation, search
(recategorize to avoid redirect after the old category has been renamed (https://github.com/lahwaacz/wiki-scripts/blob/master/recategorize-over-redirect.py))
(Add reminder about --inet and --unix not working together, postfix uses the socket implementation.)
Line 26: Line 26:
  
 
Now you can edit it. For example, to add automatic whitelisting (successful deliveries are whitelisted and don't have to wait any more), you could add the {{ic|<nowiki>--auto-whitelist-clients=N</nowiki>}} option and replace {{ic|N}} by a suitably small number (or leave it at its default of 5).
 
Now you can edit it. For example, to add automatic whitelisting (successful deliveries are whitelisted and don't have to wait any more), you could add the {{ic|<nowiki>--auto-whitelist-clients=N</nowiki>}} option and replace {{ic|N}} by a suitably small number (or leave it at its default of 5).
 +
 +
== Troubleshooting ==
 +
 +
If you specify --unix=/path/to/socket and the socket file is not created ensure you have removed the default --inet=127.0.0.1:10030 from the service file.
  
 
For a full documentation of possible options see {{ic|perldoc postgrey}}.
 
For a full documentation of possible options see {{ic|perldoc postgrey}}.

Revision as of 18:36, 28 November 2016

Merge-arrows-2.pngThis article or section is a candidate for merging with Postfix.Merge-arrows-2.png

Notes: Short enough, and Postfix is already listing other addons. (Discuss in Talk:Postfix/Postgrey#)

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: See Help:Style. (Discuss in Talk:Postfix/Postgrey#)

Postgrey can be used to enable greylisting for a Postfix mail server.

Installation

Install the postgrey package. To get it running quickly edit the Postfix configuration file and add these lines:

/etc/postfix/main.cf
smtpd_recipient_restrictions =
  check_policy_service inet:127.0.0.1:10030

Then start/enable the postgrey service. Afterwards, reload the postfix service. Now greylisting should be enabled.

Configuration

Configuration is done via editing the greylist.service file. First copy it over to edit it.

# cp /usr/lib/systemd/system/postgrey.service /etc/systemd/system/

Now you can edit it. For example, to add automatic whitelisting (successful deliveries are whitelisted and don't have to wait any more), you could add the --auto-whitelist-clients=N option and replace N by a suitably small number (or leave it at its default of 5).

Troubleshooting

If you specify --unix=/path/to/socket and the socket file is not created ensure you have removed the default --inet=127.0.0.1:10030 from the service file.

For a full documentation of possible options see perldoc postgrey.