Hi Michelle On 14/Apr/10 17:34, Michelle Konzack wrote: > Am 2010-04-06 10:35:21, hacktest Du folgendes herunter: >> I posted a slightly expanded version of the code above in >> >> http://www.mail-archive.com/courier-users@lists.sourceforge.net/msg27715.html >> >> At any rate, virtual domains apparently work well even without SUID. > > I have compiled the "rcptfilter" and installed the "rcptfilter.sh" in > the ${HOME} of my testuser, but the script is never executed. > > I have: > > 1) /usr/sbin/rcptfilter
It is enabled by echo /usr/sbin/rcptfilter > /etc/courier/maildropfilter That runs rcptfilter in stead of maildrop for the embedded mode (a.k.a. "whitelisting API"). If called, it will log something unless everything runs super-smooth. > 2) /home/testlooser/mailfilters/rcptfilter The $HOME/.mailfilters/* files are done by maildrop, so they won't play if you use the above maildropfilter setting > 3) > ----[ '/home/testlooser/rcptfilter.sh' ]-------------------------------- > #!/bin/bash > > DIR=${HOME} > > DATE=`date +%Y%m%d_%H%M%S` > > if [ ! -d ${DIR}/log ] ; then > mkdir -p ${DIR}/log > fi > > echo "$*">>${DIR}/log/${DATE}.log > echo>>${DIR}/log/${DATE}.log > echo > "########################################################################">>${DIR}/log/${DATE}.log > echo>>${DIR}/log/${DATE}.log > env>>${DIR}/log/${DATE}.log > echo>>${DIR}/log/${DATE}.log > echo > "########################################################################">>${DIR}/log/${DATE}.log > echo>>${DIR}/log/${DATE}.log > cat>>${DIR}/log/${DATE}.log You may want to also test stderr, e.g. printf '#err\n##warning\n###notice\n####info\n' >&2 (handling those '#'s is the only cumbersome code of rcptfilter.c) > exit 0 > ------------------------------------------------------------------------ > > 4).. > ----[ '/home/testlooser/.courier' ]------------------------------------- > | /usr/bin/preline /usr/bin/procmail > ------------------------------------------------------------------------ > > 5).. > ----[ '/home/testlooser/.courier-dfault' ]------------------------------ > | /usr/bin/preline /usr/bin/procmail > ------------------------------------------------------------------------ Irrelevant: delivery instruction are not affected by maildropfilter settings > and nothing happen... the messages arrived INBOX without any traces in > the system. Did you try invoking it manually, just to check it runs? E.g. HOME=/home/testlooser rcptfilter -M rcptfilter -D nnn/mmm (where nnn/mmm are some numeric uid/gid) ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users