Sendmail subdomain relays.

I'm looking for a way to deliver messages delivered to me by straight SMTP feed
and forward them to another SMTP server.

So for example I have :
domain.com   IN    MX          mail1.domain.com

So if you mail red15@domain.com my mail
does arrive. Now I wonder how I can tell sendmail
that any mail delivered which is addressed to
red15@sub.domain.com should be
forwarded to another SMTP server.

The really nasty thing is that this other SMTP
server is local address. So no MX record from
the outside is going to help me here.

I somehow need to teach sendmail his own MX
records. I've tried looking for it on Google but most
answers I got all pointed towards MX records.
Others where very nasty tricks involving redirecting.
LVL 1
Red15Asked:
Who is Participating?
 
scampgbConnect With a Mentor Commented:
Hi Red15,

You need to look at the MailerTables feature of Sendmail to do this.

Info at http://www.sendmail.org/m4/mailertables.html explains how.  It's not particularly in-depth, but should achieve what you need.

You'll essentially put the following line in your mailertable file:
sub.domain.com             smtp:[internalserver.whereever.org.]

I hope that this helps - let me know if you would like any clarification.

0
 
Red15Author Commented:
Hi thanks for your great answer which was very fast.
I'm just gonna go ahead and give you the points,
I guess I was just a little to quick.

But the sendmail.org site really scares me away. It's such a maze...
And besides, I did have some points over to waste :)

Have fun.
0
 
scampgbCommented:
Hi - thanks for the "A", however I like to feel that I've earnt it! :-)

Which bit of it confuses you?

Do you use an M4 file to generate your sendmail config?  If you post it, I'll tell you what you need to do.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Red15Author Commented:
The general layout and the layout of sendmail itself is quite old and deprecated.
So confusing... Old day programming I guess...

Maybe I should pick up on qmail sometime.
0
 
scampgbCommented:
:-)  How did you configure Sendmail in the first place?
It's fairly straightforward if you use the M4 method.  The idea of editing the sendmail.cf file directly leaves me cold!
0
 
Red15Author Commented:
Then start shivering :)

I have no time to waste on silly things like M4.

Most of the things I usually configure is just
Dj
DS
Mail filter

:) Actually I mostly copy sendmail.cf's from other running configurations and adjust as necessary.
0
 
scampgbCommented:
:-)  In that case, I suggest that you find a nice working configuration that does what you want and copy it!

I can tell you how to do it with the M4 method, but editing the .cf directly is a little too scary for my liking.  I'd do it on my own configurations if pushed, but never on anyone elses!
0
 
Red15Author Commented:
I'm not sure about you, but I have to manage about 5 mailservers. And with people
complaining about harmless attachments getting swept by anti-virus, one tends to grab working configs.

But I did have one, all I needed to know was the fact that it is mailertable which does those subdomains.

Oh and you got that A mainly cause you reacted very fast.
Thx again
0
 
scampgbCommented:
Cool - glad I could help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.