I'm setting up a small office email server using mail-mta/sendmail-8.17.1.9 and Sendmail rejects every outbound email not destined for a mailbox on the local server computer running Sendmail. I suspect I've got a configuration issue with either my Gentoo system setup (ex: hostname, hosts or /etc/mail/sendmail.cf) or maybe the latest version of Sendmail has changed from the last time I installed it 2 years ago and has gotten a lot stricter about relaying? Do my server logs below give any clues about how to solve this problem? How do I troubleshoot sendmail to determine if it's correctly reading my access.db file? Is there anything wrong with my configuration? Do file permissions matter on my access.db or other sendmail config files?
I recently installed Gentoo on a new build and am setting up a new server. I have successfully setup older Sendmail versions on older Gentoo systems and suspect I have a configuration issue. I have tried tweaking my /etc/mail/access file many times now and recompiling that and restarting sendmail without success. I get the same results whether I'm using my Thunderbird email reader client on my remote computer or using telnet at the local terminal on the sendmail server.
My server logs show:
Code: Select all
Jun 5 15:28:07 <local_server_host_name> sm-mta[6361]: 455JRr1H006361: ruleset=check_rcpt, arg1=<destination@gmail.com>, relay=<remote_sender_host_name>.<domain_name>.com [192.168.0.222], reject=550 5.7.1 <destination@gmail.com>... Relaying denied
Jun 5 15:28:07 <local_server_host_name> sm-mta[6361]: 455JRr1H006361: lost input channel from <remote_sender_host_name>.<domain_name>.com [192.168.0.222] to MTA after rcpt
Jun 5 15:28:07 <local_server_host_name> sm-mta[6361]: 455JRr1H006361: from=<sender_email>@<domain_name>.com, size=469, class=0, nrcpts=0, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=<remote_sender_host_name>.<domain_name>.com [192.168.0.222]
Code: Select all
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id$')dnl
OSTYPE(linux)dnl
DOMAIN(<domain_name>.com)dnl
define(`ALIAS_FILE', `/etc/mail/aliases')
define(`confBAD_RCPT_THROTTLE', `4')dnl
define(`confCONNECTION_RATE_THROTTLE', `6')dnl
define(`confDONT_PROBE_INTERFACES', `true')dnl
define(`confMAX_ALIAS_RECURSION', `6')dnl
# see "Sendmail, 3rd Ed." page 1012
define(`confMAX_HEADERS_LENGTH', `16384')dnl
# see "Sendmail, 3rd Ed." page 1015
define(`confMAX_QUEUE_CHILDREN', `4')dnl
# see "Sendmail, 3rd Ed." page 1016
define(`confMAX_RCPTS_PER_MESSAGE', `40')dnl
# see "Sendmail, 3rd Ed." page 1024
define(`confNO_RCPT_ACTION', `add-apparently-to')dnl
# see "Sendmail, 3rd Ed." page 1029
define(`confPRIVACY_FLAGS', ``authwarnings, goaway, noetrn, restrictmailq, novrfy, noexpn'')dnl
# see "Sendmail, 3rd Ed." page 1053
define(`confSINGLE_LINE_FROM_HEADER', `true')dnl
# see "Sendmail, 3rd Ed." page 1055
define(`confSMTP_LOGIN_MSG', `$j Sendmail $v. Speak friend and enter:')dnl
# see "Sendmail, 3rd Ed." page 1057
define(`confSAFE_QUEUE', `true')dnl
#
#
#
# End Sendmail option definitions
# see "Sendmail, 3rd Ed." page 162-3
MASQUERADE_AS(`<domain_name>.com')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`allmasquerade')dnl # page 176
FEATURE(`always_add_domain')dnl # page 176
FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
FEATURE(`local_procmail')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Code: Select all
divert(-1)
#
# Edited by ____
#
divert(0)
VERSIONID(`$Id: <domain_name>.com.m4, version 1.0, 8 July 2005 <handle> Exp $')
define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
define(`confMAX_HEADERS_LENGTH', `32768')dnl
FEATURE(`redirect')dnl
FEATURE(`use_cw_file')dnl
Code: Select all
From:localhost RELAY
From:<local_server_host_name>.<domain_name>.com RELAY
From:<domain_name>.com RELAY
From:<remote_sender_host_name>.<domain_name>.com RELAY
From:192.168.0.222 RELAY
From:<remote_sender_host_name>.<domain_name>.com RELAY
From:192.168.0 OK
From:<sender_email>@<domain_name>.com RELAY
Code: Select all
# makemap hash /etc/mail/access.db < /etc/mail/access



