Questions tagged [smtpd]

The SMTP server accepts network connection requests and performs zero or more SMTP transactions per connection. Man Page

51 questions
18
votes
6 answers

What is the easiest way for a Java application to receive incoming email?

Sending email is easy with commons-email, and with spring it is even easier. What about receiving incoming email? Are there easy to use APIs that allow to bounce emails, process attachments, etc.
flybywire
  • 261,858
  • 191
  • 397
  • 503
14
votes
4 answers

Is there a Python MTA (Mail transfer agent)

Just wondering if there is a Python MTA. I took a look at smtpd but they all look like forwarders without any functionality.
Unknown
  • 45,913
  • 27
  • 138
  • 182
6
votes
1 answer

Sending an email from python using smtpd.DebuggingServer as STMP server

I'm trying to send an email using Python and used the following code: import smtplib import datetime SERVER = "localhost" PORT = 1025 FROM = "me@mydevice.com" TO = ["myemailaddress@something.com"] SUBJECT = "test" dt =…
dm76
  • 4,130
  • 8
  • 35
  • 46
4
votes
2 answers

python email - simple example runs without error, but email never arrives

I copied and pasted this example and filled in my own email addresses. # Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.mime.text import MIMEText # Open a plain text file for…
tadasajon
  • 14,276
  • 29
  • 92
  • 144
3
votes
2 answers

Python: smtpd (or alternative) for production mail receiving?

I'm looking to do various processing of email - eg. inspect the headers, and if they meet some criteria (look like spam), drop the connection, or inspect the recipient list and perform special filtering. Looks like Python's smtpd library provides a…
Parand
  • 102,950
  • 48
  • 151
  • 186
3
votes
1 answer

pipe from Python smtpd debugging server to file/database

is there a way to pipe the output from the Python smtpd debugging server python -m smtpd -n -c DebuggingServer localhost:1025 in a database/file? I want to show all traffic on this port on a simple webpage. If there is a better way please let me…
3
votes
0 answers

Detecting socket close with Python's asyncore and smtpd

Python newbie here. I'm using asyncore and smtpd to write an email server. Everything seems to work except that I can't figure out how to detect when/if the connecting client closes the socket. Also, I can't seem to set a timeout to automatically…
Mark Fletcher
  • 701
  • 1
  • 14
  • 36
3
votes
2 answers

Add SMTP AUTH support to Python smtpd library... can't override the method?

So, I wanted to extend the Python smtpd SMTPServer class so that it could handle SMTP AUTH connections. Seemed simple enough... So, it looked like I could just start like this: def smtp_EHLO(self, arg): print 'got in arg: ', arg # do stuff…
Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
2
votes
2 answers

Configuring Postfix relayhost

I am trying to configure postfix for using relay host with the following in /etc/postfix/main.cf: relayhost = [mailtrap.io]:2525 smtp_sasl_auth_enable = yes smtp_sasl_mechanism_filter = plain smtp_sasl_password_maps =…
Bogdan Gusiev
  • 8,027
  • 16
  • 61
  • 81
2
votes
1 answer

How to create a postfix-like server with python smtpd

About the python smtpd library, I try to override the process_message method, but when I try to connect to it with client and send message to, say a gmail account, it just print the message out on console, but I want it actually to send out the…
2
votes
0 answers

Running smtpd.DebuggingServer in pytest fails but unittest work?

I am attempting to unit test my emailing functionality using the smtpd package. This package allows the use of a debug server. When I run this test using pytest it produces an error during…
Haris
  • 77
  • 10
2
votes
0 answers

Using Python to do SMTP Server with StartTLS

I want to use Python to create an SMTP server that will use TLS via STARTTLS. The Python Lib/smtpd.py library doesn't seem to support this natively. Is there a way to make it work?
vy32
  • 28,461
  • 37
  • 122
  • 246
2
votes
2 answers

Why email client need a SMTP relay server? Is that neccessary?

When setting-up my mobile email client, I usually need to enter the SMTP relay server domain name, but why my email client need a SMTP relay server at all? I think it can directly talk to the smtpd server (e.g. postfix) from which domain the…
Wei Zhong
  • 580
  • 10
  • 17
2
votes
1 answer

Odd behavior difference between linux and os x with threaded smtpd in Python 2.7

I have a threaded smtp server that takes an additional 20 seconds to stop on Linux (ubuntu 14.04 and fedora 20) than it does on OS x (10.8). from email.parser import Parser from smtpd import SMTPServer as StdLibSmtpServer from smtplib import…
jasonamyers
  • 1,281
  • 1
  • 9
  • 11
2
votes
1 answer

Sending mail through Python SMTP Server

I am trying to build a small SMTP Server through which I can be able to send some messages. Looking at the smtpd library found that there was something. But I only was able to create a server that reads the email received, but never sent it to the…
blasrodri
  • 448
  • 5
  • 16
1
2 3 4