#!/usr/bin/env perl

use strict;
use warnings;

# VERSION
# ABSTRACT: verify smtp addresses
# PODNAME: smtp-verify

=head1 DESCRIPTION

smtp-verify could be used to test if mail can be delivered to recipients.

It uses MAIL FROM and RCPT TO commands to test if recipients exist.

Additional checks available are:

=over

=item check message size and mailbox quotas

If a message size is give and the server supports the SIZE extension
it will check if the server will accept the size of the message.

=item check for STARTTLS

It will check if the STARTTLS extension is available.

=item check for TLSA record of MX

It will check a TLSA for the MX has been published.

This also requires that your resolver sets the 'ad' flag.

=item check for OPENPGPKEY record of recipients

It will check a OPENPGPKEY for the recipient address has been published.

This also requires that your resolver sets the 'ad' flag.

=back

If the server provides the PIPELINING extension smtp-verify
will send RCPT commands in bulks.

=head1 SYNOPSIS

  usage: smtp-verify [-?bdfHhjnpsst] [long options...]
   -h -? --usage --help           Prints this usage information.
   -n STR --helo_name STR         name to use in EHLO
   -H --host                      query this host instead of MX
   -p INT --port INT              port to use (default 25)
   -t INT --timeout INT           smtp timeout (default 30s)
   -a --tlsa                      lookup if TLSA record is available
   -o --openpgpkey                lookup if OPENPGPKEY records are
                                  available
   -d --debug                     print debug info to STDERR
   -b INT --rcpt_bulk_size INT    how many RCPTs to send in one bulk
                                  when PIPELINING (default 10)
   -f STR --from STR              address to use in MAIL FROM
   -s INT --size INT              how many RCPTs to send in one bulk
                                  when PIPELINING (default 10)
   -j --json                      output JSON

=head1 SEE ALSO

Perl class interface L<Net::SMTP::Verify>

=cut

use Net::SMTP::Verify::App;

my $app = Net::SMTP::Verify::App->new_with_options;
$app->run;

