Cannot fetch email with large attachment - gmail

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?

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

Related

AWS Pinpoint - Both 'Campaign' and 'Test messaging' fail to send email

I followed the following guide to setup an AWS Pinpoint project:
https://docs.aws.amazon.com/pinpoint/latest/userguide/gettingstarted-create-campaign.html
After I launch the campaign, the email is not sent (I chose 'immediately'). So, I checked 'Test messaging'. It also failed to send mail. I had already activated my sender email address.
The campaign analytics says:
Messages sent - 1
Messages delivered - 1
Delivery rate - 100%
Email open rate - 0%
Bounce rate - 0%
May I know why the mails are not delivered by AWS Pinpoint please?
This is my be due to Sandbox mode having following restrictions:
Limitations Of Sandbox Mode :-
You can send an email only from verified addresses and domains
addresses that are associated with the mailbox simulator. maximum of
200 messages per 24-hour and maximum of one message per second.

Mautic is not processing the queue. Messages are in the spool/default folder

Mautic will not send my queued emails.
I have set up the cron jobs and they are running as expected. The cron job email report for the ":messages:send" cron job that runs every minute is always this...
Processing message queue
Messages sent: 0
Content-type: text/html; charset=UTF-8
I have messages in my queue, which I have sent via the Contacts Tab, by clicking on the contact name (myself) and then clicking on the Send Email button, just to send myself a test email.
In my configuration email settings I am using PHP Mail.
If I have the mail set to 'Send Immediately' it works fine. I get my test email instantly. But if I have it set to queue the message goes into my spool/default folder but when the cron job triggers it is not sent.
Things I have tried so far....
I deleted the cache folder contents
I checked to see if I have two versions of this file: SendChannelBroadcastCommand.php - I don't, I just have this file once, in the ChannelBundle/Command folder. It is not also in the CoreBundle/Command folder (as suggested by a similar post)
I deleted all of the queued messages in the spool/default folder, then sent some more... which are now sitting in the folder just like before.
Things that might be a factor?
The permissions for the file SendChannelBroadcastCommand.php is set to 644. I don't know if this is correct but assume it is.
When I open the SendChannelBroadcastCommand.php file in dreamweaver, it flags it with lots of syntax errors. I don't really know enough about code to determine if these are genuine errors or if Dreamwaever is just being a little too sensitive. I also don't know if this file in included inside another one that'd make those errors disappear if Dreamweaver could see the complete end result, but I thought it was worth a mention.
Things that I'm sure are not a problem
I'm certain that the cron job is set up correctly. It is running. And I receive the email reports (although I've turned those back off now as I don't want a report every minute)
I've seen this problem mentioned a few times on other forums but none of the solutions are working for me.
My Mautic installation is 2.14.0
My PHP is 7.0.31
Installation was via Softaculous on cPanel on a dedicated server hosted with Namecheap
Thank you in advance for any suggestions that I can try to fix this issue.
Steve.
Oh, in case you're wondering... I am using PHP Mail as Mautic would not connect to Amazon SES. For that I get the following error (which my hosting company was unable to help me fix, so I'm trying PHP mail)
Connection could not be established with host email-smtp.us-east-1.amazonaws.com [Connection refused #111] Log data: ++ Starting Mautic\EmailBundle\Swiftmailer\Transport\AmazonTransport !! Connection could not be established with host email-smtp.us-east-1.amazonaws.com [Connection refused #111] (code: 0)
++ Starting Mautic\EmailBundle\Swiftmailer\Transport\AmazonTransport !! Connection could not be established with host email-smtp.us-east-1.amazonaws.com [Connection refused #111] (code: 0)
Regarding your Amazon SES Connection refused #111] (code: 0) error, it is hard-coded in mautic to use port 2587 to connect to amazon ses, regardless of what port you put in the smtp port number. This is in Mautic 2.13.1 version. Make sure TCP 2587 in/out is open on your webserver firewall. This change solved that error message for me. Have not expierenced a queue error, sorry can't comment on that.
If your queue setup is perfect then there is one more thing is there to setup in cron level.
That is php /path/to/mautic/bin/console mautic:emails:send
This command is used to process queued emails for Mautic
Check this for more info https://docs.mautic.org/en/setup/cron-jobs
Due to this only the emails are not processing, if your queue setup is good.
Just add the command and try again, it will work.

Getting 429 (Too many requests) Accessing GMail from Azure Logic App

Once a min (1,440 times/day), I'm reading a Gmail mailbox from an Azure Logic App. After 2 days, it consistently returns 429-Too many requests. The quota threshold is 20,000/day. It has not run successfully since.
You might be running into the threshold for Concurrent Requests of gmail due to the parallel actions of Logic Apps. This will also return the 429 error.
What are you exactly doing in the logic app?
Based from this documentation, the Gmail API enforces the standard daily mail sending limits.
These limits are per-user and are shared by all of the user's clients, whether API clients, native/web clients or SMTP MSA. If these limits are exceeded a HTTP 429 Too Many Requests "User-rate limit exceeded" error mentioning "(Mail sending)" is returned with a time to retry. Note that daily limits being exceeded may result in these types of errors for multiple hours before the request is accepted, so your client may retry the request with standard exponential backoff.
These per-user limits cannot be increased for any reason.
The mail sending pipeline is complex: once the the user exceeds their quota, there can be a delay of several minutes before the API begins to return 429 error responses. So you cannot assume that a 200 response means the email was successfully sent.
You may try considering exponential backoff. Here's also an additional link which might help: Gmail API error 429 rateLimitExceeded even where is no any activity

Save mail message as a file on Linux using sendmail

I have an application running on several RHEL 5.8 systems which monitors and alerts (via email). I need to create a durable log of these alerts locally on each node.
I think the easiest way to do this would be to add a local email user to the alerts and then use mailbox settings or a script (if needed) to save each message on a local filesystem
I would settle for message body dumped to a text file (one file per email.)
It would be better if it could extract time, host, subject, & body as seperate fields for consumption by an open source log reader.
My systems are using sendmail 8.1 and I would prefer to stick with it, although I also have postfix 2.3.3 available.
As you reported your sendmail uses procmail as local mailer => create special OS user account (e.g. log_user) and use ~log_user/.procmailrc to instruct procmail to deliver messages to maildir folder.
~log_user/.procmailrc
# deliver ALL messages to ~/maillog/ maildir.
# see "man procmailex" for email sorting examples
:0
maillog/

Apache James - reduce message time in spool

I'm using a local Apache James 2.3.2 install for development and automated testing. It's configured to forward all incoming messages to a single address and to not relay emails outside:
<mailet match="All" class="Forward">
<forwardto>test#localhost</forwardto>
</mailet>
Everything works correctly: emails are accepted, placed in the spool directory, then finally moved to the inbox/test directory, from which they are then picked up by my automated tests for verification.
The only problem is, it can take anywhere between 10 and 60 seconds for those emails to be moved from the spool directory to the inbox/test directory, meaning the tests need to wait that long before retrieving them and doing their checks.
Is this something that can be configured otherwise? Or should I simply move to a different email server for testing purposes?
Thanks!
Not a direct answer to this question, but I've ended up switching to JES http://www.ericdaugherty.com/java/mailserver/ . You can configure how many SMTP and POP3 threads do the work as well as the frequency at which these threads pick up messages from the spool and try to send deliver them
# The server stores incoming SMTP messages on disk before attempting to deliver them. This
# setting determines how often (in seconds) the server checks the disk for new messages to deliver. The
# smaller the number, the faster message will be processed. However, a smaller number will cause
# the server to use more of your system's resources.
smtpdelivery.interval=5
This meets my needs.

Resources