Pure-ftpd: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
(added vpopmail) |
||
Zeile 2: | Zeile 2: | ||
[[Bild:Pure-ftpd_1.0.21-4_i386.deb|Backport]]<br> | [[Bild:Pure-ftpd_1.0.21-4_i386.deb|Backport]]<br> | ||
[[Bild:Pure-ftpd-common 1.0.21-4 all.deb|BP]] | [[Bild:Pure-ftpd-common 1.0.21-4 all.deb|BP]] | ||
=vpopmail als Auth-Backend= | |||
from http://www.qmailinfo.org/index.php/Horde-Procmail-Filters<br> | |||
das ganze wird benötigt, um von Horde aus z.b. den Mailfilter (maildrop) zu ändern. | |||
/etc/init.d/pure-ftpd-vpopmail | |||
/usr/sbin/pure-authd_vpopmail | |||
<pre> | |||
#!/bin/bash | |||
# ftpauth: This program is called by pure-authd to check if the email l/p are correct | |||
# Copyright (C) 2005 Roman Volf | |||
# This program is free software; you can redistribute it and/or | |||
# modify it under the terms of the GNU General Public License | |||
# as published by the Free Software Foundation; either version 2 | |||
# of the License, or (at your option) any later version. | |||
# This program is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU General Public License for more details. | |||
# You should have received a copy of the GNU General Public License | |||
# along with this program; if not, write to the Free Software | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
VPOPHOME=/var/vpopmail | |||
## Do not change anything below here | |||
PATH=$PATH:$VPOPHOME/bin | |||
VPOPMAIL_UID=`printf "%s\0%s\0%s\0" $AUTHD_ACCOUNT $AUTHD_PASSWORD Y123457 | vchkpw id -u vpopmail 3<&0` | |||
VPOPMAIL_GID=`id -g vpopmail` | |||
DOMAIN_DIR=`vdominfo -d $DOMAIN` | |||
USER_DIR=`vuserinfo -d $AUTHD_ACCOUNT` | |||
if [ $VPOPMAIL_UID ]; then | |||
DOMAIN=`echo $AUTHD_ACCOUNT|cut -d "@" -f 2` | |||
USER=`echo $AUTHD_ACCOUNT|cut -d "@" -f 1` | |||
DOMAIN_DIR=`vdominfo -d $DOMAIN` | |||
#not used | |||
#if [ ! -f $DOMAIN_DIR/.qmail-$USER ]; then | |||
# echo "| /var/qmail/bin/preline /usr/local/bin/preprocmail" > $DOMAIN_DIR/.qmail-$USER | |||
# echo "| $VPOPHOME/bin/vdelivermail '' $USER_DIR/Maildir/" >> $DOMAIN_DIR/.qmail-$USER | |||
# chown vpopmail $DOMAIN_DIR/.qmail-$USER | |||
# chmod 600 $DOMAIN_DIR/.qmail-$USER | |||
#fi | |||
echo "auth_ok:1" | |||
echo "uid:$VPOPMAIL_UID" | |||
echo "gid:$VPOPMAIL_GID" | |||
echo "dir:$USER_DIR" | |||
echo "end" | |||
exit | |||
fi | |||
echo "auth_ok:0" | |||
echo "end" | |||
</pre> |
Version vom 7. November 2006, 23:09 Uhr
Backport from testing to sarge
Backport
BP
vpopmail als Auth-Backend
from http://www.qmailinfo.org/index.php/Horde-Procmail-Filters
das ganze wird benötigt, um von Horde aus z.b. den Mailfilter (maildrop) zu ändern.
/etc/init.d/pure-ftpd-vpopmail
/usr/sbin/pure-authd_vpopmail
#!/bin/bash # ftpauth: This program is called by pure-authd to check if the email l/p are correct # Copyright (C) 2005 Roman Volf # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. VPOPHOME=/var/vpopmail ## Do not change anything below here PATH=$PATH:$VPOPHOME/bin VPOPMAIL_UID=`printf "%s\0%s\0%s\0" $AUTHD_ACCOUNT $AUTHD_PASSWORD Y123457 | vchkpw id -u vpopmail 3<&0` VPOPMAIL_GID=`id -g vpopmail` DOMAIN_DIR=`vdominfo -d $DOMAIN` USER_DIR=`vuserinfo -d $AUTHD_ACCOUNT` if [ $VPOPMAIL_UID ]; then DOMAIN=`echo $AUTHD_ACCOUNT|cut -d "@" -f 2` USER=`echo $AUTHD_ACCOUNT|cut -d "@" -f 1` DOMAIN_DIR=`vdominfo -d $DOMAIN` #not used #if [ ! -f $DOMAIN_DIR/.qmail-$USER ]; then # echo "| /var/qmail/bin/preline /usr/local/bin/preprocmail" > $DOMAIN_DIR/.qmail-$USER # echo "| $VPOPHOME/bin/vdelivermail '' $USER_DIR/Maildir/" >> $DOMAIN_DIR/.qmail-$USER # chown vpopmail $DOMAIN_DIR/.qmail-$USER # chmod 600 $DOMAIN_DIR/.qmail-$USER #fi echo "auth_ok:1" echo "uid:$VPOPMAIL_UID" echo "gid:$VPOPMAIL_GID" echo "dir:$USER_DIR" echo "end" exit fi echo "auth_ok:0" echo "end"