SMTP-mailserver - how?

O

Ole Hanson

Hi

It is just plain greek to me how/why the SmtpMail-class allows you to send
mail WITHOUT specifiying a password or authentication method for the
mailserver.

E.g.
MailMessage Message = new MailMessage();
Message.To = args[0];
Message.From = args[1];
Message.Subject = args[2];
Message.Body = args[3];

SmtpMail.SmtpServer = "somemailserver here...";
SmtpMail.Send(Message);


Nowhere do I indicate any password nor username for using the mailserver!
But it works?

No comprendo!
 
M

Michael Voss

Hi !

Ole Hanson wrote:
[...snip...]
It is just plain greek to me how/why the SmtpMail-class allows you to send
mail WITHOUT specifiying a password or authentication method for the
mailserver.
[...snip...]

Plain SMTP does not require any authentication. Theoretically, you can send
any mail using any SMPT-Server you like (unless that server uses some kind
of autentication mechanism like SMTP-after-POP).
 
A

Adam Clauss

Michael Voss said:
Plain SMTP does not require any authentication. Theoretically, you can send
any mail using any SMPT-Server you like (unless that server uses some kind
of autentication mechanism like SMTP-after-POP).

Just a note on this - while it is true that most SMTP servers do not actually require any kind of authentication - they DO typically
limit who can send mail through them. Ex: Only allowing mail that is from within the network they are serving and only allowing
mail that is sent to their network.

Most servers do not (and definately SHOULD not) allow mail from anyone/to anyone to be sent through them (open relaying). Servers
like this help contribute to Spam greatly. I had server setup once for a while as a "blackhole". I simply set it up such that it
would receive mail, but never actually did anything with it. I never announced it anywhere - so anyone sending "legit" email would
not be affected. I get up the next morning to see that it had collected over 3000 emails. I open some of them up in notepad and
they were just about every kind of junk mail you can imagine :) Considered leaving it up just to keep sucking up junk mail...
 
I

Ignacio Machin \( .NET/ C# MVP \)

HI Adam,

Adam Clauss said:
Just a note on this - while it is true that most SMTP servers do not
actually require any kind of authentication - they DO typically
limit who can send mail through them. Ex: Only allowing mail that is from
within the network they are serving and only allowing
mail that is sent to their network.

Each day are fewer and fewer SMTP server that do not require auth. I would
be surprised if an ISP do not demand it, only those servers inside an
enterprise are like that, even worse lots of ISP are also filtering port 25
outgoing , bellsouth started doing so :(

cheers,
 
J

Joris Dobbelsteen

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message
Each day are fewer and fewer SMTP server that do not require auth. I would
be surprised if an ISP do not demand it, only those servers inside an
enterprise are like that, even worse lots of ISP are also filtering port 25
outgoing , bellsouth started doing so :(
<snip>

Why, you normally want only two things:
(1) allow local users (or customers) to send to anywhere
(2) deny remote users except for local deliveries

So you ensure you borders block any internal IPs coming from the outside.
Configure your mail server only to relay from internal IPs.

This is how I did set up my mail server (and most ISPs do, in fact I don't
know a single ISP where you have to authenticate to SEND mail).

- Joris
 
A

Adam Clauss

Joris Dobbelsteen said:
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message
<snip>

Why, you normally want only two things:
(1) allow local users (or customers) to send to anywhere
(2) deny remote users except for local deliveries

So you ensure you borders block any internal IPs coming from the outside.
Configure your mail server only to relay from internal IPs.

That is how our email server at Texas A&M operates. However, the recently added the OPTION of authenticating. If I authenticate,
then I do not need to be a local user - I can send through them from anywhere. But it is not required. Nor is it required for my
ISP at home (Time Warner).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Emergency 1
sending mail pb 6
Mail Send Problems 1
Mail Send Problem 4
SmtpMail.Send fails 3
**Bug with MailMessage** 2
SMTPMAIL 3
SmtpClient Problem 4

Top