Re: Sendmail Config. question

From: Mitch McNeel (mitchm@mwh.com)
Date: Thu May 20 2004 - 15:37:27 EDT


First of all, I want to thank everyone for there replies.

Now, I'm still having the issue with the hostname within the header (Return-Path
& From), when using commands

# mailx -s "Testing from `uname -n` at `date`" other_user@mydomain.com <
/dev/null
or
# cat /tmp/x|/usr/lib/sendmail -oi -t

(file x contains header info)

logged in as the `some_user` user account.

Header Example:
Return-Path: <some_user@hostname.mydomain.com>
Date: Thu, 20 May 2004 11:33:51 -0700 (PDT)
From: "Some User" <some_user@hostname.mydomain.com>
To: other_user@mydomain.com
Subject: Testing from hostname at Thu May 20 11:33:51 PDT 2004

But, if I use the command

# mailx -r some_user@mydomain.com -s "Testing from `uname -n` at `date`"
other_user@mydomain.com < /dev/null

sendmail will stripp off the hostname from the header.

Header Example:
Return-Path: <some_user@mwh.com>
Date: Thu, 20 May 2004 12:09:25 -0700 (PDT)
From: "Some User" <some_user@mwh.com>
To: other_user@mydomain.com
Subject: Testing from hostname at Thu May 20 12:09:25 PDT 2004

I've use all parameters that everyone suggested, so I'm not sure where to go
from here.

Can anyone point me in the right direction?

TIA!

Mitch

sendmail.mc file:
divert(-1)
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# Copyright (c) 1997-2000
# Sun Microsystems, Inc. All rights reserved.
#
# ident "@(#)subsidiary.mc 1.10 00/12/14 SMI"
#
# This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later
# subsidiary machines. It has support for local and SMTP mail. The
# SMART_HOST macro is enabled, which means that messages will be sent to
# the SMART_HOST, which is set to mailhost.$m ($m is the local domain).
# A short-cut rule is also defined, which says if the recipient host is
# in the local domain, send to it directly instead of the smart host.
#
# Note: if you do not need a smart host; i.e., you are in an environment
# where MX records are properly defined, then you should not be using
# this subsidiary config file; use main instead.
#
# If you want to customize this further, copy it to a name appropriate
# for your environment and do the modifications there.
#

divert(0)dnl
VERSIONID(`@(#)subsidiary.mc 1.10 (Sun) 12/14/00')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
MASQUERADE_AS(`mydomain.com')dnl
MASQUERADE_DOMAIN(`mydomain.com')dnl
undefine(`BITNET_RELAY')dnl
undefine(`UUCP_RELAY')dnl
undefine(`DECNET_RELAY')dnl
define(`LOCAL_RELAY', `mail.mydomain.com')dnl
define(`MAIL_HUB', `mail.mydomain.com')dnl
define(`SMART_HOST', `mail.mydomain.com')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

David Robillard wrote:

> Hi Mitch,
>
> Have you tried adding the following lines to your ``sendmail.mc'' file?
>
> MASQUERADE_AS(`your.domain.com')dnl
> FEATURE(`always_add_domain')dnl
> FEATURE(`allmasquerade')dnl
> FEATURE(`masquerade_envelope')dnl
>
> This should fix your problem.
>
> On a side note, try incorporating this lines as a security feature (Oh
> no! More security features! :)
>
> undefine(`BITNET_RELAY')dnl
> undefine(`UUCP_RELAY')dnl
> undefine(`DECNET_RELAY')dnl
> FEATURE(`nouucp',`reject')dnl
> define(`confPRIVACY_FLAGS',
> `authwarnings,goaway,restrictmailq,restrictqrun')dnl
>
> And these two if you'd like to run MIMEDefang:
>
> MAIL_FILTER(`mimedefang',
> `S=local:/var/spool/MIMEDefang/mimedefang.sock, F=T,
> T=C:15m;S:4m;R:4m;E:10m')dnl
> define(`confINPUT_MAIL_FILTERS', `mimedefang')dnl
>
> Cheers,
>
> David
>
> --
> David Robillard
> UNIX systems administrator
> david.robillard@galileogenomics.com
> +1 514 270 3991 x285
> Galileo Genomics
>
> perl -e 'print
> $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

--
                          |||||
                        ((~) (~))
                         ( (_) )
                          { ~ }
                            V
----------------------oOO0-----0OOo---------------------------------
Mitch McNeel                               # Phone Ext. 2236
Unix Systems Administrator                 # Phone Num. 858-831-2210
Maintenance Warehouse/A Home Depot Company # http://www.mwh.com
--------------------------------------------------------------------
[demime 1.01b removed an attachment of type text/x-vcard which had a name of mitchm.vcf]
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:43 EDT