You are not logged in.

#1 2012-12-16 00:52:21

tony5429
Member
Registered: 2006-03-28
Posts: 1,025
Website

[SOLVED] How to Make a Program Run Slower

This is an odd question I know... So I'm using Thunderbird to transfer from one gmail account to another. As those reading this may know, this is very easy for transferring emails - just drag and drop. However, for Google's recorded chats, the drag-and-drop method does not work. Instead I must mass-forward the chats as emails from one account to another. I can do this using a message filter for about 10 chats at a time, but if I do any more I get SMTP errors as, I presume, some part of the network is discouraging me from mass-emailing assuming I'm a spambot. So what I would like to do is set my message filter to forward all my chats (about 3500) to the new account, but run it very slowly. I'm wondering if there isn't a way to do this by running all of thunderbird with minimal resources. Does that make sense? When I first invoke thunderbird, can I inform Linux that I want Thunderbird to operate slowly so it sends its emails slowly?

Last edited by tony5429 (2012-12-21 13:02:15)

Offline

#2 2012-12-16 01:06:37

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] How to Make a Program Run Slower

The common way to do this is to use a "sleep" function. Most languages have them. You set up a loop, do something, then make your script wait x seconds before proceeding to the next iteration of the loop.  For example, you would send 10 chats at a time then sleep until you can send 10 more without getting flagged as spam.

An even better solution would be to have your script periodically check some condition to determine if it can continue, instead of blindly hoping that enough time has passed.


Incidentally, I suspect that you're complicating things. Have you checked for mass export and import functions?


My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone

Offline

#3 2012-12-16 01:36:10

tony5429
Member
Registered: 2006-03-28
Posts: 1,025
Website

Re: [SOLVED] How to Make a Program Run Slower

Thanks, Xyne. I have done lots of searching in Thunderbird and Google and unfortunately have not found any other way to transfer Google chats. It would be great to be able to use a sleep function between calls of Thunderbird, where each Thunderbird call forwards one chat. However, the command-line options of Thunderbird seem pretty minimal. That's why I was thinking of just running the entire program slowly - if there's a way to do it. I've thought about opening Thunderbird in a virtual system with minimal resources, but it seems like a lot of work and might still not be slow enough to prevent the SMTP errors anyway...

Offline

#4 2012-12-16 12:41:01

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] How to Make a Program Run Slower

Replace thunderbird with mail (or your favorite language and its email module), ???, profits.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2012-12-21 13:01:53

tony5429
Member
Registered: 2006-03-28
Posts: 1,025
Website

Re: [SOLVED] How to Make a Program Run Slower

Thanks for all the tips/ideas! If anyone is wondering, I solved this problem by installing xdotool, putting my new email address in my clipboard, opening Thunderbird, and running this script:

delay=16
for i in {1..3525}; do
	sleep $delay
	xdotool key shift+F10
	sleep $delay
	xdotool key f
	sleep $delay
	xdotool key ctrl+v
	sleep $delay
	xdotool key ctrl+Return
	sleep $delay
	xdotool key Up
done

Offline

Board footer

Powered by FluxBB