- Plesk for Linux
How to make sure that a particular message is rejected by greylisting?
There are two options.
- The first one is monitoring mail server log:
- Login to the server over SSH
- Enable Postfix debug logging
/var/log/maillogand make a seach by sender mail address. The following entries show that a message was rejected by greylisting:
CONFIG_TEXT: Oct 24 09:57:29 user journal: greylisting filter: Starting greylisting filter...
Oct 24 09:57:29 user /usr/lib64/plesk-9.0/psa-pc-remote: handlers_stderr: REJECT
Oct 24 09:57:29 user/usr/lib64/plesk-9.0/psa-pc-remote: REJECT during call 'grey' handler
Oct 24 09:57:29 user/usr/lib64/plesk-9.0/psa-pc-remote: Message aborted.
Oct 24 09:57:29 userpostfix/smtpd: reply: SMFIR_REJECT data 0 bytes
Oct 24 09:57:29 user postfix/smtpd: 5EEFD13C0057: milter-reject: DATA from unknown[203.0.113.2]: 550 5.7.1 Command rejected; from=<[email protected]> to=<[email protected]>
The second option is monitoring greylisting database:
- Enable 'penalty' parameter:
# /usr/local/psa/bin/grey_listing -u -penalty-status true
Wait for the required message non-delivery event (until the event from the "REJECT during call 'grey' handler" event is logged, for example) occurrence and check the greylisting database. In the example below, the blockCount field value is increased to '1':
Disable the 'penalty' parameter:
# /usr/local/psa/bin/grey_listing -u -penalty-status false
Note: Keeping the 'penalty' setting enabled is not recommended on a production server, but for diagnostics purpose, it can be temporarily enabled.