Sendmail Masquerade Problem
Alex de Kruijff
freebsd at akruijff.dds.nl
Tue Jun 24 21:13:22 UTC 2008
I have problem with sendmail that is giving me a headake. I can send
mails als long when I give the from adres, but when I leave this out the
server enters the localname and my ISP isn't accepting the mail. (i.e.
echo 'test' | mail -vs test to at mail.com -ffrom at mail works, but without
the -f option it gets accepted but is rejected by the isp) I have
masquerade setup, but that doesn't seem to do the trick. However check
on shows that it handeled oke.
I added to private.mc
> MASQUERADE_AS(`public')
> MASQUERADE_DOMAIN(`localhost')
> MASQUERADE_DOMAIN(`localhost.lan')
> MASQUERADE_DOMAIN(`private')
> MASQUERADE_DOMAIN(`private')
>
> FEATURE(masquerade_envelope)
> FEATURE(masquerade_entire_domain)
> FEATURE(allmasquerade)
>
> Dwwww
> Dmpublic
> define(`confDOMAIN_NAME', `www.public')
> define(`SMART_HOST', `smtp.isp')
>
> define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
> define(`confNO_RCPT_ACTION', `add-to-undisclosed')
> define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
> define(`confTO_QUEUERETURN', `360d')
> MAILER(local)
> MAILER(smtp)
I found in private.cf
C{E}root
C{M}localhost
C{M}localhost.lan
C{M}private
C{M}private.private
# who I masquerade as (null for no masquerading) (see also $=M)
DMpublic
>From /var/log/maillog
> Jun 24 18:22:14 private sendmail[68231]: m5OGMDGG068231: from=www,
> size=1238, class=0, nrcpts=1,
> msgid=<6dd0e8227154db3d06e70aafd68437ab at prs.public>,
> relay=www at localhost
> Jun 24 18:22:14 private sm-mta[68232]: m5OGMEXU068232:
> from=<www at private>, size=1351, class=0, nrcpts=1,
> msgid=<6dd0e8227154db3d06e70aafd68437ab at prs.public>, proto=ESMTP,
> daemon=IPv4, relay=localhost [127.0.0.1]
> Jun 24 18:22:14 private sm-mta[68232]: m5OGMEXU068232: Milter add:
> header: X-Virus-Scanned: ClamAV 0.92.1/7550/Tue Jun 24 16:52:37 2008
> on private
> Jun 24 18:22:14 private sm-mta[68232]: m5OGMEXU068232: Milter add:
> header: X-Virus-Status: Clean
> Jun 24 18:22:14 private sendmail[68231]: m5OGMDGG068231:
> to="=?UTF-8?B?QWxmYXRyaW9u?=" <test at hotmail.com>, ctladdr=www
> (80/80), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=31238,
> relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m5OGMEXU068232
> Message accepted for delivery)
> Jun 24 18:22:14 private sm-mta[68234]: m5OGMEXU068232:
> to=<test at hotmail.com>, ctladdr=<www at private> (0/0),
> delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31351,
> relay=smtp.isp. [195.241.79.132], dsn=4.3.0, stat=Deferred: 451
> Temporary local problem - please try later
>From the mail it self.
> H??Received: from private (localhost [127.0.0.1])
> by public (8.13.6/8.13.6) with ESMTP id m5OGMEXU068232
> for <test at hotmail.com>; Tue, 24 Jun 2008 18:22:14 +0200
> (CEST)
> (envelope-from www at private)
> H?x?Full-Name: Charlie Root
> H??Received: (from www at localhost)
> by private (8.13.6/8.13.6/Submit) id m5OGMDGG068231;
> Tue, 24 Jun 2008 18:22:13 +0200 (CEST)
> (envelope-from www)
But when I run
> sendmail -bt
> /tryflags hs
> /try esmtp <user at private>
> /quit
it gives me
> canonify input: < user @ private >
> Canonify2 input: user < @ private >
> Canonify2 returns: user < @ private . >
> canonify returns: user < @ private . >
> 1 input: user < @ private . >
> 1 returns: user < @ private . >
> HdrFromSMTP input: user < @ private . >
> PseudoToReal input: user < @ private . >
> PseudoToReal returns: user < @ private . >
> MasqSMTP input: user < @ private . >
> MasqSMTP returns: user < @ private . >
> MasqHdr input: user < @ private . >
> MasqHdr returns: user < @ public . >
> HdrFromSMTP returns: user < @ public . >
> final input: user < @ public . >
> final returns: user @ public
> Rcode = 0, addr = <user at public>
Running "sendmail -d0.1 -bt </dev/null" gives me
> Version 8.13.6
> Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8
> MIME8TO7
> NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS
> PIPELINING SCANF
> STARTTLS TCPWRAPPERS USERDB XDEBUG
>
> ============ SYSTEM IDENTITY (after readcf) ============
> (short domain name) $w = www
> (canonical domain name) $j = www.public
> (subdomain name) $m = public
> (node name) $k = private
> ========================================================
>
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>
--
Alex
Please copy the original recipients, otherwise I may not read your reply.
More information about the freebsd-questions
mailing list