possible config error - masquerade
Hello everyone,
this is our network in short.
One Mailforwarder, which is reachable from the outside.
One Server behind our firewall, from which I want to send mail, this
one has solaris 10 and sendmail installed.
I configured the Mailforwarder as smart relay host, which works, but
when I want to send mails to [at] gmx.de addresses, there comes the
following error in the mailforwarder:
Jan 24 09:14:08
dns-ssi postfix/nqmgr[27335]: F09B02CC2F7:
from=<root [at] MW-Columbia.schaefer-shop.de>, size=762, nrcpt=1 (queue
active) Jan 24 09:14:08 dns-ssi postfix/smtp[30338]:
F09B02CC2F7: to=<boehmerm [at] gmx.de>,
relay=mx0.gmx.net[213.165.64.100], delay=1, status=bounced (host
mx0.gmx.net[213.165.64.100] said: 550 5.1.8 Cannot resolve your domain
{mx019} (in reply to MAIL FROM command))
OK...so gmx can't find our mw-columbia, which is okay, because it is
only in inside network.
So I had a look at the mailheaders, and there was the following line:
Return-Path: <www [at] MW-Columbia.schaefer-shop.de>
How do I get rid of this?
I tried it with masquerading, so I added masquerading to my
sendmail.mc:
<begin sendmail.mc>
divert(0)dnl
VERSIONID(` [at] (#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
define(`SMART_HOST', mail.schaefer-shop.de)dnl
FEATURE(`relay_hosts_only')dnl
MASQUERADE_AS(`schaefer-shop.de')
FEATURE(`masquerade_envelope')
MAILER(`local')dnl
MAILER(`smtp')dnl
LOCAL_NET_CONFIG
R$* < [at] $* .$m. > $* $#esmtp $ [at] $2.$m $: $1 < [at] $2.$m. > $3
<end sendmail.mc>
But still the Return-Path is written as above.
I hope someone can give me a hint.
If you need further Information, please let me know.
Thanks
Markus
Re: possible config error - masquerade
Markus Boehmer <boehmerm [at] gmx.de> writes in comp.mail.sendmail:
> Hello everyone,
>
> this is our network in short.
> One Mailforwarder, which is reachable from the outside.
> One Server behind our firewall, from which I want to send mail, this
> one has solaris 10 and sendmail installed.
>
> I configured the Mailforwarder as smart relay host, which works, but
> when I want to send mails to [at] gmx.de addresses, there comes the
> following error in the mailforwarder:
> Jan 24 09:14:08
> dns-ssi postfix/nqmgr[27335]: F09B02CC2F7:
> from=<root [at] MW-Columbia.schaefer-shop.de>, size=762, nrcpt=1 (queue
=================================
> active) Jan 24 09:14:08 dns-ssi postfix/smtp[30338]:
> F09B02CC2F7: to=<boehmerm [at] gmx.de>,
> relay=mx0.gmx.net[213.165.64.100], delay=1, status=bounced (host
> mx0.gmx.net[213.165.64.100] said: 550 5.1.8 Cannot resolve your domain
> {mx019} (in reply to MAIL FROM command))
>
>
> OK...so gmx can't find our mw-columbia, which is okay, because it is
> only in inside network.
>
> So I had a look at the mailheaders, and there was the following line:
> Return-Path: <www [at] MW-Columbia.schaefer-shop.de>
>
> How do I get rid of this?
> I tried it with masquerading, so I added masquerading to my
> sendmail.mc:
> <begin sendmail.mc>
> divert(0)dnl
> VERSIONID(` [at] (#)sendmail.mc 1.11 (Sun) 06/21/04')
> OSTYPE(`solaris8')dnl
> define(`SMART_HOST', mail.schaefer-shop.de)dnl
> FEATURE(`relay_hosts_only')dnl
> MASQUERADE_AS(`schaefer-shop.de')
> FEATURE(`masquerade_envelope')
>
> MAILER(`local')dnl
> MAILER(`smtp')dnl
>
>
> LOCAL_NET_CONFIG
> R$* < [at] $* .$m. > $* $#esmtp $ [at] $2.$m $: $1 < [at] $2.$m. > $3
> <end sendmail.mc>
>
> But still the Return-Path is written as above.
>
> I hope someone can give me a hint.
> If you need further Information, please let me know.
It is unclear what is version of sendmail.
> Thanks
> Markus
It may be that root is not masqueraded.
In smart host log there is root [at] MW-Columbia.schaefer-shop.de
and not www [at] MW-Columbia.schaefer-shop.de
Check first that you have generated sendmail.cf from
that new sendmail.mc and restarted sendmail daemon.
Then test following
$ /usr/sbin/sendmail -bt
/tryflags ES
/try esmtp www [at] MW-Columbia.schaefer-shop.de
/quit
/ Kari Hurtta
8.10.0/8.10.0 2000/03/01
<...>
CONFIG: Removed root from class E; use EXPOSED_USER(`root')
to get the old behavior. Suggested by Joe Pruett
of Q7 Enterprises.
Re: possible config error - masquerade
On Jan 26, 12:45 pm, Kari Hurtta <hurtta
+comp.mail.sendm... [at] siilo.fmi.fi> wrote:
>
> Check first that you have generated sendmail.cf from
> that new sendmail.mc and restarted sendmail daemon.
>
Hello Everyone,
here we go again.
1. I checked, that my actual sendmail.cf is the one created by me and
sendmail was restarted.
2. Version is 8.13.7+Sun/8.13.7
> Then test following
> $ /usr/sbin/sendmail -bt
> /tryflags ES
> /try esmtp w... [at] MW-Columbia.schaefer-shop.de
> /quit
I tried it, but with some changes.
As user www I tried to masquerade as markus.boehmer [at] schaefer-shop.de
which is what I want:
/usr/lib/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags ES
> /try esmtp mmarkus.boehmer [at] schaefer-shop.de
Trying envelope sender address mmarkus.boehmer [at] schaefer-shop.de for
mailer esmtp
canonify input: mmarkus . boehmer [at] schaefer-shop . de
Canonify2 input: mmarkus . boehmer < [at] schaefer-shop . de >
Canonify2 returns: mmarkus . boehmer < [at] schaefer-shop . de . >
canonify returns: mmarkus . boehmer < [at] schaefer-shop . de . >
1 input: mmarkus . boehmer < [at] schaefer-shop . de . >
1 returns: mmarkus . boehmer < [at] schaefer-shop . de . >
EnvFromSMTP input: mmarkus . boehmer < [at] schaefer-shop . de . >
PseudoToReal input: mmarkus . boehmer < [at] schaefer-shop . de . >
PseudoToReal returns: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqSMTP input: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqSMTP returns: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqEnv input: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqHdr input: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqHdr returns: mmarkus . boehmer < [at] schaefer-shop . de . >
MasqEnv returns: mmarkus . boehmer < [at] schaefer-shop . de . >
EnvFromSMTP returns: mmarkus . boehmer < [at] schaefer-shop . de . >
final input: mmarkus . boehmer < [at] schaefer-shop . de . >
final returns: mmarkus . boehmer [at] schaefer-shop . de
Rcode = 0, addr = mmarkus.boehmer [at] schaefer-shop.de
> /quit
This worked.
But why sets sendmail still the Return-Path automatically to www [at] MW-
Columbia.schaefer-shop.de ?
Shouldn't it set the Return-Path to the From address?
Regards
Markus
Re: possible config error - masquerade
Markus Boehmer <boehmerm [at] gmx.de> writes
in comp.mail.sendmail:
> On Jan 26, 12:45 pm, Kari Hurtta <hurtta
> +comp.mail.sendm... [at] siilo.fmi.fi> wrote:
> >
> > Check first that you have generated sendmail.cf from
> > that new sendmail.mc and restarted sendmail daemon.
> >
>
> Hello Everyone,
>
> here we go again.
>
> 1. I checked, that my actual sendmail.cf is the one created by me and
> sendmail was restarted.
>
> 2. Version is 8.13.7+Sun/8.13.7
>
> > Then test following
> > $ /usr/sbin/sendmail -bt
> > /tryflags ES
> > /try esmtp w... [at] MW-Columbia.schaefer-shop.de
Why you are replaced "www" with "w..." ?
> > /quit
>
> I tried it, but with some changes.
> As user www I tried to masquerade as markus.boehmer [at] schaefer-shop.de
> which is what I want:
> /usr/lib/sendmail -bt
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>
> > /tryflags ES
> > /try esmtp mmarkus.boehmer [at] schaefer-shop.de
> Trying envelope sender address mmarkus.boehmer [at] schaefer-shop.de for
That is not what I asked.
> This worked.
>
> But why sets sendmail still the Return-Path automatically to www [at] MW-
> Columbia.schaefer-shop.de ?
> Shouldn't it set the Return-Path to the From address?
>
> Regards
> Markus
You not tested that what /try shows about
www [at] MW-Columbia.schaefer-shop.de
Is it rewritten?
/ Kari Hurtta
Re: possible config error - masquerade
Post removed (X-No-Archive: yes)
Re: possible config error - masquerade
Post removed (X-No-Archive: yes)
Re: possible config error - masquerade
On Jan 28, 7:51 pm, Kari Hurtta <hurtta
+comp.mail.sendm... [at] siilo.fmi.fi> wrote:
> Is it rewritten?
>
> / Kari Hurtta
No, it is not.
Here is what I tried.
root [at] MW-Columbia> /usr/lib/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags ES
> /try esmtp www [at] MW-Columbia.schaefer-shop.de
Trying envelope sender address www [at] MW-Columbia.schaefer-shop.de for
mailer esmtp
canonify input: www [at] MW-Columbia . schaefer-shop . de
Canonify2 input: www < [at] MW-Columbia . schaefer-shop . de >
Canonify2 returns: www < [at] MW-Columbia . schaefer-shop . de >
canonify returns: www < [at] MW-Columbia . schaefer-shop . de >
1 input: www < [at] MW-Columbia . schaefer-shop . de >
1 returns: www < [at] MW-Columbia . schaefer-shop . de >
EnvFromSMTP input: www < [at] MW-Columbia . schaefer-shop . de >
PseudoToReal input: www < [at] MW-Columbia . schaefer-shop . de >
PseudoToReal returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqSMTP input: www < [at] MW-Columbia . schaefer-shop . de >
MasqSMTP returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqEnv input: www < [at] MW-Columbia . schaefer-shop . de >
MasqHdr input: www < [at] MW-Columbia . schaefer-shop . de >
MasqHdr returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqEnv returns: www < [at] MW-Columbia . schaefer-shop . de >
EnvFromSMTP returns: www < [at] MW-Columbia . schaefer-shop . de >
final input: www < [at] MW-Columbia . schaefer-shop . de >
final returns: www [at] MW-Columbia . schaefer-shop . de
Rcode = 0, addr = www [at] MW-Columbia.schaefer-shop.de
> /quit
You have new mail in /var/mail//root
root [at] MW-Columbia> su - www
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
www [at] MW-Columbia:~ # /usr/lib/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags ES
> /try esmtp www [at] MW-Columbia.schaefer-shop.de
Trying envelope sender address www [at] MW-Columbia.schaefer-shop.de for
mailer esmtp
canonify input: www [at] MW-Columbia . schaefer-shop . de
Canonify2 input: www < [at] MW-Columbia . schaefer-shop . de >
Canonify2 returns: www < [at] MW-Columbia . schaefer-shop . de >
canonify returns: www < [at] MW-Columbia . schaefer-shop . de >
1 input: www < [at] MW-Columbia . schaefer-shop . de >
1 returns: www < [at] MW-Columbia . schaefer-shop . de >
EnvFromSMTP input: www < [at] MW-Columbia . schaefer-shop . de >
PseudoToReal input: www < [at] MW-Columbia . schaefer-shop . de >
PseudoToReal returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqSMTP input: www < [at] MW-Columbia . schaefer-shop . de >
MasqSMTP returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqEnv input: www < [at] MW-Columbia . schaefer-shop . de >
MasqHdr input: www < [at] MW-Columbia . schaefer-shop . de >
MasqHdr returns: www < [at] MW-Columbia . schaefer-shop . de >
MasqEnv returns: www < [at] MW-Columbia . schaefer-shop . de >
EnvFromSMTP returns: www < [at] MW-Columbia . schaefer-shop . de >
final input: www < [at] MW-Columbia . schaefer-shop . de >
final returns: www [at] MW-Columbia . schaefer-shop . de
Rcode = 0, addr = www [at] MW-Columbia.schaefer-shop.de
> /quit
First as user root and then as user www
Regards
MArkus
Re: possible config error - masquerade
Markus Boehmer <boehmerm [at] gmx.de> wrote:
> MASQUERADE_AS(`schaefer-shop.de')
> FEATURE(`masquerade_envelope')
Try
MASQUERADE_AS(`schaefer-shop.de')
MASQUERADE_DOMAIN(`schaefer-shop.de')
FEATURE(`masquerade_entire_domain')
FEATURE(`masquerade_envelope')
and send mail to someone outside.
Mike