Problem with saving mails (fetchmail + procmail + uudeview)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with saving mails (fetchmail + procmail + uudeview)
# 1  
Old 03-29-2011
Problem with saving mails (fetchmail + procmail + uudeview)

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 --v
fetchmail
6.2.5 querying host_address (protocol IMAPat Tue 29 Mar 2011 02:46:05 PM MSDpoll started
fetchmail
IMAP< * OK GroupWise IMAP4rev1 Server Ready
fetchmail
IMAPA0001 CAPABILITY
fetchmail
IMAP< * CAPABILITY IMAP4rev1 AUTH=XGWTRUSTEDAPP XGWEXTENSIONS
fetchmail
IMAPA0001 OK CAPABILITY completed
fetchmail
IMAPA0002 LOGIN "user1" *
fetchmailIMAPA0002 OK LOGIN completed
fetchmail
IMAPA0003 SELECT "INBOX"
fetchmailIMAP< * 260 EXISTS
fetchmail
IMAP< * 1 RECENT
fetchmail
IMAP< * OK [UNSEEN 260]
fetchmailIMAP< * OK [UIDVALIDITY 1301053702]
fetchmailIMAP< * OK [UIDNEXT 545]
fetchmailIMAP< * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
fetchmailIMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)]
fetchmailIMAPA0003 OK [READ-WRITESELECT completed
fetchmail
IMAPA0004 SEARCH UNSEEN NOT DELETED
fetchmail
IMAP< * SEARCH 260
fetchmail
IMAPA0004 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
IMAPA0005 FETCH 260 RFC822.SIZE
fetchmail
IMAP< * 260 FETCH (RFC822.SIZE 23853)
fetchmailIMAPA0005 OK FETCH completed
fetchmail
IMAPA0006 FETCH 260 RFC822.HEADER
fetchmail
IMAP< * 260 FETCH (RFC822.HEADER {367}
reading message user1@host_address:260 of 260 (367 header octets)
fetchmailSMTP220 developerd.msd.local ESMTP Postfix
fetchmail
SMTPEHLO localhost
fetchmail
SMTP250-developerd.msd.local
fetchmail
SMTP250-PIPELINING
fetchmail
SMTP250-SIZE 10240000
fetchmail
SMTP250-VRFY
fetchmail
SMTP250-ETRN
fetchmail
SMTP250 8BITMIME
fetchmail
SMTPMAIL FROM:<Kononkov@msd.cbr.ruSIZE=23853
fetchmail
SMTP250 Ok
fetchmail
SMTPRCPT TO:<door@localhost>
fetchmailSMTP250 Ok
fetchmail
SMTPDATA
fetchmail
SMTP354 End data with <CR><LF>.<CR><LF>
#
fetchmailIMAP< )
fetchmailIMAPA0006 OK FETCH completed
fetchmail
IMAPA0007 FETCH 260 BODY.PEEK[TEXT]
fetchmailIMAP< * 260 FETCH (BODY[TEXT] {23486}
 (
23486 body octets) *************************************************************************************************************************************************************************************************************************************************************************************************************************
fetchmailIMAP< )
fetchmailIMAPA0007 OK FETCH completed
fetchmail
SMTP>. (EOM)
fetchmailSMTP250 Okqueued as 89C27A4B4A
 not flushed
fetchmail
IMAPA0008 STORE 260 +FLAGS (\Seen)
fetchmailIMAP< * 260 FETCH (FLAGS (\Seen \Recent))
fetchmailIMAPA0008 OK STORE completed
fetchmail
IMAPA0009 LOGOUT
fetchmail
IMAP< * BYE IMAP4rev1 Server Disconnect
fetchmail
IMAPA0009 OK LOGOUT completed
fetchmail
6.2.5 querying host_address (protocol IMAPat Tue 29 Mar 2011 02:46:05 PM MSDpoll completed
fetchmail
6.2.5 querying host_address (protocol IMAPat Tue 29 Mar 2011 02:46:05 PM MSDpoll started
fetchmail
IMAP< * OK GroupWise IMAP4rev1 Server Ready
fetchmail
IMAPA0001 CAPABILITY
fetchmail
IMAP< * CAPABILITY IMAP4rev1 AUTH=XGWTRUSTEDAPP XGWEXTENSIONS
fetchmail
IMAPA0001 OK CAPABILITY completed
fetchmail
IMAPA0002 LOGIN "user2" *
fetchmailIMAPA0002 OK LOGIN completed
fetchmail
IMAPA0003 SELECT "INBOX"
fetchmailIMAP< * 1 EXISTS
fetchmail
IMAP< * 1 RECENT
fetchmail
IMAP< * OK [UNSEEN 1]
fetchmailIMAP< * OK [UIDVALIDITY 1300281146]
fetchmailIMAP< * OK [UIDNEXT 74]
fetchmailIMAP< * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
fetchmailIMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)]
fetchmailIMAPA0003 OK [READ-WRITESELECT completed
fetchmail
IMAPA0004 SEARCH UNSEEN NOT DELETED
fetchmail
IMAP< * SEARCH 1
fetchmail
IMAPA0004 OK SEARCH completed
1 message 
for user2 at host_address.
fetchmailIMAPA0005 FETCH 1 RFC822.SIZE
fetchmail
IMAP< * 1 FETCH (RFC822.SIZE 23806)
fetchmailIMAPA0005 OK FETCH completed
fetchmail
IMAPA0006 FETCH 1 RFC822.HEADER
fetchmail
IMAP< * 1 FETCH (RFC822.HEADER {320}
reading message user2@host_address:1 of 1 (320 header octets)
#
fetchmailIMAP< )
fetchmailIMAPA0006 OK FETCH completed
fetchmail
IMAPA0007 FETCH 1 BODY.PEEK[TEXT]
fetchmailIMAP< * 1 FETCH (BODY[TEXT] {23486}
 (
23486 body octets) *************************************************************************************************************************************************************************************************************************************************************************************************************************
fetchmailIMAP< )
fetchmailIMAPA0007 OK FETCH completed
Loaded from 
/tmp/uuqLClgs'111' (UNKNOWN): test1.xls part 1   Base64
 not flushed
fetchmail
IMAPA0008 STORE 1 +FLAGS (\Seen)
fetchmailIMAP< * 1 FETCH (FLAGS (\Seen \Recent))
fetchmailIMAPA0008 OK STORE completed
fetchmail
IMAPA0009 LOGOUT
fetchmail
IMAP< * BYE IMAP4rev1 Server Disconnect
fetchmail
IMAPA0009 OK LOGOUT completed
fetchmail
6.2.5 querying host_address (protocol IMAPat Tue 29 Mar 2011 02:46:06 PM MSDpoll completed
fetchmail
SMTPQUIT
fetchmail
SMTP221 Bye
fetchmail
normal terminationstatus 0 
Please help me!

at USER1 I see strange strings:

PHP Code:
fetchmailSMTP354 End data with <CR><LF>.<CR><LF>
...
fetchmailIMAP< )
fetchmailIMAPA0007 OK FETCH completed
fetchmail
SMTP>. (EOM)
fetchmailSMTP250 Okqueued as 89C27A4B4A
 not flushed
fetchmail
IMAPA0008 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!..
# 2  
Old 03-30-2011
The Fetchmail FAQ says the attachments are always actually within the mail, so if you got the mail, the attachment should be there. Do you get both emails, just not the attachment?
# 3  
Old 03-30-2011
No!

I get attachment and full message copy only from user2!
From user1 I don't get anything..

I think that problem in next: when I send mail from user3 to user1, it firstly resends to door@localhost (but why?) and then falls to some queue and doesn't goes to user1... but why it doesn't happy with user2? It's strange.
# 4  
Old 03-30-2011
Everything is just past the Door.

OK, so attachments is not it, you cannot get to user1. The mention of user2@ on the poll line is not supported by the man page Man Page for fetchmail (All Section 0) - The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Some mails not scanned by SpamAssassin 3.4.1 w sendmail/procmail on Fedora 21

We have a user who has about a 50% missed rate on spam detection. I'm wondering if his user prefs or something is preventing scanning of all messages? SpamAssassin version 3.4.1, running on Perl version 5.20.3, sendmail Version 8.15.2 The contents of the user_prefs file: # How many points... (2 Replies)
Discussion started by: RobbieTheK
2 Replies

2. Shell Programming and Scripting

Problem saving return value of subroutine in perl

Hi all, I have this code #This program read the triplets from file named "data" into #an array of array. use strict; use warnings; use Data::Dumper; use Graph; use Graph::Subgraph; my @S; while (<>) { push @S, ; } print "-----TRIPLETS-------\n"; print Dumper \@S; #Make... (6 Replies)
Discussion started by: rushadrena
6 Replies

3. Shell Programming and Scripting

Parsing a long string string problem for procmail

Hi everyone, I am working on fetchmail + procmail to filter mails and I am having problem with parsing a long line in the body of the email. Could anyone help me construct a reg exp for this string below. It needs to match exactly as this string. GetRyt... (4 Replies)
Discussion started by: cwiggler
4 Replies

4. Shell Programming and Scripting

.procmailrc and uudeview (put attachments from diff senders to diff folders)

Moderator, please, delete this topic (1 Reply)
Discussion started by: optik77
1 Replies

5. Shell Programming and Scripting

Problem with renaming and saving

Hello mates, I am quite new to script programming and I am facing an uphill task to rename files in one folder. I have gone through similar posts but most of them deal with renaming files by changing the file extensions. Problem : I have a folder which contains files like... (5 Replies)
Discussion started by: chirag.joshi
5 Replies

6. Linux

Fetchmail Help

Hello there Unix & Linux Guru's and Gifted ones, Can anyone help me configure fetchmail on my redhat 9.0 This sounds to be silly but really I'm new to linux. I really need step by step installation and configuration on our company's required Redhat 9.0 (shrike) OS. Thank you and God... (2 Replies)
Discussion started by: struggled_boy
2 Replies

7. UNIX for Advanced & Expert Users

Problem with sendmail procmail spamassasin & relay

I have been working on setting up a mail relay. I have just about everything working except for the procmail part. The configuration is as follows: Internet -> mailrelay -> mail server | spamassassin server I have spamassassin running on a seperate... (3 Replies)
Discussion started by: hardesty
3 Replies

8. UNIX for Dummies Questions & Answers

fetchmail taking long time to fetchmail...

Hi peeps, We are having around 60 users. The time set to retrieve the mail is 300 sec. But it's taking around 1 hour to deliver mails. I am using debian sarge 3.1. any clues? And how it will affect if I decrease the time? My machine has got 1 p4 3.0 GHZ processor and 1 GB ram. The home... (2 Replies)
Discussion started by: squid04
2 Replies

9. IP Networking

fetchmail with pop3

once i used kmail (or sometimes outlook express) for my e-mail client. i had no problem with that. now being with unix console, i want to retrieve pop3 mails, using fetchmail. (where i can browse my mailbox(es) later) and it seems something i'm missing or do not understand. assuming my e-mail... (2 Replies)
Discussion started by: jaguar
2 Replies
Login or Register to Ask a Question