| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| fishsponge |
Posted: May 7 2003, 10:35 AM
|
||||||||||||||||||
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
Ever wondered why your SMTP server isn't working? or wondered whether it's open-relay or not? well a good test is to telnet into it and send a few emails manually to different addresses. a comprehensive test is to send emails from: remote machine -> mail server -> local user on mail server remote machine -> mail server -> remote email address local machine -> mail server -> local user on mail server local machine -> mail server -> remote email address If your mail server is open relay, then all of these will be allowed... if you are only allowing email to be sent from certain hosts, then the second one of the four should fail. More may fail too, but only if you have more security rules applied. To test you mail server manually, here are the commands taken from an example done on my machine at home (this is a test of sending from a local machine -> remote email address):
This mail was accepted for delivery because my mail server allows relaying to external hosts if the email is sent from a local machine on my LAN. The commands you need to type into the mail server are fairly simple: 1. First of all, telnet into the mail server on the correct port by typing telnet <mailserver> 25:
2. Then introduce yourself as the machine you are logging in from by typing HELO <hostname>:
3. Next, specify which address the email is going to be from by typing MAIL From:<name@domain.com>:
4. You then need to say who the email is going to be delivered to by typing RCPT To:<name@domain.com>. NOTE: You can run this command several times for each email address:
5. Then you need to type DATA to enter the actual email body.
this will then add the email to the message queue on the mail server. You can view messages that have not yet been sent by logging into the mail server, and running the mailq command as root. Now... as part of the DATA entry, you can include the email headers too (such as the "To:", "From:" and "Subject:" fields)... here's how: Once you type the DATA command, enter text like the following:
(remember to end the email data with a single dot ( . ) on a line by itself) When the email with the headers is received it'll look like this:
instead of this:
|
||||||||||||||||||
| fishsponge |
Posted: Aug 5 2003, 02:28 PM
|
||||||||
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
Oh, and here's how to send a dot ( . ) on a new line without ending the DATA field of your email! The problem with sending a dot on a line by itself is the following:
As you can see, once you type "DATA" to begin entering the headers and body of the email it tells you to enter a dot on a line by itself to end the input, and send the email. The email above (when received) looks like this:
What if you want a dot on a line by itself to be an actual part of the email though?? what you need to do is enter two dots on the line instead of one...
this then sends an email that looks like this:
sorted! :D |
||||||||
| Mango |
Posted: May 2 2004, 06:14 PM
|
|
Newbie ![]() Group: Members Posts: 1 Member No.: 273 Joined: 2-May 04 |
Additionally, if you would like two dots on a line by themselves, enter ...
Three dots is .... and so on. |
| fishsponge |
Posted: May 5 2004, 04:10 PM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
indeed :D
|
![]() |
![]() ![]() ![]() |