-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Held messages #239
Comments
This is more user preference than a wide logic. Some would argue it is better to have the message sent than not at all. We have broadband customers who decide to host their own mail server and due to fault/outage/power/whatever, their service could be broken and a repair could take time - I know for them, they'd not want to lose email. |
I understand. |
Yes, the problem is that we have more than 500 held messages :)
|
Issue I've about 100K emails stuck with status "held". So the main thing is how can I delete all emails or force all to deliver? |
If you have a lot of held outgoing messages, you can use the console to put them all back into your message queue and have them resend.
Server['org-name/server-name'].message_db.messages(:where => {:held => 1, :scope => 'outgoing'}).each { |m| m.add_to_message_queue(:manual => true) } |
@catphish @adamcooke, It' very urgent! How can I delete the held list (100K) all at once? Looking for your help. Thanks |
Getting this error what am I doing wrong? |
You've entered the server name and/or organization name incorrectly. |
Thank you for reply. From where will I get server name? |
Dear @adamcooke by running "Server['org-name/server-name'].message_db.messages(:where => {:held => 1, :scope => 'outgoing'}).each { |m| m.add_to_message_queue(:manual => true) }". Ihad changed the Server Name. I get "NoMethodError: undefined method `message_db' for nil:NilClass" What to do? My all emails are stuck in held, nothing processing. Thanks |
You've entered the server name and/or organization name incorrectly. |
Thanks for your prompt reply. I actually used: Server['gupta-publications/smtp-1'].message_db.messages(:where => {:held => 1, :scope => 'outgoing'}).each { |m| m.add_to_message_queue(:manual => true) } |
You can get the correct org & server names from the URL in the web interface. I'd suggest that |
This is the Postal Interface I access: https://postal.domain.com/org/gupta-publications/servers/smtp-1 What to do? |
You can try to get the server server = Organization.find_by_permalink('org-name').servers.find_by_permalink('smtp-1')
server.message_db.messages(:where => {:held => 1, :scope => 'outgoing'}).each { \|m\| m.add_to_message_queue(:manual => true) } |
irb(main):004:0> server = Organization.find_by_permalink('gupta-publications').servers.find_by_permalink('smtp-1') irb(main):005:0> server.message_db.messages(:where => {:held => 1, :scope => 'outgoing'}).each { |m| m.add_to_message_queue(:manual => true) } |
@adamcooke, anymore suggestions? Thanks |
It worked for me, thanks! |
Any option to delete the held queue by console? I see here only options to re-add them to the queue. Thanks! |
Doesn't work for me neither.!
No matter what I try! |
You're getting the organization name wrong if you're getting that error. |
what if I want to cancel them all @adamcooke ? can you post the query for that too? |
Can we do the same for Hard Failed and bounced emails? |
@adamcooke can you shed some light on how to delete the held messages using the console please? Thanks! |
Hello @adamcooke |
I am getting the below error @adamcooke please help |
This is answered above
|
Thanks @willpower232 Am I still on track? I got the below result; => #<Server id: 1, organization_id: 1, uuid: "25d927cc-d369-413a-bd80-5468c20db4b1", name: "Mail Server 1", mode: "Live", ip_pool_id: nil, created_at: "2019-04-17 13:16:51", updated_at: "2019-05-10 13:49:45", permalink: "mail-server-1", send_limit: nil, deleted_at: nil, message_retention_days: 60, raw_message_retention_days: 30, raw_message_retention_size: 2048, allow_sender: true, token: "vchvvr", send_limit_approaching_at: nil, send_limit_approaching_notified_at: nil, send_limit_exceeded_at: nil, send_limit_exceeded_notified_at: nil, spam_threshold: #BigDecimal:6e4ea20,'0.5E1',9(18), spam_failure_threshold: #BigDecimal:6e4e908,'0.2E2',9(18), postmaster_address: nil, suspended_at: nil, outbound_spam_threshold: nil, domains_not_to_click_track: nil, suspension_reason: nil, log_smtp_data: true> |
Hi @chocochrispi |
|
Thanks a million @chocochrispi it works |
Not work for version 2.1.4 |
Here’s how to re-send all the hard fails:
NOTE: you have to know what your |
I think there is no sense to held messages for one month, the world can end in one month.
Is there any way to auto clean held messages?
The text was updated successfully, but these errors were encountered: