#!/usr/bin/env perl

use strict;
use warnings;

our $VERSION = '1.02'; # VERSION
# ABSTRACT: verify smtp addresses
# PODNAME: smtp-verify


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

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

__END__

=pod

=encoding UTF-8

=head1 NAME

smtp-verify - verify smtp addresses

=head1 VERSION

version 1.02

=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 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 SEE ALSO

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

=head1 AUTHOR

Markus Benning <ich@markusbenning.de>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Markus Benning <ich@markusbenning.de>.

This is free software, licensed under:

  The GNU General Public License, Version 2, June 1991

=cut
