Michael,
If I correctly understand you, I need my msfech-send to be able to capture the
DATA portion of SMTP communications?
Kind of "expect" pattern? I will need to emulate that kind of behaviour?
Btw, how can I debug what "mutt" sees or sends to sendmail?
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.org
S: 250 Hello relay.example.org, I am glad to meet you
C: MAIL FROM:<bob@xxxxxxxxxxx>
S: 250 Ok
C: RCPT TO:<alice@xxxxxxxxxxx>
S: 250 Ok
C: RCPT TO:<theboss@xxxxxxxxxxx>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@xxxxxxxxxxx>
C: To: Alice Example <alice@xxxxxxxxxxx>
C: Cc: theboss@xxxxxxxxxxx
C: Date: Tue, 15 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection}
Thank you,
--
Paul Greenberg
PGP key: 0xEF9DE0D8
The information contained in this e-mail, and any attachment, is confidential
and is intended solely for the use of the intended recipient. Access, copying
or re-use of the e-mail or any attachment, or any information contained
therein, by any other person is not authorized. If you are not the intended
recipient please return the e-mail to the sender and delete it from your
computer. Although we attempt to sweep e-mail and attachments for viruses, we
do not guarantee that either are virus-free and accept no liability for any
damage sustained as a result of viruses.
On Wed, Mar 24, 2010 at 10:31:05AM -0700, Michael Elkins wrote:
> On Wed, Mar 24, 2010 at 01:15:15PM -0400, Paul Greenberg wrote:
> > What if I want mutt on "y" (send) to send composed e-mail to my application?
>
> Your choices are either to write a sendmail-compatible command line
> interface I described in my previous message, or write a gateway daemon
> that speaks SMTP. Mutt has no other mechanism for sending mail.
>
> > > Example: $sendmail -B8BITMIME -f me@xxxxxxxxxxx -- mutt-dev@xxxxxxxx
> > This will not be a great fit, because I want to accomplish the task without
> > need to parse the actual message.
> > Native OWA processes will take care of parsing, all I need to do is to
> > submit mutt composed e-mail.
>
> I do not understand how piping the message to your script manually is
> different. It seems to me something really minimal like this should
> work given what you've described:
>
> #!/bin/sh
> # wrapper script to ignore command line arguments
> # header+body are delivered via stdin
> exec msfetch-send
>
>
> me
Attachment:
pgp8CuJ8AZwM2.pgp
Description: PGP signature