MoinQ:

1. s/qmail/DOC/postgrey

初見の相手は5分待たせる。

https://postgrey.schweikert.ch/

qmail-postgrey: https://www.fehcom.de/sqmail/man/qmail-postgrey.html

environment variable POSTGREY sslserver's CDB providing a connection IP address and the port, the servers listens to:

=:allow,POSTGREY="127.0.0.1:60000"

結局 apt get で postgreyをインストールする。 (/usr/bin/postgrey へ)

...

Adding system user `postfix' (UID 111) ...
Adding new user `postfix' (UID 111) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 121) ...
Done.
setting myhostname: skr
setting alias maps
setting alias database
changing /etc/mailname to dnsz.org
setting myorigin
setting destinations: $myhostname, dnsz.org, skr, localhost.localdomain, localho
st
setting relayhost: 
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix (main.cf) is now set up with a default configuration.  If you need to 
make changes, edit /etc/postfix/main.cf (and others) as needed.  To view 
Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run 'service postfix reload'.

Running newaliases
Setting up libhttp-date-perl (6.02-1) ...
Setting up libio-socket-inet6-perl (2.72-2) ...
Setting up libnet-ssleay-perl (1.84-1ubuntu0.2) ...
Setting up libnet-dns-perl (1.10-2) ...
Setting up libio-socket-ssl-perl (2.060-3~ubuntu18.04.1) ...
Setting up libcgi-fast-perl (1:2.13-1) ...
Setting up libhttp-message-perl (6.14-1) ...
Setting up libnet-rblclient-perl (0.5-3) ...
Setting up libnet-server-perl (2.009-1) ...
Setting up postgrey (1.36-5) ...

Creating config file /etc/postgrey/whitelist_clients with new version

Creating config file /etc/postgrey/whitelist_recipients with new version

Creating config file /etc/default/postgrey with new version
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for rsyslog (8.32.0-1ubuntu4) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.46) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
tmaeno@skr:/package/mail/sqmail/sqmail/service$ 

1.1. server

HOST_IP="127.0.0.1"
HOST_PORT="60000"
PIDFILE_DIR="/var/qmail/etc/"
WHITELIST_CLIENTS="/var/qmail/etc/whitelist_clients"
WHITELIST_RECIPIENTS="/var/qmail/etc/whitelist_recipients"
touch $WHITELIST_CLIENTS
touch $WHITELIST_RECIPIENTS
mkdir -p /var/spool/postfix/postgrey
chown postgrey /var/spool/postfix/postgrey
chmod +s /var/spool/postfix/postgrey
DBDIR_PATH="/var/qmail/etc/"
POSTGREY_DIR=" ../../Postgrey/postgrey-1.36"
# Assuming postgrey is not in the $PATH
exec 2>&1 # Logging!
exec ${POSTGREY_DIR}/postgrey -v --inet="$HOST_IP:$HOST_PORT" \\
        --whitelist-clients="$WHITELIST_CLIENTS" \\
        --whitelist-recipients="$WHITELIST_RECIPIENTS" \\
        --dbdir="$DBDIR_PATH" \\
        --pidfile="$PIDFILE_DIR"
#       --user=qmaild --group=nofiles

MoinQ: s/qmail/DOC/postgrey (last edited 2021-05-07 11:06:32 by ToshinoriMaeno)