Networking Forums

Networking Forums > Computer Networking > Linux Networking > Where does sendmail fetch the <mailText> from?

Reply
Thread Tools Display Modes

Where does sendmail fetch the <mailText> from?

 
 
no.top.post@gmail.com
Guest
Posts: n/a

 
      09-02-2011, 07:48 AM
The docos for my prefered front-end mentions 'MailQ'.
`man mailq` indicates that that is a link to sendmail.
The source-code of the front-end says:
"/usr/lib/sendmail -oi -t < /tmp/Mailer.Send"

`man sendmail` says:
-ox value Set option x to the specified value.
This form uses single character names only.
The short names are not described in this manual page;
see the Sendmail Installation and Operation Guide for details.
-i Ignore dots alone on lines by themselves in incoming messages.
This should be set if you are reading data from a file.
-t Read message for recipients. To:, Cc:, and Bcc: lines will
be scanned for recipient addresses. The Bcc: line will be
deleted before transmission.

Apparently the font-end was supposed to
`put the outgoing mail to /tmp/Mailer.Send`
before calling `sendmail`.

I need to test/bebug the front-end and sendmail separately.

Q. how can I feed a <mailMesg> to sendmail to be sent ?

What's the minimal format besides fields:
"To: ","Cc: ", "Bcc: ", 'Subject: " & body terminated with dot-line?

How can I test/debug using the 'loop'/127.0.0.1 to avoid dialup
costs?

== TIA

 
Reply With Quote
 
 
 
 
Chris Davies
Guest
Posts: n/a

 
      09-03-2011, 08:27 PM
(E-Mail Removed) wrote:
> The docos for my prefered front-end mentions 'MailQ'.
> `man mailq` indicates that that is a link to sendmail.


The mailq command lists the contents of the mail queue. (That's email
that has not yet been delivered.)


> The source-code of the front-end says:
> "/usr/lib/sendmail -oi -t < /tmp/Mailer.Send"


That queues a message contained in "/tmp/Mailer.Send" to the mail
subsystem (whether or not that subsystem is implemented by the application
called "sendmail"; you'll find that /usr/lib/sendmail always exists). The
submission program is expected to scan the message headers for To, Cc,
Bcc lines to work out where to deliver the message.


> Apparently the font-end was supposed to `put the outgoing mail to
> /tmp/Mailer.Send` before calling `sendmail`.


Looks like it, yes.


> I need to test/bebug the front-end and sendmail separately.


You could (temporarily) replace /usr/lib/sendmail with a simple script
that captures date/time, command line arguments, and stdin, to a file. You
can then see what was going to be passed to the mail subsystem.

#!/bin/sh
exec 1>>/tmp/my-sendmail.log
echo "Date:" `date`
echo "Args ($#): $*"
echo "STDIN:"
sed 's/^/| /'
echo
exit 0


> Q. how can I feed a <mailMesg> to sendmail to be sent ?


Another poster has given you a one-liner to try this. You can also try this:

uptime | mail -s 'TEST MESSAGE' -v $USER


> What's the minimal format besides fields:
> "To: ","Cc: ", "Bcc: ", 'Subject: " & body terminated with dot-line?


From: Me
To: You

some message goes here

In your context you do not need the trailing dot; EOF is sufficient.


> How can I test/debug using the 'loop'/127.0.0.1 to avoid dialup
> costs?


Unless you (or someone) has configured your mail subsystem as a satellite
node, you can email any local account just "as is", with an @{domain}
bit after the username.

Chris
 
Reply With Quote
 
NoHtmlMailsPlease
Guest
Posts: n/a

 
      09-11-2011, 10:21 AM


"Chris Davies" <chris-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> (E-Mail Removed) wrote:
>> The docos for my prefered front-end mentions 'MailQ'.
>> `man mailq` indicates that that is a link to sendmail.

>
> The mailq command lists the contents of the mail queue. (That's email
> that has not yet been delivered.)
>
>
>> The source-code of the front-end says:
>> "/usr/lib/sendmail -oi -t < /tmp/Mailer.Send"

>
> That queues a message contained in "/tmp/Mailer.Send" to the mail
> subsystem (whether or not that subsystem is implemented by the application
> called "sendmail"; you'll find that /usr/lib/sendmail always exists). The
> submission program is expected to scan the message headers for To, Cc,
> Bcc lines to work out where to deliver the message.
>
>
>> Apparently the font-end was supposed to `put the outgoing mail to
>> /tmp/Mailer.Send` before calling `sendmail`.

>
> Looks like it, yes.
>
>
>> I need to test/bebug the front-end and sendmail separately.

>
> You could (temporarily) replace /usr/lib/sendmail with a simple script
> that captures date/time, command line arguments, and stdin, to a file. You
> can then see what was going to be passed to the mail subsystem.
>
> #!/bin/sh
> exec 1>>/tmp/my-sendmail.log
> echo "Date:" `date`
> echo "Args ($#): $*"
> echo "STDIN:"
> sed 's/^/| /'
> echo
> exit 0
>
>
>> Q. how can I feed a <mailMesg> to sendmail to be sent ?

>
> Another poster has given you a one-liner to try this. You can also try
> this:
>
> uptime | mail -s 'TEST MESSAGE' -v $USER
>
>
>> What's the minimal format besides fields:
>> "To: ","Cc: ", "Bcc: ", 'Subject: " & body terminated with dot-line?

>
> From: Me
> To: You
>
> some message goes here
>
> In your context you do not need the trailing dot; EOF is sufficient.
>
>
>> How can I test/debug using the 'loop'/127.0.0.1 to avoid dialup
>> costs?

>
> Unless you (or someone) has configured your mail subsystem as a satellite
> node, you can email any local account just "as is", with an @{domain}
> bit after the username.
>
> Chris --------------

Thanks, that all tests OK.
But my <front end> can't <pipe to sendmail>.
It can only read & write *nix files. But a pipe IS a file ?
So, I'll just let it write to a file and then have a script to
<pipe the-file to sendmail>.

So it seems that I can get my <From: To: Subject: body>
to sendmail. Now I need sendmail to forward the mail to my
ISP, and get past the TXAuthenticate protocol.

Obviously sendmail needs to know/have-access-to my:
SMTP server
UserID
Password
? what else ?

On an earlier linux version these were set up.
Now I can't see how/where to set them.

I've always used a dial-up with specific SEND-MAIL-NOW, and
not <mail gets sent automatically in the background> and once
when I had:
cat JapWME | sendmail -t -f (E-Mail Removed)
it repeatedly sent an email.
I don't know why that happened, and I don't want it to
happen again.
Perhaps that line was uncommented in the script, which did
my online-tasks; so it re-sent each time the script was run?

Obviously sendmail keeps an <outbox> and it removes the
item once it gets an <accepted signal> from the SMTP ?

Right now, I haven't got access to my dialup & am using a crappy
M$+wireless-modem. But I want all the parts setup for when I get
access to dialup again.

Does this look right? :-
-> tail /var/log/maillog == ...
Sep 11 09:37:33 localhost sendmail[16782]:
p8B7bXKn016782: to=root, ctladdr=root (0/0), delay
....dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Why is "Connection refused by [127.0.0.1]" ?
Is that relevant to sendmail-relaying-to-my-ISP ?

The confusing aspect, is that apparently, sendmail will store
the post, and automatically send, when it gets access to ppp.

I prefer to have CONTROL: to say 'NOW send that mail',
via ppp -> serial-port -> modem.

== TIA


 
Reply With Quote
 
NoHtmlMailsPlease
Guest
Posts: n/a

 
      09-15-2011, 05:08 AM


"Chris Davies" <chris-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> NoHtmlMailsPlease <(E-Mail Removed)> wrote:
>> Obviously sendmail needs to know/have-access-to my:
>> SMTP server
>> UserID
>> Password
>> ? what else ?

>
>> On an earlier linux version these were set up.
>> Now I can't see how/where to set them.

>
> This depends entirely on the type of mail subsystem you're using. (Just
> because /usr/lib/sendmail exists doesn't mean that you're running
> sendmail.)
>
>> Does this look right? :-
>> -> tail /var/log/maillog == ...
>> Sep 11 09:37:33 localhost sendmail[16782]:
>> p8B7bXKn016782: to=root, ctladdr=root (0/0), delay
>> ...dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

>
> This suggests to me that your mail subsystem isn't set up to recognise
> that it is itself, which in turn suggests that it's probably not
> configured at all.
>
> We need to know the flavour of GNU/Linux you're running (what
> distribution) and what mail subsystem you've got installed. (One way of
> determining this is to check if /usr/lib/sendmail is a symbolic link,
> and if so where it ends up.)
>

I'm not limited to ONE linux. Nor is sendmail restricted to one fork.
Right now, I switched back from Slak13 to FC1.
`pstree` indicates that, sendmail is running; and the link-chain leads
there.

>> The confusing aspect, is that apparently, sendmail will store
>> the post, and automatically send, when it gets access to ppp.

>
> You can either have dial-on-demand triggered by the attempted delivery,
> or have delivery-on-connection triggered by the link coming up. Your
> choice.
>

I want to send after *I* decide to dial/connect and *I* decide to 'post
mail'.

==TIA
> Chris


 
Reply With Quote
 
Joe Zeff
Guest
Posts: n/a

 
      09-15-2011, 05:58 PM
On Thu, 15 Sep 2011 07:08:35 +0200, NoHtmlMailsPlease wrote:

> Right now, I switched back from Slak13 to FC1.


You do realize, don't you, that every version of Fedora Core is long past
EOL and is badly obsolete? The current version is Fedora 15 (Note the
lack of the word "Core," removed after version 6.) You really should
upgrade to a more current version if your hardware's up to it; if not, I'd
suggest a recent version of CentOS. This will not only get you access to
current security patches it will install a recent version of sendmail
which might be exactly what you need.

--
Joe Zeff -- The Guy With The Sideburns:
http://www.zeff.us http://www.lasfs.info
The free market works, but just not always the way you
want it to.
 
Reply With Quote
 
ska
Guest
Posts: n/a

 
      09-19-2011, 07:46 AM
On Sep 15, 7:08 am, "NoHtmlMailsPlease" <UsePlainT...@dog.edu> wrote:

> I want to send after *I* decide to dial/connect and *I* decide to 'post
> mail'.


Reconfigure the sendmail demon started by the system startup to queue
only (deferred mode) with no queue runner, then to flush the queue use
"sendmail -q".

Regards, ska
 
Reply With Quote
 
no.top.post@gmail.com
Guest
Posts: n/a

 
      09-19-2011, 09:12 AM
In article <4e723cd1$0$26447$(E-Mail Removed) >, Joe Zeff <(E-Mail Removed)> wrote:

> On Thu, 15 Sep 2011 07:08:35 +0200, NoHtmlMailsPlease wrote:
>
> > Right now, I switched back from Slak13 to FC1.

>
> You do realize, don't you, that every version of Fedora Core is long past
> EOL and is badly obsolete? The current version is Fedora 15 (Note the
> lack of the word "Core," removed after version 6.) You really should
> upgrade to a more current version if your hardware's up to it; if not, I'd
> suggest a recent version of CentOS. This will not only get you access to
> current security patches it will install a recent version of sendmail
> which might be exactly what you need.
> --


Without any consideration of PeeCeeness, let me record history:

In199?, several years after I had B.Sc'ed with 1 major in Compt Sc,
and was happy with Win3.1, my ISP told that I'd have to "upgrade"
to W95, I said "screw you" and turned to ETHO which then already
had a text interface FAR superior to anything you have ever
experienced.

And I installed Slak3.
At that time RH6.2 was the hotest thing under the sun and
all the kiddies told "that would remove all out-of-date
problems".

Skip Mandrake9, FC1, Deb-Lenny, Slak13, Caldera ..etc.

C.a. 2000's I started noticing strange concepts that the kiddies were
using, like "repairing your credit", and I watched the global
economic crisis unfolding, because the kiddies had lost what
was common sense 4 generations ago.

I've been asking myself:
what happened to all the clowns who said "get RH6.2, to solve all
problems": have they died, or are they just peddling different shit
now?

My prefered linux installation is my Mandrake9 for complex reasons,
which I'm not using now only because krnl 2.4 doesn't seem to handle
USBstik. IE 2 stages BACKWARDS from DebLenny or Slak13 is better!

Changing conditions, cause me to lose access to a landline during
the week, so I had to buy a NEW netbook to drive a wireless-modem.

This NEWER Win7 is a disaster compared to Forte-Agent of 199?
under Win3.1.

You kiddies need to wake up and realise that NEW STUFF doesn't
always solve the problem.
Or perhaps you're a trainee sales clerk?

BTW, I can give a concrete analysis of why the newest M$ is
less productive than 199? ForteAgent, and question what is your
objective definition of "is badly obsolete".

 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a

 
      09-19-2011, 09:48 AM
["Followup-To:" header set to comp.os.linux.networking.]
On Mon, 2011-09-19, (E-Mail Removed) wrote:
> In article <4e723cd1$0$26447$(E-Mail Removed) >, Joe Zeff <(E-Mail Removed)> wrote:
>
>> On Thu, 15 Sep 2011 07:08:35 +0200, NoHtmlMailsPlease wrote:
>>
>> > Right now, I switched back from Slak13 to FC1.

>>
>> You do realize, don't you, that every version of Fedora Core is long past
>> EOL and is badly obsolete? The current version is Fedora 15 (Note the
>> lack of the word "Core," removed after version 6.) You really should
>> upgrade to a more current version if your hardware's up to it; if not, I'd
>> suggest a recent version of CentOS. This will not only get you access to
>> current security patches it will install a recent version of sendmail
>> which might be exactly what you need.
>> --

>
> Without any consideration of PeeCeeness, let me record history:


[snip]

> You kiddies need to wake up and realise that NEW STUFF doesn't
> always solve the problem.
> Or perhaps you're a trainee sales clerk?


That's a rude response to a piece of friendly advice. *plonk*

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Joe Zeff
Guest
Posts: n/a

 
      09-19-2011, 03:28 PM
On Mon, 19 Sep 2011 09:12:09 +0000, no.top.post wrote:

> You kiddies need to wake up and realise that NEW STUFF doesn't always
> solve the problem.
> Or perhaps you're a trainee sales clerk?


The first computer I ever programmed was an IBM 1620 Mod 2, with 20,000
digits of core memory, programmed by using an IBM 029 to punch the numeric
program onto punched cards. Now that we're done with the DSW, do you want
help, or do you want to wank? Your choice.

--
Joe Zeff -- The Guy With The Sideburns:
http://www.zeff.us http://www.lasfs.info
Complaining about the wait times doesn't make them shorter.
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      09-20-2011, 07:35 PM
On 19 Sep 2011, in the Usenet newsgroups comp.os.linux.networking and
comp.mail.sendmail, in article
<4e775fa2$0$26298$(E-Mail Removed) >, Joe Zeff wrote:

>no.top.post wrote:


>> You kiddies need to wake up and realise that NEW STUFF doesn't
>> always solve the problem.
>> Or perhaps you're a trainee sales clerk?


>The first computer I ever programmed was an IBM 1620 Mod 2, with
>20,000 digits of core memory, programmed by using an IBM 029 to
>punch the numeric program onto punched cards.


Ah, so you didn't start until solid-state and digital became standard.
Some of us pre-date that. Joe, you're responding to a nym-shifting
troll. There is nothing the troll will post that is worth reading,
never mind responding to.

>Now that we're done with the DSW, do you want help, or do you want to
>wank? Your choice.


No, the troll wants victims - fix your news reader, adding the troll
to the kill file. Also, you don't need poultry to post here, and you
really ought to fix that.

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot fetch mail from remote host ttf Linux Networking 6 06-01-2006 05:21 PM
DHCP - IP address fetch feature in XP SP2 Jan Windows Networking 0 04-07-2006 05:29 PM
Sendmail John Linux Networking 2 05-23-2004 08:07 PM
tiscali dsl flat: ports are blocked, can I tell server to fetch packets for me instead? ludwig Linux Networking 1 11-09-2003 08:57 PM
script to fetch headers only from popserver Alan Connor Linux Networking 0 09-22-2003 07:01 AM



1 2 3 4 5 6 7 8 9 10 11