En/Na Bitt Faulk ha escrit:
> If you're trying to implement a blavk-box solution, you'll have to go to a
> lot of effort, using qmail's delivery defaults mechanisms in order to get
> it to deliver to users who do not have an account on that system.
Not really, you can use /var/qmail/users/assign (see man qmail-users) to
accomplish that effortlessly for individual addresses or for all of them. In
my case I have
+:alias:<uid of alias user>:<gid of mail group>:/var/qmail/alias:-::
in /var/qmail/users/assign (don't forget ro run qmail-newu each time you
modify this file).
This tells qmail that mail for all users is handled by the alias user,
and then
| ./deliver-wrapper
in /var/qmail/alias/.qmail-default
Someone posted here a deliver wrapper for qmail, this is
my version of it
(note that the Q option doesn't exist in deliver, I wrote
a patch against 1.6.24 to tell delivery that Qmail is being used and the
sender
envelope address is in an environment variable, so sieve vacation
will work even without LMTP).
###############################################
# Local delivery through cyrus
#
# get the username (before the first -)
#
userid="`echo "${LOCAL%%-*}" | tr "A-Z" "a-z"`"
# change - with dots
mailbox="`echo "$EXT2" | tr "A-Z" "a-z" | sed "s/-/./g"`"
if [ "$mailbox" = "" ]
then
# direct delivery to user INBOX
/usr/cyrus/bin/deliver -e -Q "$userid"
else
# send to a user mailbox
/usr/cyrus/bin/deliver -e -Q -m "$mailbox" -a "$userid" "$userid"
fi
#modify delivery exit code to something understandable by qmail
case $? in
64|65|66|67|68|76|77|78)
exit 100
;;
0)
exit 0
;;
*)
exit 111
;;
esac
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007