Sendmail is relaying through itself.

Sendmail is relaying through itself.

am 05.12.2007 00:14:09 von fatal.exception

Hello,

I have a sendmail 8.13 server on Debian 4.0 that is supposed to simply
send mail to other domains and not recieve mail for any host except
itself. This server is called web.mycompany.com The mail server for
the domain is mail.mycompany.com, but the mail records point to the
postini spam filterting service, so mycompany.com.mail5.psmtp.com.

The problem is that when a process running on web.mycompany.com sends
an email to user@mycompany.com it tries to deliver it locally and the
email bounces with a user unkown error.

here is the output from sendmail -v

errors@mycompany.com... Connecting to [127.0.0.1] port 587 via
relay...
220 web.mycompany.com ESMTP Sendmail 8.13.8/8.13.8/Debian-3; Tue, 4
Dec 2007 17:05:15 -0600; (No UCE/UBE) logging access from:
localhost(OK)-localhost [127.0.0.1]
>>> EHLO web.mycompany.com
250-web.mycompany.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From: SIZE=6
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
550 5.1.1 ... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
>>> RSET
250 2.0.0 Reset state
jonathan... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From:<> SIZE=1030
250 2.1.0 <>... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 ... Connecting to local...
050 ... Sent
250 2.0.0 lB4N5FA1008450 Message accepted for delivery
script-user... Sent (lB4N5FA1008450 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 web.mycompany.com closing connection




Here is my sendmail.m4




define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.13.8-3 2006-12-08 20:21:10 cowboy Exp
$')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl # into this directory before writing files.
dnl # If *all* your user accounts are under /home then use that
dnl # instead - it will prevent any writes outside of /home !
dnl # define(`confSAFE_FILE_ENV', `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd
lines
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::
1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp,
Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, Addr=::
1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission,
Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restric texpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time
connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
define(`confDOMAIN_NAME',`web.mycompany.com')dnl
FEATURE(`mailertable')dnl



DNS appears to be working. Any thoughts?

Thanks!

Re: Sendmail is relaying through itself.

am 06.12.2007 00:06:21 von Andrzej Filip

fatal.exception@gmail.com writes:
> I have a sendmail 8.13 server on Debian 4.0 that is supposed to simply
> send mail to other domains and not recieve mail for any host except
> itself. This server is called web.mycompany.com The mail server for
> the domain is mail.mycompany.com, but the mail records point to the
> postini spam filterting service, so mycompany.com.mail5.psmtp.com.
>
> The problem is that when a process running on web.mycompany.com sends
> an email to user@mycompany.com it tries to deliver it locally and the
> email bounces with a user unkown error.
> [...]

By default sendmail "auto-detects" list of local email domains.
You can turn it off
http://www.sendmail.org/m4/tweaking_config.html#confDONT_PRO BE_INTERFACES
and configure list of local email domain yourself
[part of] http://www.sendmail.org/faq/section4.html#4.5

--
[pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/