Mark Constable writes:
On 17/03/16 22:27, Sam Varshavchik wrote:
>> Is something like this possible?
>>
>> DEFAULTDELIVERY="|/usr/bin/maildrop -w 90 -d ${RECIPIENT}"
>
> Make them apostrophes. You don't want variable expansion at the time
> this setting is read, but rather when this is executed at delivery
> time.
I guess you meant something like this?
DEFAULTDELIVERY="|/usr/bin/maildrop -w 90 -V 9 -d '${RECIPIENT}'"
No:
DEFAULTDELIVERY='|/usr/bin/maildrop -w 90 -V 9 -d ${RECIPIENT}'
You want to set DEFAULTDELIVERY to contain exactly that. double-quotes do
shell variable expansion when parsed. RECIPIENT gets set during delivery.
Apostrophes do not do shell variable expansion, so this sets DEFAULTDELIVERY
to contain the actual '${RECIPIENT}', instead of whatever that environment
variable had, if anything, in the inherited environment when the server
starts.
Pedantically, it should be
DEFAULTDELIVERY='|/usr/bin/maildrop -w 90 -V 9 -d "${RECIPIENT}"'
to guard against a wildcard virtual domain alias allowing some clown to
use an address with shell special characters.
pgpcimKi5siit.pgp
Description: PGP signature
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
