Hello!
I try to save attachments from mails (pop3/imap) to folders.
I have 2 emails, which i want to scan:
user1@host_address
user2@host_address
I use next .fetchmailrc configuration
PHP Code:
#defaults protocol pop3
poll "user2@host_address",
protocol imap,
user "user1",
password "1"
poll "user2@host_address",
protocol imap,
user "user2",
password "1"
mda '/usr/bin/procmail -d %T'
So, when I send mails to user1 and to user2, fetcmail gets attachments only from USER2 and not from USER1. It changes the status from unseen to seen both in USER1 and USER2, but doesn't get one attachment.
I have a log of fetchmail command:
PHP Code:
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
skipping message user1@host_address:2 not flushed
skipping message user1@host_address:3 not flushed
skipping message user1@host_address:4 not flushed
{ ... etc ... }
skipping message user1@host_address:256 not flushed
skipping message user1@host_address:257 not flushed
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 developerd.msd.local ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-developerd.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:<Kononkov@msd.cbr.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
Please help me!
at USER1 I see strange strings:
PHP Code:
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
...
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)
What does it mean?
---------- Post updated at 07:08 AM ---------- Previous update was at 06:03 AM ----------
The most interested that if i changed the .fetchmailrc file and write there only one user: or user1 or user2 - it finely works!..