* [sisyphus] Maildrop+userdb @ 2002-11-18 5:12 Прокопьев Евгений 2002-11-18 7:45 ` Dmitry Lebkov 0 siblings, 1 reply; 4+ messages in thread From: Прокопьев Евгений @ 2002-11-18 5:12 UTC (permalink / raw) To: sisyphus Здравствуйте! Начал снова разбираться с userdb. /etc/postfix/master.cf: maildrop unix - n n - - pipe flags=Ru user=mail argv=/usr/bin/maildrop-userdb -d ${recipient} Именно mail, а не vmail - у меня есть такой пользователь и я не хочу, чтобы он сидел без дела /etc/postfix/main.cf: mailbox_command = /usr/bin/maildrop-userdb -d $LOGNAME maildrop_destination_recipient_limit = 1 /etc/courier-imap/userdb: shared home=/var/spool/mail/shared|mail=/var/spool/mail/shared|uid=8|gid=12 /var/spool/mail/shared создавался так: su - mail maildirmake -S /var/spool/mail/shared В README.ALT из maildrop на предмет -d $LOGNAME@$DOMAIN ничего не нашел. Постфикс перезапущен, userdb пересоздана. И тем не менее: [root@athlon mail]# echo hello | mail shared [root@athlon mail]# tail /var/log/mail/all Nov 17 12:10:21 athlon postfix/pickup[3620]: 186BF72DA: uid=0 from=<root> Nov 17 12:10:21 athlon postfix/cleanup[3934]: 186BF72DA: message-id=<20021117091021.186BF72DA@athlon.home> Nov 17 12:10:21 athlon postfix/qmgr[3621]: 186BF72DA: from=<root@athlon.home>, size=282, nrcpt=1 (queue active) Nov 17 12:10:21 athlon postfix/local[3936]: 186BF72DA: to=<shared@athlon.home>, relay=local, delay=0, status=bounced (unknown user: "shared") -- С уважением, Прокопьев Евгений ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [sisyphus] Maildrop+userdb 2002-11-18 5:12 [sisyphus] Maildrop+userdb Прокопьев Евгений @ 2002-11-18 7:45 ` Dmitry Lebkov 2002-11-18 9:36 ` Прокопьев Евгений 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Lebkov @ 2002-11-18 7:45 UTC (permalink / raw) To: sisyphus On Mon, 18 Nov 2002 08:12:03 +0300 Прокопьев Евгений <john@rmts.donpac.ru> wrote: > Здравствуйте! > > Начал снова разбираться с userdb. > > /etc/postfix/master.cf: > > maildrop unix - n n - - pipe > flags=Ru user=mail argv=/usr/bin/maildrop-userdb -d ${recipient} > > Именно mail, а не vmail - у меня есть такой пользователь и я не хочу, > чтобы он сидел без дела > > /etc/postfix/main.cf: > > mailbox_command = /usr/bin/maildrop-userdb -d $LOGNAME > maildrop_destination_recipient_limit = 1 > > /etc/courier-imap/userdb: > > shared home=/var/spool/mail/shared|mail=/var/spool/mail/shared|uid=8|gid=12 > > /var/spool/mail/shared создавался так: > > su - mail > maildirmake -S /var/spool/mail/shared > > В README.ALT из maildrop на предмет -d $LOGNAME@$DOMAIN ничего не нашел. Опс, похоже я это удалил за ненадобностью, но смотри ниже: Пакет maildrop-doc, файл README-ALT-maildrop (в самом конце): maildrop-userdb + Postfix: -------------------------- [skip] maildrop-userdb нормально работает в качестве MDA для системных mailbox'ов (как в формате Mailbox так и в формате Maildir) после замены в /etc/postfix/main.cf: mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME на mailbox_command = /usr/bin/maildrop-userdb -d $LOGNAME ^^^^^^^^^^^^^^^ это работает только (!) для системных mailbox'ов !!! если заменить -d $LOGNAME на -d $LOGNAME@$DOMAIN (возможно перед '@' нужно будет поставить '\') и в userdb описать всех пользователей в формате user@domain, то можно будет использовать maildrop как для системных учетных записей (в userdb описываешь соответствующие каталоги и реальные uid/gid), так и для виртуальных (как описано ниже). Правда, в случае $LOGIN@$DOMAIN имеется одно 'НО' - если системный пользователь не будет описан в userdb - почта ему не доставится, т.к. getpwnam('user@domain') вернет ошибку - пользователь с таким именем в системе врядли найдется. Наверное, я поэтому и не стал описывать такой вариант в README-ALT-maildrop ... :) ------ Как MDA для виртуальных доменов:(все как описано в README.postfix из пакета maildrop): /etc/postfix/master.cf: maildrop unix - n n - - pipe flags=Ru user=vmail argv=/usr/bin/maildrop-userdb -d ${recipient} /etc/postfix/main.cf: maildrop_destination_recipient_limit = 1 transport: virtual.domain maildrop: # adduser -r vmail -d /var/spool/vmail -s /bin/false # mkdir /var/spool/vmail # chown vmail.vmail /var/spool/vmail /etc/courier-imap/userdb: # см. man userdb dbuser@dvl1.sakhalin.ru home=/var/spool/vmail/dbuser|mail=/var/spool/vmail/dbuser|gid=116|uid=116 В файле userdb запись для пользователя должна быть в одну строку. Имя пользователя должно быть с доменом и uid/gid == uid/gid пользователя vmail. ^^^^^^^^^^^^^^^^^ а это для виртуальных. А в твоем случае, ты создаешь виртуального пользователя shared и пытаешся доставить почту, используя конфиг для локальных ящиков. Т.е. для того, чтобы твоя конфигурация работала, необходимо в transport добавить направление: athlon.home maildrop: и в userdb описать пользователя как shared@athlon.home. Правда, я не знаю (вернее вроде бы я такое делал - но не помню результата %) как поведет себя postfix если ему в transport дописать имя домена, которое он считает локальным (т.е. почта в этот домен доставляется с использованием mailbox_command). Имеется широкое поле для экспериментов ... ;) > Постфикс перезапущен, userdb пересоздана. И тем не менее: > > [root@athlon mail]# echo hello | mail shared > [root@athlon mail]# tail /var/log/mail/all > Nov 17 12:10:21 athlon postfix/pickup[3620]: 186BF72DA: uid=0 from=<root> > Nov 17 12:10:21 athlon postfix/cleanup[3934]: 186BF72DA: > message-id=<20021117091021.186BF72DA@athlon.home> > Nov 17 12:10:21 athlon postfix/qmgr[3621]: 186BF72DA: > from=<root@athlon.home>, size=282, nrcpt=1 (queue active) > Nov 17 12:10:21 athlon postfix/local[3936]: 186BF72DA: > to=<shared@athlon.home>, relay=local, delay=0, status=bounced (unknown > user: "shared") WBR, Dmitry Lebkov PS. Для начала проверяй с помощью maildrop-userdb доставку почты в ящик: # cat some_text_file | maildrop-userdb -d user и только после успешой доставки таким методом пробуй использовать постфикс - проще будет разбираться, где проблема. И документацию лучше читать полностью, а не выборочно ... ;) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [sisyphus] Maildrop+userdb 2002-11-18 7:45 ` Dmitry Lebkov @ 2002-11-18 9:36 ` Прокопьев Евгений 2002-11-18 11:36 ` Dmitry Lebkov 0 siblings, 1 reply; 4+ messages in thread From: Прокопьев Евгений @ 2002-11-18 9:36 UTC (permalink / raw) To: sisyphus Dmitry Lebkov wrote: > PS. Для начала проверяй с помощью maildrop-userdb доставку почты в ящик: > # cat some_text_file | maildrop-userdb -d user > и только после успешой доставки таким методом пробуй использовать > постфикс - проще будет разбираться, где проблема. Собственно, уже этот этап не работает. Вот содержимое userdb john@john.localdomain home=/home/john|mail=/home/john/Maildir|gid=84|uid=501 xxx@john.localdomain home=/home/john|mail=/home/john/Maildir|gid=84|uid=501 Делаем следующее: [root@john mail]# /usr/share/courier-imap/makeuserdb [root@john mail]# rm -rf /etc/courier-imap/userdb.lock [root@john mail]# echo hello | maildrop-userdb -V 10 -d john@john.localdomain maildrop-userdb: Invalid user specified. [root@john mail]# echo hello | maildrop-userdb -V 10 -d john maildrop: Changing to /home/john Message start at 0 bytes, envelope sender=john maildrop: Attempting .mailfilter Tokenized ; ... Tokenized ; Tokenized eof maildrop: Delivery complete. [root@john mail]# echo hello | maildrop-userdb -V 10 -d xxx maildrop-userdb: Invalid user specified. > И документацию лучше читать полностью, а не выборочно ... ;) Ага, только часто бывает так, что смотришь в книгу, а видишь сам знаешь что -- С уважением, Прокопьев Евгений ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [sisyphus] Maildrop+userdb 2002-11-18 9:36 ` Прокопьев Евгений @ 2002-11-18 11:36 ` Dmitry Lebkov 0 siblings, 0 replies; 4+ messages in thread From: Dmitry Lebkov @ 2002-11-18 11:36 UTC (permalink / raw) To: sisyphus On Mon, 18 Nov 2002 12:36:22 +0300 Прокопьев Евгений <john@rmts.donpac.ru> wrote: > Dmitry Lebkov wrote: [skip] > Делаем следующее: > > [root@john mail]# /usr/share/courier-imap/makeuserdb > [root@john mail]# rm -rf /etc/courier-imap/userdb.lock ls -al /etc/courier-imap/userdb.db что выдает? Скорее всего - ничего. Вот одного таракана и отловили ... Исправь в /usr/share/courier-imap/makeuserdb строчку, в которой упоминается userdb.dat и userdbshadow.dat на userdb.db и userdbshadow.db. Похоже, я в одном из пакетов скрипты изменил, а во втором - упустил. Буду исправлять. Переименуй /etc/courier-imap/*.dat в *.db и пулемет застрочит ... ;) WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-18 11:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-11-18 5:12 [sisyphus] Maildrop+userdb Прокопьев Евгений 2002-11-18 7:45 ` Dmitry Lebkov 2002-11-18 9:36 ` Прокопьев Евгений 2002-11-18 11:36 ` Dmitry Lebkov
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git