Prev | Current Page 498 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"


7.4.8 FEATURE(relay_mail_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 address, and the result is stored in the
$f sendmail macro (?§21.9.45 on page 824).
If you wish, you can use the value in the $f sendmail macro to determine whether a
message should be relayed to any outside or inside host. Although such a method is
fraught withrisk, it is still made available withth e FEATURE(relay_mail_from) which
is declared like this:
FEATURE(`relay_mail_from')
Because this feature poses risk, the following warning will be printed each time you
build your cf file from your mc file:
*** WARNING: FEATURE(`relay_mail_from??) may cause your system to act as open
relay. Use SMTP AUTH or STARTTLS instead.
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
7.4 Relaying | 275
By declaring this feature, you cause the address in the $f sendmail macro to be prefixed
witha literal From: and looked up in the access database (?§7.5 on page 277). If it
is found in that database, and the value returned is a literal RELAY, that address is
allowed to be relayed:
From:bob@your.domain RELAY ?†? this sender can relay
If you want to base the decision to relay on a domain instead of on an individual??™s
address, you can declare this feature with an additional argument that is a literal
domain:
FEATURE(`relay_mail_from??, `domain??)
With this extra argument in place, the domain part of the address in $f (the portion
of the address to the right of the @ character) will be prefixed with a literal From: and
looked up in the access database.


Pages:
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510
gry on line życzenia ślubne gustowne meble katowice felgi aluminiowe poznań katalog firm