Cannot fetch email with large attachment

1.4k Views Asked by At

I use fetchmail to fetch emails from my Gmail account. But when the mail attachment is very large(like more than 20M), the mail will not be fetched to my local mail inbox.

How to force the fetchmail to download such a large email(Maybe it's the problem of Gmail?)?

Alternatively, I am willing to just download the mail without the attached in such a large attached case(But do not delete it in the Gmail Server).

How to solve this problem? Any suggestion?

1

There are 1 best solutions below

1
On

Call fetchmail with:

fetchmail --limit 25165824 --timeout 1200

to increase the message size limit to 24 MB and the server non-response time to 20 minutes. (vary the size and timeout as you prefer).

Be aware that some local MDAs may also need limits raised - I needed to add to /etc/postfix/main.cf:

message_size_limit = 25165824