Solved

Manual Mail ...

Posted on 1998-10-15
5
293 Views
Last Modified: 2010-04-20

 If I connect to the sendmail daemon(port 25) can I add headers manually?

 Lets say:
   connected to server.com sendmail 8.8.8 ready..
   HELO myserver
   pleased to meet you myserver
   MAIL From <me@myserver.com>
   RECPT To: <someone@server.com>
-> HEADER X-Name: "Here is goes: This is Header X-Name"
   DATA
   begin to write and end with a dot
   TEST MESSAGE
   .
   Quit
   closed ...
   
   How this HEADER X-Name: "Here is goes: This is Header X-Name" goes manually in telnet prompt at mail server port 25???
 
 thanks,
 
0
Comment
Question by:mega_tron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638283
depends on the deamon/service answering on port 25, if it has a command for that you can, otherwise you only may add this as part of the DATA section.
0
 

Author Comment

by:mega_tron
ID: 1638284
soory but I know that the daemon runs on port 25. I want to know how I can enetr everything manually including the headers too. What a Mailer Agent does through its instructions included inside its binary code I want to do them manually. Can I? I know the answer is YES but I do not know HOW: comas, brackets, paranthesis etc. I should use, format of entering them etc.
 
 I will connect throught telnet host.smtp.server.com 25
 
 thanks,
 
0
 

Author Comment

by:mega_tron
ID: 1638285

 Here is manually what I did:
 
220 mail.smtp.server.com ESMTP 8.8.8-970530/8.8.5/MX-980323-gjp; - Ready for food.
>>> EHLO my.computer.com
250-mail.smtp.server.com Hello my.computer.com [999.999.999.999], pleased to meet you
250-EXPN
250-VERB
250-8BITMIME
250-SIZE 10000000
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
>>> MAIL From:<me@my.computer.com> SIZE=22
250 <me@my.computer.com>... Sender ok
>>> RCPT To:<someone@server.com>
250 <someone@server.com>... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 AAA10411 Message accepted for delivery
someone@server.com... Sent (AAA10411 Message accepted for delivery)
Closing connection to mail.smtp.server.com.
>>> QUIT
221 mail.smtp.server.com closing connection

 NOW HOW CAN I ENTER HEADER HERE ...???
 thanks,
 
0
 

Accepted Solution

by:
narzola earned 10 total points
ID: 1638286
Sendmail expects that everyline up to the first blank line in the DATA section of your message is a header.  A line beginning with white space is assumed to be an continuation of the previous header.  If you are adding custom headers, the RFC-822 convention is to prefix them with 'x-'.  Below is an example of a (very) simple mail message.


>>>MAIL FROM: POSTMASTER@mail.domain.com
250 <POSTMASTER@mail.domain.com>... Sender ok
>>>RCPT TO: POSTMASTER@mail.otherdomain.com
250 <POSTMASTER@mail.otherdomain.com>... Recipient ok
>>>DATA
354 Enter mail, end with "." on a line by itself
From: Postmaster <POSTMASTER@mail.domain.com>
To: Postmaster <POSTMASTER@mail.otherdomain.com>
Subject: This is a test message

Postmaster,

      This is a test message.


250 AAA10411 Message accepted for delivery


The important rule is to make sure that there is a blank line after the last header, but before the first line of the e-mail message.  Secondly, if you forget a 'TO:' header, Sendmail and other mail transport agents (MTAs) may add an 'Apparently-To:' header based on the 'RCPT TO:' information.

One other note -- I remember reading somewhere that MTAs are allowed to change the case of mail headers so that 'Subject:' my be transformed into 'SUBJECT:' or 'subject:'.  For a while, Sendmail would capitalize the first letter of every word in a header so that 'x-mozilla-status:' became 'X-Mozilla-Status:'.
0
 

Author Comment

by:mega_tron
ID: 1638287

 narzola,
 that's works... I'm giving you an A. Also thank you!
 
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question