Mail distribution via SMTP

Mail distribution via SMTP

Post by Korbinian Abenthu » Sun, 04 May 2003 01:20:35



Hi

I fear that I'm not totally on topic here, but I hope you can
help me anyway;

I was wondering how an SMTP-Server knows where to deliver mail;

local SMTP server like IIS or James know how to deliver it?

Obviously it can't just connect to sun.com:25 and deliver it; Is
there some directory service which knows what SMTP-Server
receives sun.com mail? And can I just connect to that one and
deliver it?

Hmm, I couldn't find anything at google, mainly because I don't
really know what to look for (that's why I'm posting this here)

Background is: I've written a Spamfilter, and would like to send
out a notification if a mail got deleted (cause I'm afraid that
it may delete some "innocent" mails), and I'd prefer to deliver
them directly, without using a local SMTP server or my ISP's.

I'd be grateful for any keywords or hints where to find out
more.
Thanks

 
 
 

Mail distribution via SMTP

Post by Barry Margoli » Sun, 04 May 2003 01:27:28




>Hi

>I fear that I'm not totally on topic here, but I hope you can
>help me anyway;

>I was wondering how an SMTP-Server knows where to deliver mail;

>local SMTP server like IIS or James know how to deliver it?

>Obviously it can't just connect to sun.com:25 and deliver it; Is
>there some directory service which knows what SMTP-Server
>receives sun.com mail? And can I just connect to that one and
>deliver it?

It looks up the MX records for sun.com and connects to port 25 on the
servers listed there.  If there are no MX records, then it connects to
sun.com:25.

This is explained in full detail in RFC 2821.

Quote:>Hmm, I couldn't find anything at google, mainly because I don't
>really know what to look for (that's why I'm posting this here)

>Background is: I've written a Spamfilter, and would like to send
>out a notification if a mail got deleted (cause I'm afraid that
>it may delete some "innocent" mails), and I'd prefer to deliver
>them directly, without using a local SMTP server or my ISP's.

Why don't you want to use an SMTP server?  Some ISPs don't even let
customers connect directly to remote SMTP servers, because most people who
do that are trying to get around spam-limiting software that the ISP's
server implements.

--

Genuity Managed Services, a Level(3) Company, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Mail distribution via SMTP

Post by Paul Ja » Wed, 07 May 2003 00:07:10



> Background is: I've written a Spamfilter, and would like to send
> out a notification if a mail got deleted (cause I'm afraid that
> it may delete some "innocent" mails), and I'd prefer to deliver
> them directly, without using a local SMTP server or my ISP's.

If you deliver them directly, you'll just duplicate much of the effort
that has gone into writing existing mail servers.  You'd be better off
using one that's already been written.

paul

 
 
 

Mail distribution via SMTP

Post by Korbinian Abenthu » Wed, 07 May 2003 00:44:51




> > [My question]
> It looks up the MX records for sun.com and connects to port
> 25 on the servers listed there.  If there are no MX records,
> then it connects to sun.com:25.

> This is explained in full detail in RFC 2821.

Okay ... thank you. Hmm, I've looked into 2821 before, but obviously
not
deep enough. I wanted to know the 'where' before the 'how' ... :-|
silly me.
That was exactly the keyword I was looking for ... BEHOLD THE SMTP
GURU j/k

Quote:> Why don't you want to use an SMTP server?

Mostly because I don't want to install one on my fathers PC, where I'd
like to deploy my software as well.
Secondly, it's fun to write it on my own ;-), cause it's relatively
easy to write TCP-Connections in C# or Java (and I'm a student and
would like to learn these things, as I didn't code much net-software
so far)
Thirdly, I'd only need to send a few mails. I don't need most of the
features of a local SMTPserver (let alone IIS; I only have a dial-up
connection), and it's much easier (from the User's POV aka my father)
to only have one bundled software.
Oh, and I don't want to use my ISP's SMTP, cause naturally I'm going
to answer to some SPAM mails as well, and I don't think it would be a
good idea to confirm my e-mail address that directly.

Quote:> Some ISPs don't
> even let customers connect directly to remote SMTP servers,
> because most people who do that are trying to get around
> spam-limiting software that the ISP's server implements.

Hmm ... but if I am use a *local* SMTP server, then I should be able
to deliver them 'manually' as well, right?
 
 
 

Mail distribution via SMTP

Post by Korbinian Abenthu » Wed, 07 May 2003 00:42:44




> > Background is: I've written a Spamfilter, and would like to
> > send out a notification if a mail got deleted (cause I'm
> > afraid that
> > it may delete some "innocent" mails), and I'd prefer to
> > deliver them directly, without using a local SMTP server or
> > my ISP's.

> If you deliver them directly, you'll just duplicate much of
> the effort that has gone into writing existing mail servers.
> You'd be better off using one that's already been written.

That's true of course, but like I said in my answer to Barry, I only
want to use a very small part of a 'grown up' SMTPServer.
And, as I'm still a student, I'd like to learn how to do these things
:-)
 
 
 

Mail distribution via SMTP

Post by Barry Margoli » Wed, 07 May 2003 02:16:55




>Thirdly, I'd only need to send a few mails. I don't need most of the
>features of a local SMTPserver (let alone IIS; I only have a dial-up
>connection), and it's much easier (from the User's POV aka my father)
>to only have one bundled software.
>Oh, and I don't want to use my ISP's SMTP, cause naturally I'm going
>to answer to some SPAM mails as well, and I don't think it would be a
>good idea to confirm my e-mail address that directly.

Sending through your ISP's mail server shouldn't affect what From address
you put in the message.

Quote:>> Some ISPs don't
>> even let customers connect directly to remote SMTP servers,
>> because most people who do that are trying to get around
>> spam-limiting software that the ISP's server implements.

>Hmm ... but if I am use a *local* SMTP server, then I should be able
>to deliver them 'manually' as well, right?

No.  Your local SMTP server would have to make SMTP connections to the
remote SMTP servers.  If the ISP blocks SMTP connections to anywhere other
than their server, it won't be able to.

--

Genuity Managed Services, a Level(3) Company, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Mail distribution via SMTP

Post by Ron Bennet » Wed, 07 May 2003 14:44:37



says...

   ...snipped...

Quote:

>Hmm ... but if I am use a *local* SMTP server, then I should be able
>to deliver them 'manually' as well, right?

Yes and no, often such direct SMTP connections from dial-up accounts
increasingly don't work well for numerous reasons...port filtering by
your ISP and/or elsewhere in transit, port filtering by the remote
side...and even then if a connection is established, the various checks
many SMTP servers perform, such as header checks and double look-ups
(forward and reverse) can foulup things along with various filters and
spam block lists. But even assuming the email makes all the way to the
receiver's computer, the person still may not get it depending on how
they configure their spam filters, etc.

Yes, there are ways around all of the above problems, but really the
best way is to use your ISP's SMTP server and simply change the FROM:
header to what you want; for ISPs that don't allow that, contact their
technical support for assistance and/or use a web-based email account.

Ron Bennett

 
 
 

Mail distribution via SMTP

Post by loui » Wed, 07 May 2003 22:29:46


Quote:> > If you deliver them directly, you'll just duplicate much of
> > the effort that has gone into writing existing mail servers.
> > You'd be better off using one that's already been written.

> That's true of course, but like I said in my answer to Barry, I only
> want to use a very small part of a 'grown up' SMTPServer.
> And, as I'm still a student, I'd like to learn how to do these things
> :-)


1) The sender does a DNS query for the MX record at XYZ.COM

This will turn one or more IP addresses of where the recever mail server is
located.  You will try to connect to the first one, if it fails, you try the
next one.    If you have Windows, you can type the following to see the MX
records despammed.com

        nslookup -querytype=mx despammed.com

despammed.com   MX preference = 10, mail exchanger = mail.despammed.com
despammed.com   MX preference = 50, mail exchanger = mail-alt.despammed.com
despammed.com   nameserver = www.vivtek.com
mail.despammed.com      internet address = 66.244.64.22
mail-alt.despammed.com  internet address = 208.245.164.131
www.vivtek.com  internet address = 66.244.64.22

2) One you connect to the MX location, you basically send the following
commands:

HELO yourhostname
MAIL FROM:  <youraddress>

DATA
<<<your email message>>>>
.  <<< very IMPORTANT final DOT!
QUIT

Of course, you should follow and honor the response codes for each command,
otherwise you can become a nuisance and you can potentially get blacklisted.

 
 
 

1. Latency in sending mail via SMTP with PacBell DSL?

As many of you here already know (thank you again for all of your help!), we
are running a small LAN (Pentium II desktop [the server machine] running w95,
another w95 machine, and a Sony Viao laptop).

We are running WinGate as a proxy server, and it works well.

Just yesterday we had PacBell DSL installed;  it took awhile to get everything
up and running again, coexisting peacefully, but everything is now running as
it should.

The one thing I am noticing, however, which is different from before we had
the DSL (we were using a USR 56.6k external modem w/PPP) is that now (since
the DSL install) there is a significant latency in sending mail.  In
otherwords, when I hit 'send' to send mail (we use Pegaus mail), it takes
quite a while for the send to happen.  Interestingly, if I send several mails
in sequence, it "hangs" sooner with each one.  In otherwords, with the first
mail I send, I see it say "7% complete", then it just hangs, then eventually
it goes through.  The second mail hangs at only "3% complete", and the third
doesn't even get to any "% complete", it just hangs, then goes through.

This isn't a function of Pegasus, as I have the same latency when I send email
through my newsreader (NewsExpress), but *not* when I post through the
newsreader.  Hence I believe that this is probably an SMTP issue (although I
am open to being corrected!)

Again, I did not have this problem before the switch over to DSL.  I am using
"pacbell.net" as my smtp server - that was just a guess, as of course nobody
from PacBell told me anything, and I tried "smtp.pacbell.net" which didn't
work, and I had no other bright ideas as to what their SMTP server might be
called.  So *perhaps* it's actually a DNS resolution latency on their end, and
there is another direct SMTP server I should be using?

Anyways, any ideas, suggestions, advice would be greatly appreciated!

Thanks again!!

Anne
William - 4/11/98
Jessica - 8/28/78

Resources on intuitive parenting, breastfeeding, co-sleeping, and more: http://www.intuitiveparenting.org
       I am: Mom, Attorney, Professor, Advocate for Fathers, Lactation Advisor (in training)
                           http://www.parentinglaw.com

2. CHEATS FOR RAINBOW SIX

3. Routing incoming SMTP mail from router to local SMTP Server ???

4. Patch/Sound Editor For Roland MKS-30

5. Unix smtp mail to dial-up MS mail forwarding program?

6. New Cisco 800 Pricing ?

7. MS-Mail <-> SMTP mail : how ?

8. Logging function on hpterm

9. MS Mail versus SMTP, POP, SLIP, Mail Eudora

10. Voice Mail Distribution Lists

11. Automatic Pegasus Mail Distribution

12. Pegasus Mail - Auto Distribution

13. Mail distribution