On 18/03/16 12:20, Sam Varshavchik wrote:
> 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.

Right, I tried that but when I did not get any debug output to tell me
what "maildrop: Changing to /home/etc" was I assumed that it was not
quite the right incarnation so I kept trying other combinations. Then
I reread your maildrop page again and sure enough...

-V is ignored when maildrop runs in delivery mode.

http://www.courier-mta.org/maildrop/maildrop.html

These 2 paragraphs seem to be the most relevant but at no point is it
obvious WHICH $HOME var is going to be used (getent or virtual) but if
I reread the 2nd parargraph a few more times then it could be obvious
that it was referring to the virtual $HOME (the one I want).

> If a filename is not specified on the command line, or if the -d
> option is used, maildrop will run in delivery mode. In delivery mode,
> maildrop changes to the home directory of the user specified by the
> -d option (or the user who is running maildrop if the -d option was
> not given) and reads $HOME/.mailfilter for filtering instructions.
> $HOME/.mailfilter must be owned by the user, and have no group or
> global permissions (maildrop terminates if it does).

> The -d option can also specify a name of a virtual account or
> mailbox. See the makeuserdb(1) manual page in the Courier
> Authentication library's documentation for more information.

Anyway, it seems to be working. I can set the getent $HOME to be root
owned (so that I can use SFTP/SSH chroots) and still have mail delivered
inside that area to the virtual $HOME as was possible with the
courier-maildrop deb package.

Sam, thank you once again... especially for your pedantic help :-)


------------------------------------------------------------------------------
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
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to