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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
.\" $OpenBSD: smtpfwdd.8,v 1.15 2001/08/20 06:09:32 mpech Exp $
.Dd December 10, 1997
.Dt SMTPFWDD 8
.Os
.Sh NAME
.Nm smtpfwdd
.Nd Obtuse Systems SMTPFWDD message forwarding daemon
.Sh SYNOPSIS
.Nm smtpfwdd
.Op Fl q
.Op Fl d Ar spooldir
.Op Fl u Ar user
.Op Fl g Ar group
.Op Fl s Ar mailprog
.Op Fl M Ar maxchildren
.Op Fl P Ar poll time
.Sh DESCRIPTION
The
.Nm
daemon forwards mail messages from a spool directory to
their eventual destinations.
It regularly scans the spool directory in
which its symboitic companion program
.Xr smtpd 8
stores messages and invokes
a mail program (such as
.Xr sendmail 8 )
to forward them.
It is the forward portion of an SMTP store and forward proxy.
.Nm
is a standalone daemon, usually invoked at system startup.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d
Specify a different spool
.Ar directory .
This should be the same directory in which
.Xr smtpd 8
is spooling files (usually
.Pa /var/spool/smtpd )
.It Fl g
Specify a
.Ar group
to run as.
Same as user above.
.It Fl M
Specifies
.Ar maxchildren
as the maximum number of children
.Nm
should be allowed to spawn at once when delivering mail.
Default is 10.
.It Fl P
specifies a polling interval of
.Ar polltime
seconds indicating how often the master
.Nm
process should wake up and check the spool directory for new mail
to forward.
Default is 10 seconds.
.It Fl q
Tell
.Nm
to be quieter.
By default,
.Nm
emits very verbose syslog messages.
With
this option it will emit one line of log for each normal message exchange.
.It Fl s
Specify a different mail program to use to forward mail.
The default is
.Pa /usr/sbin/sendmail
Any replacement must be able to be invoked in the same manner as sendmail
with a -f fromaddress, followed by one or more destination addresses
on the command line.
.It Fl u
Specify a
.Ar user
to run as.
This user must not be root but should normally be a user that is able to run
.Xr sendmail 8
and use the
.Fl f
option to specify the sender of a mail message.
.El
.Sh SEE ALSO
.Xr inetd 8 ,
.Xr sendmail 8 ,
.Xr smtpd 8
.Sh BUGS
Since
.Xr sendmail 8
is not normally running as a daemon when using
.Xr smtpd 8
and
.Xr smtpfwdd 8 ,
one must use cron to periodically invoke sendmail -q so that
queued messages are retried for eventual delivery, alternatively sendmail
may be run standalone, but not listening to the network if your version
of sendmail supports doing this correctly.
.Pp
There are many different variations of sendmail.
.Nm
will check
and pay attention to the exit status of the sendmail processes it
invokes, possibly retrying an invocation of sendmail.
If you aren't using real unadulterated Berkeley sendmail or a recent
vintage, you may need to disable the exit status checking at compile time.
.Pp
.Xr sendmail 8
can't handle a
.Ql \&.
on one line in a message body.
This problem is bypassed in
.Nm
by giving sendmail the option
.Fl oitrue .
Again, if you aren't using genuine sendmail, you may need to disable this at
compile time.
|