Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 739
  • Last Modified:

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.
0
Red15
Asked:
Red15
  • 5
  • 4
1 Solution
 
scampgbCommented:
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now