Author: Todd Lyons Date: To: John Jetmore, exim-users, exim-dev Subject: Re: [exim] [exim-dev] Small expect script for testing
On Wed, Jun 26, 2013 at 6:02 PM, John Jetmore <jj33@???> wrote: >> Examples:
>> ./bh.exp 64.14.201.8 tlyons@??? you@???
>> ./bh.exp 64.14.201.8 tlyons@??? you@??? /tmp/1.eml
With permission, bringing this conversation back onto the Exim mailing
lists. (Kinda not) sorry for the cross-posts.
> Ordinarily I would have checked this out and let it slip by because
> heterogeneous toolsets are useful (see also Tony Finch's smtpc), but
> since you specifically mention swaks, I wanted to ask why you wrote
> something in expect that doesn't seem to do more than swaks does,
> except possibly provide a simple command line for the task at hand.
Providing a simple commandline for the task at hand was the goal, yes.
I got tired of copying and pasting SMTP conversation arguments to
test things.
> Specifically, the --pipe argument to swaks allows you access to all of
> swaks' normal options (tls, authentication, etc) via a spawned pipe
> instead of a inet socket. Your two example command lines would be
> written like this:
>
> swaks --pipe '/usr/sbin/exim -bh 64.14.201.8' -f tlyons@??? -t
> you@???
> swaks --pipe '/usr/sbin/exim -bh 64.14.201.8' -f tlyons@??? -t
> you@??? --data /tmp/1.eml
>
> If you didn't know about --pipe, I hope this is useful. If you did
Very much so! I did not know about --pipe, and I did not know about
--data either (I simply had not looked beyond the simple uses I had
performed in the past). So to be perfectly clear, swaks already does
EXACTLY what I spent time constructing with expect. And I assume that
swaks, if it receives a 4xx or 5xx at the EHLO, MAIL, or RCPT stages,
will detect it and exit the smtp conversation at that point. I'll
test to make sure.
> know about --pipe but chose not to use it because it was deficient
> somehow, I'd love to hear details - always looking for ways to make
> swaks better. If you just felt like writing a script, please feel
> free to tell me to mind my own business!
It was simply a lack of awareness of swaks capabilities on my part.
Now that I know, I will use that instead :-) Thanks John!
...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine