Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forward all mail?

Status
Not open for further replies.

phorbiuz

Technical User
Jul 22, 2004
67
0
0
GB
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?

Thanks.



 
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.




 
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.

Thanks.


 
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
Djuk.aswatson.com

It has the smart relay server set to hoex1
DShoex1

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.

Thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top