Unix Technical Forum

Help: Stripping machine name from sendmail

This is a discussion on Help: Stripping machine name from sendmail within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hi I need to route all email via Sendmail at my Unix box through my Exchange server, but the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2008, 08:36 PM
underh20
 
Posts: n/a
Default Help: Stripping machine name from sendmail

Hi

I need to route all email via Sendmail at my Unix box through my
Exchange server, but the problem is that when the emails get relayed
they keep the machine name example. atlantis.crawford.com and some
sites do Reverse DNS on email addresses so they treat that address as
spam.

I need to find out how to stripe the machine name in sendmail so the
mail looks like @crawford.com.

Any idea how I can do that in sendmail ??

Thanks,

Bill

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-07-2008, 08:36 PM
Laurent Blume
 
Posts: n/a
Default Re: Help: Stripping machine name from sendmail

underh20 wrote:
> I need to route all email via Sendmail at my Unix box through my
> Exchange server, but the problem is that when the emails get relayed
> they keep the machine name example. atlantis.crawford.com and some
> sites do Reverse DNS on email addresses so they treat that address as
> spam.
>
> I need to find out how to stripe the machine name in sendmail so the
> mail looks like @crawford.com.
>
> Any idea how I can do that in sendmail ??


Those options in your .mc file should do it:

MASQUERADE_AS(`your.domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`always_add_domain')dnl

The details are there:
http://www.sendmail.org/m4/features.html

Laurent
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-07-2008, 08:37 PM
Laurent Blume
 
Posts: n/a
Default Re: Help: Stripping machine name from sendmail

[keeping the reply on Usenet too]

underh20 wrote:
> Hi Laurent,
>
> Thanks much for your reply.
>
> What is the command to copy the mc file over as the cf? Should I do
> this.


Basically, for Solaris (it's different with Sendmail.org sendmail, and probably
on other Unix flavours as well):

- Go in /usr/lib/mail/cf

- Make a backup copy of main.mc
(Actually, I copy the whole /usr/lib/mail/cf to someplace else to keep the
original clean)

- Edit main.mc and add the lines, it'll look like this:

divert(0)dnl
VERSIONID(`@(#)main.mc 1.5 (Sun) 08/10/00')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
MASQUERADE_AS(`your.domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`always_add_domain')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

- Build the .cf file:
# /usr/ccs/bin/make main.cf
test ! -f main.cf || /usr/bin/mv main.cf main.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 main.mc > main.cf

- Diff it with your cuttent sendmail.cf to have a general idea of the changes
(some obvious errors are avoided that way):
# diff main.cf /etc/mail/sendmail.cf

- Make a backup of your current /etc/mail/sendmail.cf in case you want to roll
it back quickly

- Copy your new main.cf to /etc/mail/sendmail.cf

- Restart sendmail

- Look carefully at the logs to check it's not rejecting anything it should
accept.

HTH,

Laurent
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com