Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #549

Re: Where does sendmail fetch the <mailText> from?

From Chris Davies <chris-usenet@roaima.co.uk>
Newsgroups comp.os.linux.networking, comp.mail.sendmail
Subject Re: Where does sendmail fetch the <mailText> from?
Date 2011-09-03 21:27 +0100
Organization Roaima. Harrogate, North Yorkshire, UK
Message-ID <37faj8xsrv.ln2@news.roaima.co.uk> (permalink)
References <j3q1oj$iug$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


no.top.post@gmail.com 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

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Where does sendmail fetch the <mailText> from? no.top.post@gmail.com - 2011-09-02 07:48 +0000
  Re: Where does sendmail fetch the <mailText> from? Greg Russell <me@invalid.com> - 2011-09-02 19:38 +0000
  Re: Where does sendmail fetch the <mailText> from? Chris Davies <chris-usenet@roaima.co.uk> - 2011-09-03 21:27 +0100
    Re: Where does sendmail fetch the <mailText> from? "NoHtmlMailsPlease" <UsePlainText@dog.edu> - 2011-09-11 12:21 +0200
      Re: Where does sendmail fetch the <mailText> from? Chris Davies <chris-usenet@roaima.co.uk> - 2011-09-12 09:33 +0100
        Re: Where does sendmail fetch the <mailText> from? "NoHtmlMailsPlease" <UsePlainText@dog.edu> - 2011-09-15 07:08 +0200
          Re: Where does sendmail fetch the <mailText> from? Joe Zeff <the.guy.with.the.sideburns@lasfs.info> - 2011-09-15 17:58 +0000
            Re (2): Where does sendmail fetch the <mailText> from? no.top.post@gmail.com - 2011-09-19 09:12 +0000
              Re: Re (2): Where does sendmail fetch the <mailText> from? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-19 09:48 +0000
              Re: Re (2): Where does sendmail fetch the <mailText> from? Joe Zeff <the.guy.with.the.sideburns@lasfs.info> - 2011-09-19 15:28 +0000
                Re: Re (2): Where does sendmail fetch the <mailText> from? ibuprofin@painkiller.example.tld.invalid (Moe Trin) - 2011-09-20 14:35 -0500
                Re: Re (2): Where does sendmail fetch the <mailText> from? Aragorn <stryder@telenet.be.invalid> - 2011-09-20 22:39 +0200
                Re: Re (2): Where does sendmail fetch the <mailText> from? Joe Zeff <the.guy.with.the.sideburns@lasfs.info> - 2011-09-20 21:50 +0000
                Re: Re (2): Where does sendmail fetch the <mailText> from? Joe Zeff <the.guy.with.the.sideburns@lasfs.info> - 2011-09-20 21:54 +0000
                Re: Re (2): Where does sendmail fetch the <mailText> from? Aragorn <stryder@telenet.be.invalid> - 2011-09-21 00:19 +0200
                Re: Re (2): Where does sendmail fetch the <mailText> from? Curt <curty@free.fr> - 2011-09-24 14:01 +0000
                Re: Re (2): Where does sendmail fetch the <mailText> from? Aragorn <stryder@telenet.be.invalid> - 2011-09-24 16:13 +0200
                Re: Re (2): Where does sendmail fetch the <mailText> from? Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2011-09-20 19:10 -0700
                Re: Re (2): Where does sendmail fetch the <mailText> from? Aragorn <stryder@telenet.be.invalid> - 2011-09-21 09:42 +0200
                Re: Re (2): Where does sendmail fetch the <mailText> from? Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2011-09-21 08:03 -0700
                Re: Re (2): Where does sendmail fetch the <mailText> from? ibuprofin@painkiller.example.tld.invalid (Moe Trin) - 2011-09-21 22:11 -0500
                Re: Re (2): Where does sendmail fetch the <mailText> from? Joe Zeff <the.guy.with.the.sideburns@lasfs.info> - 2011-09-20 21:45 +0000
          Re: Where does sendmail fetch the <mailText> from? ska <skg@mail.inf.fh-brs.de> - 2011-09-19 00:46 -0700

csiph-web