FEATURE(relay_local_from)
During an SMTP conversation, the sending host
specifies the address of the envelope sender by
issuing a MAIL
From:
SMTP command. RFC2822 commentary
and DSN extensions are then discarded from that
specified address, and the result is stored in the
$f
macro ($f on page 824).
If you wish, you can use the value in the $f
macro to determine
whether a message should be relayed to any outside
or inside host. Although such a method is fraught
with risk, it is still made available with the
FEATURE(relay_local_from)
which is
declared like this:
FEATURE(`relay_local_from')
Because this feature poses risk, the following warning will be printed each time you build with your mc configuration file:
*** WARNING: FEATURE(`relay_local_from') may cause your system to act as open relay. Use SMTP AUTH or STARTTLS instead. If you cannot use those, try FEATURE(`relay_mail_from').
When you declare this feature you cause the domain
part of the address in $f
(the portion of the address to the
right of the @
character) to be compared to the list of hosts in
the $=w
class
macro ($=w on page
876). Recall that the class $=w
contains all the names by which the
local host can be known. If the domain in $f
is found in that
class, relaying is allowed.
The risk should be obvious. Because $f
is given its value as
a part of the SMTP MAIL
From:
command, that address can be forged to appear local by anyone on the Internet. That is, by declaring this feature, you are opening up your host to abuse by ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.