On May 31, 2016, at 2:18 AM, Santiago Vila <sanv...@unex.es> wrote:

> On Mon, 30 May 2016, Rick Thomas wrote:
> 
>> Here’s the setup:
>> 
>> I have a POP/IMAP account at pobox.com.  I use cron to run fetchmail which 
>> retrieves (POP3) mail from pobox to a local server on my home network.
>> I process the retrieved mail with procmail to split it into folders and 
>> subfolders based on who it’s from, addressed to, subject, etc…
>> 
>> Here’s the .fetchmailrc file”:
>> ========================= .fetchmailrc ===============================
>> # Configuration created Thu Aug 15 20:08:16 2002 by fetchmailconf
>> # Lightly edited later by Rick Thomas
>> set postmaster "rbthomas"
>> set bouncemail
>> set no spambounce
>> set properties ""
>> # set syslog
>> 
>> poll mail.pobox.com with proto POP3 timeout 20 and options uidl
>>       user 'XXXXXXX' there with password 'YYYYYY' is 'rbthomas' here options 
>> keep ssl 
>> 
>> mda "formail -s procmail"
>> ======================================================================
>> 
>> As I interpret your reply, I should be using a different mda — NOT
>> formail.  Can you give me some hint as to what it should look like?
> 
> If you are running fetchmail as a user (not daemon, not root), what about 
> this?
> 
> mda "procmail"
> 
> 
> What you are using right now (formail -s procmail) would be required if the 
> output
> of fetchmail were a single mbox folder containing all the emails concatenated.
> 
> "formail -s some-command" splits a whole mbox folder made of concatenaded 
> messages
> and feeds them to "some-command" one at a time.
> 
> I have to confess that I'm also using "formail -s procmail" in my
> setup and I'm not sure why. Maybe there was a time in which fetchmail
> output was a whole mbox folder and you had to split it yourself.
> 
> So I did the following test:
> 
> I created a special mbox folder in my server called "test-folder",
> containing several messages, then I used this script to retrieve it:
> 
> fetchmail -a myserver --folder test-folder -m $HOME/bin/process-email
> 
> where process-email is like this:
> 
> #!/bin/sh
> t=`tempfile`
> cat > ${t}
> 
> What I see after running the above command line is a set of temporary
> files at /tmp, corresponding to each of the messages in the "test-folder".
> 
> This means that fetchmail already feeds a message at a time to whatever
> mda command you are using and you don't need to split them yourself.
> 
> 
> The general problem that you discovered (namely, that the mbox format
> is not 100% reliable regarding message boundaries) has a fix and it's
> called "Maildir format". There is no way to fix that in procmail
> because it is a limitation of the mbox format itself.
> 
> May I close this bug?

Thank you!  Yes, you may close this bug.

My .fetchmailrc file now has
        mda “procmail”
and is otherwise unchanged.  I’m using POP3 still, though I’ll experiment with 
imap soon.

Enjoy!
Rick

Reply via email to