Q0633

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q0633

Question

Why is $domain not set in the smtp transport?

Answer

The smtp transport can handle several recipient addresses at once. This happens by default if the host lists for the addresses are identical. A single copy of the message is sent, using multiple <small>RCPT</small> commands to transmit multiple envelope recipients. The $domain variable is set in the smtp transport only if all the recipient addresses have the same domain. You must have a case where several addresses with different domains resolve to the same set of hosts. If you want to restrict the transport so that it handles only a single domain at once (but still possibly with more than one recipient), set

multi_domain = false

If you want to restrict the transport so that it handles only a single address at once, set

max_rcpt = 1