Skip to content

test recipients.1

Manvendra Bhangui edited this page Feb 25, 2024 · 4 revisions

NAME

test-recipients - Test Recipients in MySQL or via RECIPIENTS extension.

SYNOPSIS

test-recipients -r | -s [ -t timeout ] addr

DESCRIPTION

test-recipients(1) tests recipients by checking it in in indimail's MySQL database or by using the recipients extension. The recipients extension in indimail-mta is an adaptation of the recipients extension from s/qmail at https://www.fehcom.de/sqmail/sqmail.html.

The -r option makes test-recipients do chdir to /etc/indimail directory. It then opens the control/recipients. If there are any rules to open a cdb database in the recipients control file, it will be opened relative to the current working directory of qmail-cdb which will be sysconfdir. You can override /etc/indimail by setting SYSCONFDIR environment variable and override /etc/indimail/control by setting CONTROLDIR environment variable.

The -s option makes test-recipients loads the indimail.so shared library. This enables submittig query to inlookup(8) daemon using the inquery(3) function. The default timeout used to get result from inlookup(8) daemon is 60 seconds and can be changed by specifying the -t timeout argument. Note that to submit query to inlookup daemon, you will require access to run/indimail/inlookup directory owned by indimail:qmail with 0770 permissions. You will also require write access to FIFOs in this directory owned by qmaild:indimail with 0660 permissions.

qmail-smtpd(8) checks recipients in RCPT TO dialog when the environment variable CHECKRECIPIENT is set and rejects email when the recipient is missing. Rejecting emails during SMTP session enables rejecting emails immediately rather than accepting it and bouncing it later.

test-recipient(1) is located in /usr/libexec/indimail directory.

NOTES

The inlookup daemon creates named pipes that can be accessed by qmaild user. To test users in MySQL it is neccessary to execute it with the privileges of the user qmaild

In run/indiail/inlookup, run refers to /run or /var/run depending on the OS.

$ sudo bash
# setuidgid -g qmail qmaild test-recipients -s [email protected]
# setuidgid -g indimail indimail env FIFO_MODE=0666 \
  test-recipients -s [email protected]

SEE ALSO

qmail-smtpd(8), inlookup(8), inquery(3) qmail-cdb(8), make-recipients(1)

Clone this wiki locally