Sendmail-PMilter
view release on metacpan or search on metacpan
lib/Sendmail/PMilter.pm view on Meta::CPAN
currently running (but this currently contains a race condition that may not
be fixable; at worst, there could be two milters running with one never
receiving connections).
=item inet:PORT[@HOST]
An IPv4 socket, bound to address HOST (default INADDR_ANY), on port PORT.
It is not recommended to open milter engines to the world, so the @HOST part
should be specified.
=item inet6:PORT[@HOST]
An IPv6 socket, bound to address HOST (default INADDR_ANY), on port PORT.
This requires IPv6 support and the Perl IO::Socket::IP package to be installed.
It is not recommended to open milter engines to the world, so the @HOST part
SHOULD be specified.
=item PERMS
Optional permissions mask.
lib/Sendmail/PMilter.pm view on Meta::CPAN
} elsif ($1 eq 'inet') {
require IO::Socket::INET;
$socket = IO::Socket::INET->new(
Proto => 'tcp',
ReuseAddr => 1,
Listen => $backlog,
LocalPort => $2,
LocalAddr => $3
);
} elsif ($1 eq 'inet6') {
require IO::Socket::IP;
$socket = IO::Socket::IP->new(
Proto => 'tcp',
ReuseAddr => 1,
Listen => $backlog,
LocalService => $2,
LocalHost => $3
);
} else {
t/00_pmilter.t view on Meta::CPAN
# configuration files - The first test should fail as a result of the name
# parameter not having been defined.
eval { $milter->auto_getconn() };
ok( defined $@ );
my @sockets = (
'local:/var/run/milter.sock',
'unix:/var/run/milter.sock',
'inet:3333@localhost',
'inet6:3333@localhost'
);
foreach my $index (0 .. 4) {
my $cf = sprintf('t/files/sendmail%d.cf', $index);
SKIP: {
skip("- Missing file $cf", 3) unless -e $cf;
ok( $milter->set_sendmail_cf($cf), $cf );
my $socket = shift @sockets;
ok(
t/files/sendmail3.cf view on Meta::CPAN
Xtest-milter, S=inet6:3333@localhost
( run in 0.246 second using v1.01-cache-2.11-cpan-5f2e87ce722 )