Operating System - Linux
1829413 Members
2302 Online
109991 Solutions
New Discussion

smart relay on redhat 7.2

 
SOLVED
Go to solution
someone_4
Honored Contributor

smart relay on redhat 7.2

Hello everyone,
I am trying to set up a smart relay for sendmail on linux 7.2.

I have my mc file set up according to the docs I found on sendmail.org.

define(`SMART_HOST', `name.of.smart.host')dnl

Also, starting with 8.9, it may help to include the following in your .mc file:
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl

After the changes I did restart sendmail. DS is set up. I can resolve my smart relay. But I still get errors.

sendmail -v rleon@mydomain.net
mydomain.net: Name server timeout
rleon@mydomain.net... Transient parse error -- message queued for future delive
ry

sendmail -bv rleon@mydomain.net
rleon@mydomain.net... deliverable: mailer relay, host netmail1, user rleon@netw
orkip.net

What did i miss?

Thanks




8 REPLIES 8
Stuart Browne
Honored Contributor

Re: smart relay on redhat 7.2

After modifying your MC file, did you re-generate your CF file?

To check, run:

grep "^DS" /etc/sendmail.cf

If that doesn't have your 'name.of.smart.host' on it, then you'll need to run:

m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

That will make the modifications you want.

As of RH8, restarting sendmail will automatically re-create any CF file (if you've made changes to the MC file), but nothing prior will do so automatically.

Hope this helps you a bit mroe.
One long-haired git at your service...
someone_4
Honored Contributor

Re: smart relay on redhat 7.2

Hi
Yes I did all that and my DS is there. To me it seems like for some reason it is trying to resolv my domain. But that is what it should not do since I am using my smart relay.

~richard
Stuart Browne
Honored Contributor

Re: smart relay on redhat 7.2

The features you turned on are for *YOUR* box to accept external mail for unresolvable and unqualified senders.

Regardless, your box will sill by default try to resolve the destination, even if it is trying to use a relay.

You might want to look at changing the option I (feature 'configBIND_OPTS'), and setting things like '-DNSRCH' to stop it trying to query a name server.

There are a number of issues regarding that, I suggest you consult your documentation further if this causes other issues.

NOTE: We use this as well as a 'service switch file' in order to bypass name lookups.
One long-haired git at your service...
U.SivaKumar_2
Honored Contributor
Solution

Re: smart relay on redhat 7.2

Hi,

Add this line to sendmail.mc and generate a new sendmail.cf file. And restart sendmail daemon.

FEATURE(`nocanonify')dnl

Hope the problem is solved.

regards,

U.SivaKumar


Innovations are made when conventions are broken
Steven E. Protter
Exalted Contributor

Re: smart relay on redhat 7.2

When you change sendmail.mc, you need to rebuild the hash databases.

Here is a script that rebuilds the databases then stops and starts sendmail daemon.

I have to note however I am not comfortable with some of the choices you made as noted above. There is no need to accept unresolvable domains. It says I'm a spam magnet. Perhaps I misread the thread.

Attached is buildmail the script to do the work.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
someone_4
Honored Contributor

Re: smart relay on redhat 7.2

U.SivaKumar,

That worked and fixed the problem. Can you tell me what that option does? To me it looks like it is something with the newer versions of sendmail. Because in older versions all I do is edited the DS. And it works.

Thanks
Richard
U.SivaKumar_2
Honored Contributor

Re: smart relay on redhat 7.2

Hi,

sendmail will try to canonify all host addresses to the host's fully qualified domain name FQDN by querying DNS servers.

Which is to be avoided in our case.

So i used FEATURE(`nocanonify')dnl

which will make this change in this line of sendmail.cf
O DaemonPortOptions=Port=smtp,Addr=xxx.xxx.xxx.xxx, Name=MTA,M=C

Note the capital C in M=C ( Modifier option )that instructs sendmail not to perform hostname canonification.

But if M=c , note the small c then instruction to sendmail is to perform hostname canonification.Which is not needed in our case as external domains cannot be resolved.

regards,

U.SivaKumar







Innovations are made when conventions are broken
Stuart Browne
Honored Contributor

Re: smart relay on redhat 7.2

Funky.. didn't know that one..
One long-haired git at your service...