/usr/sbin/uucp-lmtp-inetd is in uucp-lmtp 0.20130117+nmu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #! /usr/bin/python3
"""
@copyright: 2012,2013 Bastian Blank <waldi@debian.org>
@license: GNU GPL-3
"""
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import argparse
import asyncore
import logging
import os
import socket
import uucp_lmtp.logging
from uucp_lmtp.sender.async_server import create_asyncserver
from uucp_lmtp.sender.lmtp_channel import LmtpChannel
from uucp_lmtp.sender.uucp_lmtp import UucpCommandMap, UucpLmtpHandlerFactory
parser = argparse.ArgumentParser(description='LMTP to UUCP/UMTP gateway for Inetd.')
parser.add_argument('map', nargs='+', metavar='DOMAIN=SYSTEM',
help='Maps acceptable domains to UUCP system names. Postfix-style wildcards (.example.com and *) are supported')
args = parser.parse_args()
uucp_lmtp.logging.basic_config('uucp-lmtp-inetd', level=logging.INFO, use_std=False)
commandmap = UucpCommandMap()
for i in args.map:
domain, command = i.split('=', 1)
commandmap[domain] = command
s = socket.fromfd(0, socket.AF_INET, socket.SOCK_STREAM)
if len(s.getsockname()) == 4:
# Workaround as Python does not provide any way to get a socket from the real type
s = socket.fromfd(0, socket.AF_INET6, socket.SOCK_STREAM)
LmtpChannel(s, UucpLmtpHandlerFactory(commandmap))
asyncore.loop()
|