Using Python's smtplib with Tor

I'm conducting experiments regarding e-mail spam. One of these experiments require sending mail thru Tor. Since I'm using Python and smtplib for my experiments, I'm looking for a way to use the Tor proxy (or other method) to perform that mail sending. Ideas how this can be done?


Asked by: Chester801 | Posted: 27-01-2022






Answer 1

Because of abuse by spammers, many Tor egress nodes decline to emit port 25 (SMTP) traffic, so you may have problems.

Answered by: Julian425 | Posted: 28-02-2022



Answer 2

http://bent.latency.net/smtpprox/ I found this earlier, but haven't tried it

Answered by: Edgar313 | Posted: 28-02-2022



Similar questions

How can I see emails sent with Python's smtplib in my Outlook Sent Items folder?

I am using hosted exchange Microsoft Office 365 email and I have a Python script that sends email with smtplib. It is working very well. But there is one issue, how can I get the emails to show up in my Outlook Sent Items?


email - How to get line breaks in e-mail sent using Python's smtplib?

I have written a script that writes a message to a text file and also sends it as an email. Everything goes well, except the email finally appears to be all in one line. I add line breaks by \n and it works for the text file but not for the email. Do you know what could be the possible reason? Here's my code: import smtplib, sys import traceback def send_error(sender, r...


Using python's smtplib, how can I send an email in the future?

I have some sample Python code from here https://docs.python.org/2/library/email-examples.html where I can successfully send emails. # Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.mime.text import MIMEText me = "my@email.com" you = "your@email.com"...


unit testing - Python's unittest logic

Can someone explain this result to me. The first test succeeds but the second fails, although the variable tested is changed in the first test. >>> class MyTest(unittest.TestCase): def setUp(self): self.i = 1 def testA(self): self.i = 3 self.assertEqual(self.i, 3) def testB(self): self.assertEqual(self.i, 3) >>> unittest.main() .F =============...


How can I draw a bezier curve using Python's PIL?

I'm using Python's Imaging Library and I would like to draw some bezier curves. I guess I could calculate pixel by pixel but I'm hoping there is something simpler.


Python's version of PHP's time() function

I've looked at the Python Time module and can't find anything that gives the integer of how many seconds since 1970 as PHP does with time(). Am I simply missing something here or is there a common way to do this that's simply not listed there?


C++ string diff (a la Python's difflib)

I'm trying to diff two strings to determine whether or not they solely vary in one numerical subset of the string structure; for example, varies_in_single_number_field('foo7bar', 'foo123bar') # Returns True, because 7 != 123, and there's only one varying # number region between the two strings. In Python I can use the difflib to accomplish this: import difflib,...


scope - Getting "global name 'foo' is not defined" with Python's timeit

I'm trying to find out how much time it takes to execute a Python statement, so I looked online and found that the standard library provides a module called timeit that purports to do exactly that: import timeit def foo(): # ... contains code I want to time ... def dotime(): t = timeit.Timer("foo()") time = t.timeit(1) ...


regex - Python's re module - saving state?

One of the biggest annoyances I find in Python is the inability of the re module to save its state without explicitly doing it in a match object. Often, one needs to parse lines and if they comply a certain regex take out values from them by the same regex. I would like to write code like this: if re.match('foo (\w+) bar (\d+)', line): # do stuff with .group(1) and .group(2) elif re.match('ba...


hash - How to set the crypto key for Python's MD5 module?

What is the Python equivalent of following Perl code? hmac_md5_hex($login . "^" . $seq . "^" . $time . "^" . $amo . "^", $CryptoKey); The Python hashlib.md5 doesn't seem to take an "cryptographic key" argument. It only accepts 1 argument.


pretty print - How do I get python's pprint to return a string instead of printing?

In other words, what's the sprintf equivalent to pprint?


Issue with PyAMF, Django, and Python's "property" feature

So far, I've had great success using PyAMF to communicate between my Flex front-end and my Django back-end. However, I believe I've encountered a bug. The following example (emphasis on the word "example") demonstrates the (potential) bug: My Flex app contains the following VO: package myproject.model.vo { [Bindable] [RemoteClass(alias="myproject.models.Book")] public class BookVO ...


class - What is the purpose of python's inner classes?

Python's inner/nested classes confuse me. Is there something that can't be accomplished without them? If so, what is that thing?






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top