smtp-cli - SMTP command line client
smtp-cli is a powerful SMTP command line client with a support for advanced features, such as STARTTLS, SMTP-AUTH, or IPv6 and with a scriptable message composition capabilities supporting anything from simple plain-text messages right up to building complex HTML emails with alternative plain-text part, attachments and inline images. The MIME-Type of the attachments can either be guessed automatically or alternatively set on the command line, separately for each attachment if required.
./smtp-cli --verbose --host=relayhost.domain.top --enable-auth --user test \
--from test@domain.com --to user@another.domain.org --data message-body.txt
[220] 'server.domain.top ESMTP Postfix'
> EHLO localhost
[250] 'server.domain.top'
[250] 'PIPELINING'
[250] 'SIZE 10240000'
[250] 'VRFY'
[250] 'ETRN'
[250] 'STARTTLS'
[250] 'XVERP'
[250] '8BITMIME'
Starting TLS...
> STARTTLS
[220] 'Ready to start TLS'
Using cipher: EDH-RSA-DES-CBC3-SHA
Subject Name: /C=XX/CN=server.domain.top/Email=info@domain.top
Issuer Name: /C=XX/CN=Domain.TOP Root CA/Email=ca@domain.top
> EHLO localhost
[250] 'server.domain.top'
[250] 'PIPELINING'
[250] 'SIZE 10240000'
[250] 'VRFY'
[250] 'ETRN'
[250] 'AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5'
[250] 'AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5'
[250] 'XVERP'
[250] '8BITMIME'
AUTH method (PLAIN LOGIN DIGEST-MD5 CRAM-MD5): using CRAM-MD5
> AUTH CRAM-MD5
[334] 'PDE0OTQyOTcxOC4yNjAwOTYwQHNlcnZlci5kb21haW4udG9wPg=='
> dGVzdCBmOTUyY2RkM2VlODBiMzk1YjYxNDI4NjBlYzg2Y2ExZnJvb3Q=
[235] 'Authentication successful'
Authentication of test@localhost succeeded
> MAIL FROM:
[250] 'Ok'
> RCPT TO:
[250] 'Ok'
> DATA
[354] 'End data with.'
[250] 'Ok: queued as C5C3A299D7'
> QUIT
[221] 'Bye'
./smtp-cli --verbose --host=relayhost.domain.top --enable-auth --user test \
--from test@domain.com --to user@another.domain.org --data message-body.txt
[220] 'server.domain.top ESMTP Postfix'
> EHLO localhost
[250] 'server.domain.top'
[250] 'PIPELINING'
[250] 'SIZE 10240000'
[250] 'VRFY'
[250] 'ETRN'
[250] 'STARTTLS'
[250] 'XVERP'
[250] '8BITMIME'
Starting TLS...
> STARTTLS
[220] 'Ready to start TLS'
Using cipher: EDH-RSA-DES-CBC3-SHA
Subject Name: /C=XX/CN=server.domain.top/Email=info@domain.top
Issuer Name: /C=XX/CN=Domain.TOP Root CA/Email=ca@domain.top
> EHLO localhost
[250] 'server.domain.top'
[250] 'PIPELINING'
[250] 'SIZE 10240000'
[250] 'VRFY'
[250] 'ETRN'
[250] 'AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5'
[250] 'AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5'
[250] 'XVERP'
[250] '8BITMIME'
AUTH method (PLAIN LOGIN DIGEST-MD5 CRAM-MD5): using CRAM-MD5
> AUTH CRAM-MD5
[334] 'PDE0OTQyOTcxOC4yNjAwOTYwQHNlcnZlci5kb21haW4udG9wPg=='
> dGVzdCBmOTUyY2RkM2VlODBiMzk1YjYxNDI4NjBlYzg2Y2ExZnJvb3Q=
[235] 'Authentication successful'
Authentication of test@localhost succeeded
> MAIL FROM:
[250] 'Ok'
> RCPT TO:
[250] 'Ok'
> DATA
[354] 'End data with
[250] 'Ok: queued as C5C3A299D7'
> QUIT
[221] 'Bye'
Comments
Post a Comment