powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / Сохранение почтовых вложений(fetchmail + procmail + uudeview
2 сообщений из 2, страница 1 из 1
Сохранение почтовых вложений(fetchmail + procmail + uudeview
    #37188957
(o-O)
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
добрый день!

я пытаюсь сохранить вложения из входящих почтовых сообщений в каталоги.
я опрашиваю 2 почтовых ящика.
user1@host_address
user2@host_address

я использую следующую конфигурация .fetchmailrc:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
poll "host_address",
protocol imap,
user "user1",
password "1"

poll "host_address",
protocol imap,
user "user2",
password "1"

mda '/usr/bin/procmail -d %T'


Когда я тестирую работу и посылаю сообщение от пользователя user3 сначала для user1 потом для user2, fetchmail берёт и сохраняет вложение, адресованное только для user2. Хотя статус с непрочитанного (unseen) на прочитанное (seen) меняется у обоих пользователей.

Лог команды fetchmail:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
dima@myserver:~> fetchmail -k -v
fetchmail:  6 . 2 . 5  querying host_address (protocol IMAP) at Tue  29  Mar  2011   02 : 46 : 05  PM MSD: poll started
fetchmail: IMAP< * OK GroupWise IMAP4rev1 Server Ready
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4rev1 AUTH=XGWTRUSTEDAPP XGWEXTENSIONS
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: IMAP> A0002 LOGIN "user1" *
fetchmail: IMAP< A0002 OK LOGIN completed
fetchmail: IMAP> A0003 SELECT "INBOX"
fetchmail: IMAP< *  260  EXISTS
fetchmail: IMAP< *  1  RECENT
fetchmail: IMAP< * OK [UNSEEN  260 ]
fetchmail: IMAP< * OK [UIDVALIDITY  1301053702 ]
fetchmail: IMAP< * OK [UIDNEXT  545 ]
fetchmail: IMAP< * FLAGS (Answered Flagged Deleted Draft Seen)
fetchmail: IMAP< * OK [PERMANENTFLAGS (Answered Flagged Deleted Draft Seen *)]
fetchmail: IMAP< A0003 OK [READ-WRITE] SELECT completed
fetchmail: IMAP> A0004 SEARCH UNSEEN NOT DELETED
fetchmail: IMAP< * SEARCH  260 
fetchmail: IMAP< A0004 OK SEARCH completed
 260  messages ( 259  seen) for user1 at host_address.
skipping message user1@host_address: 1  not flushed
      { ... etc ... }
skipping message user1@host_address: 258  not flushed
skipping message user1@host_address: 259  not flushed
fetchmail: IMAP> A0005 FETCH  260  RFC822.SIZE
fetchmail: IMAP< *  260  FETCH (RFC822.SIZE  23853 )
fetchmail: IMAP< A0005 OK FETCH completed
fetchmail: IMAP> A0006 FETCH  260  RFC822.HEADER
fetchmail: IMAP< *  260  FETCH (RFC822.HEADER { 367 }
reading message user1@host_address: 260  of  260  ( 367  header octets)
fetchmail: SMTP<  220  myserver.msd.local ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP<  250 -myserver.msd.local
fetchmail: SMTP<  250 -PIPELINING
fetchmail: SMTP<  250 -SIZE  10240000 
fetchmail: SMTP<  250 -VRFY
fetchmail: SMTP<  250 -ETRN
fetchmail: SMTP<  250  8BITMIME
fetchmail: SMTP> MAIL FROM:<user3@firma.ru>; SIZE= 23853 
fetchmail: SMTP<  250  Ok
fetchmail: SMTP> RCPT TO:<door@localhost>;
fetchmail: SMTP<  250  Ok
fetchmail: SMTP> DATA
fetchmail: SMTP<  354  End data with <CR><LF>.<CR><LF>
#
fetchmail: IMAP< )
fetchmail: IMAP< A0006 OK FETCH completed
fetchmail: IMAP> A0007 FETCH  260  BODY.PEEK[TEXT]
fetchmail: IMAP< *  260  FETCH (BODY[TEXT] { 23486 }
( 23486  body octets) **************************************************************************************************
*******************************************************************************************************
****************************************************************************************************************
fetchmail: IMAP< )
fetchmail: IMAP< A0007 OK FETCH completed
fetchmail: SMTP>. (EOM)
fetchmail: SMTP<  250  Ok: queued as 89C27A4B4A
not flushed
fetchmail: IMAP> A0008 STORE  260  +FLAGS (Seen)
fetchmail: IMAP< *  260  FETCH (FLAGS (Seen Recent))
fetchmail: IMAP< A0008 OK STORE completed
fetchmail: IMAP> A0009 LOGOUT
fetchmail: IMAP< * BYE IMAP4rev1 Server Disconnect
fetchmail: IMAP< A0009 OK LOGOUT completed
fetchmail:  6 . 2 . 5  querying host_address (protocol IMAP) at Tue  29  Mar  2011   02 : 46 : 05  PM MSD: poll completed
fetchmail:  6 . 2 . 5  querying host_address (protocol IMAP) at Tue  29  Mar  2011   02 : 46 : 05  PM MSD: poll started
fetchmail: IMAP< * OK GroupWise IMAP4rev1 Server Ready
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4rev1 AUTH=XGWTRUSTEDAPP XGWEXTENSIONS
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: IMAP> A0002 LOGIN "user2" *
fetchmail: IMAP< A0002 OK LOGIN completed
fetchmail: IMAP> A0003 SELECT "INBOX"
fetchmail: IMAP< *  1  EXISTS
fetchmail: IMAP< *  1  RECENT
fetchmail: IMAP< * OK [UNSEEN  1 ]
fetchmail: IMAP< * OK [UIDVALIDITY  1300281146 ]
fetchmail: IMAP< * OK [UIDNEXT  74 ]
fetchmail: IMAP< * FLAGS (Answered Flagged Deleted Draft Seen)
fetchmail: IMAP< * OK [PERMANENTFLAGS (Answered Flagged Deleted Draft Seen *)]
fetchmail: IMAP< A0003 OK [READ-WRITE] SELECT completed
fetchmail: IMAP> A0004 SEARCH UNSEEN NOT DELETED
fetchmail: IMAP< * SEARCH  1 
fetchmail: IMAP< A0004 OK SEARCH completed
 1  message for user2 at host_address.
fetchmail: IMAP> A0005 FETCH  1  RFC822.SIZE
fetchmail: IMAP< *  1  FETCH (RFC822.SIZE  23806 )
fetchmail: IMAP< A0005 OK FETCH completed
fetchmail: IMAP> A0006 FETCH  1  RFC822.HEADER
fetchmail: IMAP< *  1  FETCH (RFC822.HEADER { 320 }
reading message user2@host_address: 1  of  1  ( 320  header octets)
#
fetchmail: IMAP< )
fetchmail: IMAP< A0006 OK FETCH completed
fetchmail: IMAP> A0007 FETCH  1  BODY.PEEK[TEXT]
fetchmail: IMAP< *  1  FETCH (BODY[TEXT] { 23486 }
( 23486  body octets) ************************************************************************************************
************************************************************************************************************
*************************************************************************************************************
fetchmail: IMAP< )
fetchmail: IMAP< A0007 OK FETCH completed
Loaded from /tmp/uuqLClgs: '111' (UNKNOWN): test1.xls part  1  Base64
not flushed
fetchmail: IMAP> A0008 STORE  1  +FLAGS (Seen)
fetchmail: IMAP< *  1  FETCH (FLAGS (Seen Recent))
fetchmail: IMAP< A0008 OK STORE completed
fetchmail: IMAP> A0009 LOGOUT
fetchmail: IMAP< * BYE IMAP4rev1 Server Disconnect
fetchmail: IMAP< A0009 OK LOGOUT completed
fetchmail:  6 . 2 . 5  querying host_address (protocol IMAP) at Tue  29  Mar  2011   02 : 46 : 06  PM MSD: poll completed
fetchmail: SMTP> QUIT
fetchmail: SMTP<  221  Bye
fetchmail: normal termination, status  0 

В чём может быть проблема?
Особо меня настораживает почему в первом случае появляется блок команд SMTP после сообщения:

fetchmail: IMAP< * 260 FETCH (RFC822.HEADER {367}
reading message user1@host_address:260 of 260 (367 header octets)
fetchmail: SMTP< 220 myserver.msd.local ESMTP Postfix
fetchmail: SMTP> EHLO localhost
...

как будто он пытается что то куда то переслать. Но зачем? если я просто от user3 последовательно одинаково слал сообщения для user1 и user2.

и еще особенность, что если по очереди убрать настройки для user1 или user2 и оставлять по одному пользователю, то всё работает...
...
Рейтинг: 0 / 0
Период между сообщениями больше года.
Сохранение почтовых вложений(fetchmail + procmail + uudeview
    #38123280
Zhivchegg
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
poll "host_address",
protocol imap,
user "user1",
password "1"

mda '/usr/bin/procmail -d %T'

poll "host_address",
protocol imap,
user "user2",
password "1"

mda '/usr/bin/procmail -d %T'
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / Сохранение почтовых вложений(fetchmail + procmail + uudeview
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]