* [Comm] virtual mail domain @ 2003-04-02 1:05 metrol 2003-04-02 2:48 ` Dmitry Lebkov 0 siblings, 1 reply; 7+ messages in thread From: metrol @ 2003-04-02 1:05 UTC (permalink / raw) To: community Здравствуйте! Создал виртуальный почтовый домен в такой связке: Postfix + Courier-imap + Maildrop-userdb. Делал по maildrop.README-ALT. Все прекрасно работает, пока дело не дошло до несуществующих пользователей в этом виртуальном домене. Письма для них болтаются в очереди postfix'а, mailq показывает: -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- 1876DF0146 675 Wed Apr 2 10:36:43 test@virtual.ru (temporary failure. Command output: /usr/bin/maildrop-userdb: Invalid user specified. ) test1@virtual.ru Подскажите как сделать, чтобы для таких зверей почта пересылалась на существующего пользователя? -- Евгений. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 1:05 [Comm] virtual mail domain metrol @ 2003-04-02 2:48 ` Dmitry Lebkov 2003-04-02 3:35 ` metrol 2003-04-02 4:53 ` metrol 0 siblings, 2 replies; 7+ messages in thread From: Dmitry Lebkov @ 2003-04-02 2:48 UTC (permalink / raw) To: community On Wed, 02 Apr 2003 11:05:42 +1000 metrol@amur.ru wrote: > > Здравствуйте! > > Создал виртуальный почтовый домен в такой связке: > Postfix + Courier-imap + Maildrop-userdb. > Делал по maildrop.README-ALT. > Все прекрасно работает, пока дело не дошло до несуществующих > пользователей в этом виртуальном домене. > Письма для них болтаются в очереди postfix'а, mailq показывает: > > -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- > 1876DF0146 675 Wed Apr 2 10:36:43 test@virtual.ru > (temporary failure. Command output: /usr/bin/maildrop-userdb: Invalid > user specified. ) > test1@virtual.ru > > Подскажите как сделать, чтобы для таких зверей почта пересылалась на > существующего пользователя? На вскидку, три варианта: %) 1. Патчить maildrop на предмет exit code в случае отсутствия пользователя, для которого доставляется почта. Сейчас maildrop возвращает EX_TEMPFAIL. В твоем случае - необходимо EX_NOUSER. Патч, корректирующий поведение maildrop, лежит здесь: http://www-dt.e-technik.uni-dortmund.de/~ma/postfix/fix-maildrop-NO_USER.diff Это не совсем 'right way', т.к. принимать решение о доставке сообщения - дело MTA (sedmail или postfix) а не MDA (procmail или maildrop), т.е. предполагается, что в момент передачи сообщения локальному агенту от MTA, пользователь уже присутствует в системе. И с этой точки зрения EX_TEMPFAIL вполне уместен: если по какой-либо причине не удалось получить инфо о пользователе (отвалился SQL или LDAP, не сработал вызов getpwent, и т.д.) -- сообщение зависает в очереди до тех пор, пока ситуация не исправится. 2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту для несуществующих адресов. Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый /etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан как транспорт maildrop, то тебе должно помочь что-то типа: maildrop_recipient_map = hash:/etc/courier-imap/userdb Подробности - в доках postfix'а, в районе local_recipient_map. 3. Попытаться Написать общесистемный maildroprc, обрабатывающий данную ситуацию. См. man maildropfilter. Про этот метод я знаю, что он существует и является довольно универсальным инструментом. Но сам я никогда не пытался решить подобную задачу с помощью общесистемного maildroprc. %) -- WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 2:48 ` Dmitry Lebkov @ 2003-04-02 3:35 ` metrol 2003-04-02 4:35 ` Dmitry Lebkov 2003-04-02 4:53 ` metrol 1 sibling, 1 reply; 7+ messages in thread From: metrol @ 2003-04-02 3:35 UTC (permalink / raw) To: community Dmitry Lebkov пишет: >>Создал виртуальный почтовый домен в такой связке: >>Postfix + Courier-imap + Maildrop-userdb. >>Делал по maildrop.README-ALT. >>Все прекрасно работает, пока дело не дошло до несуществующих >>пользователей в этом виртуальном домене. >>Письма для них болтаются в очереди postfix'а, mailq показывает: >> >>-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- >>1876DF0146 675 Wed Apr 2 10:36:43 test@virtual.ru >>(temporary failure. Command output: /usr/bin/maildrop-userdb: Invalid >>user specified. ) >> test1@virtual.ru >> >>Подскажите как сделать, чтобы для таких зверей почта пересылалась на >>существующего пользователя? >> >> > >На вскидку, три варианта: %) > >1. Патчить maildrop на предмет exit code в случае отсутствия пользователя, > для которого доставляется почта. Сейчас maildrop возвращает EX_TEMPFAIL. > В твоем случае - необходимо EX_NOUSER. Патч, корректирующий поведение > maildrop, лежит здесь: > >http://www-dt.e-technik.uni-dortmund.de/~ma/postfix/fix-maildrop-NO_USER.diff > > > Это отпадает, причину отписал сам. Вдруг на ldap или на MySQL нужно будет делать. >2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту > для несуществующих адресов. > >Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый >/etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан >как транспорт maildrop, то тебе должно помочь что-то типа: > >maildrop_recipient_map = hash:/etc/courier-imap/userdb > >Подробности - в доках postfix'а, в районе local_recipient_map. > > В этом случае сообщения будут отвергаться, если юзера нет в мапе. Но пригодится на будующее. >3. Попытаться Написать общесистемный maildroprc, обрабатывающий данную ситуацию. > См. man maildropfilter. > >Про этот метод я знаю, что он существует и является довольно универсальным >инструментом. Но сам я никогда не пытался решить подобную задачу с помощью >общесистемного maildroprc. %) > Значить этот вариант надо брать за основу. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 3:35 ` metrol @ 2003-04-02 4:35 ` Dmitry Lebkov 2003-04-02 5:10 ` metrol 0 siblings, 1 reply; 7+ messages in thread From: Dmitry Lebkov @ 2003-04-02 4:35 UTC (permalink / raw) To: community On Wed, 02 Apr 2003 13:35:55 +1000 metrol@amur.ru wrote: > Dmitry Lebkov пишет: [skip] > >1. Патчить maildrop на предмет exit code в случае отсутствия пользователя, > > для которого доставляется почта. Сейчас maildrop возвращает EX_TEMPFAIL. > > В твоем случае - необходимо EX_NOUSER. Патч, корректирующий поведение > > maildrop, лежит здесь: > > > >http://www-dt.e-technik.uni-dortmund.de/~ma/postfix/fix-maildrop-NO_USER.diff > > > Это отпадает, причину отписал сам. Вдруг на ldap или на MySQL нужно > будет делать. Так будет то же самое. Если юзер не найден -> EX_NOUSER. Единственнное, что мне в этом случае не нравится - сообщение уже лежит в очереди, т.е. MTA его принимает. А это - трафик, за который берут деньги ... %) > >2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту > > для несуществующих адресов. > > > >Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый > >/etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан > >как транспорт maildrop, то тебе должно помочь что-то типа: > > > >maildrop_recipient_map = hash:/etc/courier-imap/userdb > > > >Подробности - в доках postfix'а, в районе local_recipient_map. > > > В этом случае сообщения будут отвергаться, если юзера нет в мапе. Ааа ... Так тебе надо, чтоб все сообщения для несуществующих юзеров валились в какой-нить ящик ... %) А я "целился" в вариант "отшивания" сообщений для неизвестных локальных получателей. %))) > Но пригодится на будующее. > > > >3. Попытаться Написать общесистемный maildroprc, обрабатывающий данную ситуацию. > > См. man maildropfilter. > > > >Про этот метод я знаю, что он существует и является довольно универсальным > >инструментом. Но сам я никогда не пытался решить подобную задачу с помощью > >общесистемного maildroprc. %) > > > Значить этот вариант надо брать за основу. Да, похоже это - единственный выход ... %) -- WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 4:35 ` Dmitry Lebkov @ 2003-04-02 5:10 ` metrol 2003-04-02 6:02 ` Dmitry Lebkov 0 siblings, 1 reply; 7+ messages in thread From: metrol @ 2003-04-02 5:10 UTC (permalink / raw) To: community Dmitry Lebkov пишет: >>>2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту >>> для несуществующих адресов. >>> >>>Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый >>>/etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан >>>как транспорт maildrop, то тебе должно помочь что-то типа: >>> >>>maildrop_recipient_map = hash:/etc/courier-imap/userdb >>> >>>Подробности - в доках postfix'а, в районе local_recipient_map. >>> >>> >>> >>В этом случае сообщения будут отвергаться, если юзера нет в мапе. >> >> > >Ааа ... Так тебе надо, чтоб все сообщения для несуществующих юзеров валились >в какой-нить ящик ... %) А я "целился" в вариант "отшивания" сообщений >для неизвестных локальных получателей. %))) > > >>Но пригодится на будующее. >> >> Вообще-то это был бы наиболее правильный вариант, может и на нем остановлюсь, а может и временно. Но в лоб твой пример не прокатил. :-( Я так и не понял какой формат должен быть для recipient_map, и похоже он отличается от /etc/courier-imap/userdb. Знатоки postfix'а подскажите как правильно должно быть в этом случае? -- Евгений ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 5:10 ` metrol @ 2003-04-02 6:02 ` Dmitry Lebkov 0 siblings, 0 replies; 7+ messages in thread From: Dmitry Lebkov @ 2003-04-02 6:02 UTC (permalink / raw) To: community On Wed, 02 Apr 2003 15:10:32 +1000 metrol@amur.ru wrote: > Dmitry Lebkov пишет: > > >>>2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту > >>> для несуществующих адресов. > >>> > >>>Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый > >>>/etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан > >>>как транспорт maildrop, то тебе должно помочь что-то типа: > >>> > >>>maildrop_recipient_map = hash:/etc/courier-imap/userdb > >>> > >>>Подробности - в доках postfix'а, в районе local_recipient_map. > >>> > >>В этом случае сообщения будут отвергаться, если юзера нет в мапе. > >> > >Ааа ... Так тебе надо, чтоб все сообщения для несуществующих юзеров валились > >в какой-нить ящик ... %) А я "целился" в вариант "отшивания" сообщений > >для неизвестных локальных получателей. %))) > > > >>Но пригодится на будующее. > >> > > Вообще-то это был бы наиболее правильный вариант, > может и на нем остановлюсь, а может и временно. > Но в лоб твой пример не прокатил. :-( > Я так и не понял какой формат должен быть для recipient_map, > и похоже он отличается от /etc/courier-imap/userdb. > > Знатоки postfix'а подскажите как правильно должно быть в этом случае? :) Скорее всего посфикс ищет базу в /var/spool/postfix/etc/courier-imap См. пердупреждение в main.cf на предмет local_recipient_maps -- WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] virtual mail domain 2003-04-02 2:48 ` Dmitry Lebkov 2003-04-02 3:35 ` metrol @ 2003-04-02 4:53 ` metrol 1 sibling, 0 replies; 7+ messages in thread From: metrol @ 2003-04-02 4:53 UTC (permalink / raw) To: community Dmitry Lebkov пишет: >2. Настроить почтовый сервер таким образом, чтоб он _не принимал_ почту > для несуществующих адресов. > >Т.к. у тебя пользователи в userdb, то можно попытаться использовать этот самый >/etc/courier-imap/userdb.db как postfix map. Если maildrop-userdb у тебя описан >как транспорт maildrop, то тебе должно помочь что-то типа: > >maildrop_recipient_map = hash:/etc/courier-imap/userdb > >Подробности - в доках postfix'а, в районе local_recipient_map. > Попробывал этот метод - результат 0. Что-то не нравится postfix такая база. Может кто-нибудь уточнит правильный формат. Или будут другие предложения? -- Евгений ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-04-02 6:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-04-02 1:05 [Comm] virtual mail domain metrol 2003-04-02 2:48 ` Dmitry Lebkov 2003-04-02 3:35 ` metrol 2003-04-02 4:35 ` Dmitry Lebkov 2003-04-02 5:10 ` metrol 2003-04-02 6:02 ` Dmitry Lebkov 2003-04-02 4:53 ` metrol
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git