Re: Override DNS MX information when sending mail to external relay?



On Sep 30, 2:25 pm, mikea <mi...@xxxxxxxxxxxx> wrote:
theboards <theboa...@xxxxxxxxxxx> wrote in <4a3c5ad4-1dd3-4061-b44a-984bf8655...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:



Hi All

I'm having trouble with the sendmail configuration on my Solaris 10
server.

What I'm trying to do is to send all external mail i.e anything with
an @ in it, to a relay other than that specified by my DNS MX records.

I've changed the config/local_only parameter for sendmail to true so
I'm editing /etc/mail/cf/cf/local.mc and using /etc/mail/local.cf.

My local.mc file looks like this:

divert(0)dnl
VERSIONID(`@(#)local.mc 1.1 (Sun) 08/01/06')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl
FEATURE(`nocanonify')dnl
define(`SMARTHOST', `<mailrelay.domain.co.uk')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
DAEMON_OPTIONS(`Name=MSA4,   Family=inet, Addr=127.0.0.1, Port=587,
M=E')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*    $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

and my submit.mc looks like this.

divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from
complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
define(`confDIRECT_SUBMISSION_MODIFERS', `C')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl

As per instructions found here, here and here.
http://www.sendmail.org/faq/section3.html#3.22
http://www.phase2.net/2007/03/20/sendmail-on-rhel-40-without-dns/
http://www.lildude.co.uk/howto-prevent-sendmail-from-using-dns/

It's not working as intended and I'm at a loss as to how to trouble
shoot this problem.

My snoops show that after local mail submission my server is still
trying to connect the mail relay specified in our DNS MX records.

Any and all help gratefully received.

The square brackets ("[]") are important: they cause MX lookup to not be
done.

--
Mike Andrews, W5EGO
mi...@xxxxxxxxxxxx
Tired old sysadmin

Thanks Mike

I tried that and unfortunately it made no difference.

Can anyone spot any other mistakes or assist me with troubleshooting
advice to allow me to spot and fix my own mistakes?

Thanks
.



Relevant Pages

  • sendmail on solaris 8.
    ... This is a sendmail issue on a Sun, so I am trying both the sunmanagers ... specific mc for this server that still has FEATURE ... this mailhost will happily relay it to other hosts in the domain. ... We can use DNS to our advantage here, since servers that should be relaying ...
    (SunManagers)
  • Re: We need a new subject- bug fixes
    ... >>> They'd be set to accept mail from all domains, and relay to all, as it'd ... If someone has to set any of these>> up from scratch they are going to make mistakes the first time and have>> an insecure system. ... What evidence do you have that everyone else gets this right every time without help from the distro? ... You mean besides those of us who keep replying to you and who run our own mail servers? ...
    (Fedora)
  • Re: Exchange sending issues
    ... Did you set your SMTP service to send through DNS or relay? ... If you set it to DNS, do you have your DNS set up correctly? ... IF you set it to relay, do you have the proper relay server IP address at ... > the outque at the exchange server. ...
    (microsoft.public.windows.server.sbs)
  • Re: DNS / ISA and Exchange issue
    ... This is neither ISA nor DNS. ... The key to this is the error message: ... The mail server is not configured to accept mail for smtp.ourdomain.com. ... to relay for mir@smtp.ourdomain.com (in reply to RCPT TO ...
    (microsoft.public.isa.configuration)
  • Re: config error: mail loops back to me?
    ... > Someone is trying to use my box for a relay, which sendmail is taking care of nicely, but I keep getting ... DNS configuration, rather than anything to do with the remote senders. ... wildcard records, and because 'fre.sg.co.nz' doesn't really exist, ...
    (freebsd-questions)