Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Forward all mail?

Forward all mail?

Forward all mail?

Our sendmail server is called dunsdev

The official domain name is set as uk.aswatson.com

When sending mail to recipients such as joebloggs@email.com it gets routed to the relay server fine.

When sending mail to recipients such as joebloggs@uk.aswatson.com it gets kept locally where there's no such user.

I want to force it to send all mail regardless of whether they're local or not to the relay server.  The section in sendmail.cf that relates to the Smart relay host says "To forward ALL mail to this relay host, uncomment the appropriate rule in ruleset 0, as indicated by the ruleset's comments."

Does anyone know how this is done or what the rule I'm looking for should look like?



RE: Forward all mail?

If you look at sendmail.mc you will see that it is much easier to read then sendmail.cf.  Open sendmail.mc and look for this line:

dnl define(`SMART_HOST', `your.relay.domain')dnl

If you find it, uncomment it by removing the 'dnl' in front of the line and edit it by replacing your.relay.domain with the domain you wish to relay through.  If you don't have this line, you will need to add it.  Note that the marks to the left of SMART_HOST and your.relay.domain are tic marks ( under the ~ ) and not single quotes.  Once you have edited sendmail.mc, you will need to build the new sendmail.cf.  To do that execute this command:

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

I'm sure I don't have to remind you but I just can't help myself.  Please make a backup copy of sendmail.cf before you do anything.  This is good practice any time you make changes to a config file.  That way you can always go back to that point if anything goes wrong.


RE: Forward all mail?

Thanks for the reply.

Unfortunately I've checked the server, and a few others, and none have the sendmail.mc file.  I guess that takes me back to directly editing the sendmail.cf file?

Further though, would this line have been the addition of the Smart relay host line beginning DS in the .cf file?  If so, we already have that which correctly relays mail to another domain out to the relay server.

Our issue is that mail to valid external (to this server) users but using the same domain stay local so we want to force it all to go to the relay server.



RE: Forward all mail?

So does no-one here have any idea what to do?  To recap and clarify:

We have a server called dunsdev

It has its domain set to uk.aswatson.com

It has the smart relay server set to hoex1

Sending mail to people on a completely different domain to the company (eg joe.bloggs@email.com) gets relayed to the smart relay server properly and the user receives the mail.

Sending mail to people on the same domain in the company(eg joe.bloggs@uk.aswatson.com) comes up as an unknown user and gets stored in dead.letter.

We have no sendmail.mc file on any of the servers.

I suspect its keeping mails to addresses ending @uk.aswatson.com local as it thinks they should be on the local server when in fact they're not.

We just want to force the server to send out mail to any user specificed with an @{DOMAIN} to the relay server.



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close