# Sendmail Relaying



## fullauto (Jan 28, 2013)

I have a small network and am trying to get users from outside my network to be able to relay through my sendmail server so long as they have a login and password on the system.
I went through and did the page here:http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/smtp-auth.html
However, my remote users are still getting denied by the mail server.


```
cat hermes.mc
define(`confCW_FILE', `-o /etc/mail/local-host-names')

dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')

MASQUERADE_AS(`SpreadSpectrum.net')dnl
dnl MASQUERADE_DOMAIN(`hst.org.za')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl

define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
define(`confBAD_RCPT_THROTTLE', `2')
define(`confMAX_RCPTS_PER_MESSAGE', `10')
define(`confMAX_DAEMON_CHILDREN', `500')
define(`confTO_ICONNECT', `15s')
define(`confTO_CONNECT', `3m')
define(`confTO_HELO', `2m')
define(`confTO_MAIL', `1m')
define(`confTO_RCPT', `1m')
define(`confTO_DATAINIT', `1m')
define(`confTO_DATABLOCK', `1m')
define(`confTO_DATAFINAL', `1m')
define(`confTO_RSET', `1m')
define(`confTO_QUIT', `1m')
define(`confTO_MISC', `1m')
define(`confTO_COMMAND', `1m')
define(`confTO_STARTTLS', `2m')dnl

[color="Red"]dnl set SASL options
TRUST_AUTH_MECH(`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl[/color]

FEATURE(`dnsbl',`dnsbl.sorbs.net',`"554 Rejected " $&{client_addr} " found in dnsbl.sorbs.net"')dnl

MAILER(local)
MAILER(smtp)
[ROOT@hermes]/etc/mail->
```


```
cat access
#
# Mail relay access control list.  Default is to reject mail unless the
# destination is local, or listed in /etc/mail/local-host-names
#

## Examples (commented out for safety)
#From:cyberspammer.com          ERROR:"550 We don't accept mail from spammers"
#From:okay.cyberspammer.com     OK
#Connect:sendmail.org           RELAY
#To:sendmail.org                RELAY
#Connect:128.32                 RELAY
#Connect:128.32.2               SKIP
#Connect:IPv6:1:2:3:4:5:6:7     RELAY
#Connect:suspicious.example.com QUARANTINE:Mail from suspicious host
#Connect:[127.0.0.3]            OK
#Connect:[IPv6:1:2:3:4:5:6:7:8] OK
GreetPause:192.168              0
To:spreadspectrum.net           RELAY
192.168.1                       RELAY
127.0.0.1                       OK
From:deluxestitcher.com         ERROR:"550 We don't accept mail from spammers"
From:autocal.co.uk              ERROR:"550 We don't accept mail from spammers"

[ROOT@hermes]/etc/mail->
```

I am really stuck here.


----------

