Sendmail Masquerade Problem

2008-06-24 Thread Alex de Kruijff
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 [EMAIL PROTECTED] [EMAIL PROTECTED] 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)
 
 D
 Dmpublic
 define(`confDOMAIN_NAME', `www.public')
 define(`SMART_HOST', `smtp.isp')
 
 define(`confBIND_OPTS', `WorkAroundBroken')
 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=[EMAIL PROTECTED],
 [EMAIL PROTECTED]
 Jun 24 18:22:14 private sm-mta[68232]: m5OGMEXU068232:
 from=[EMAIL PROTECTED], size=1351, class=0, nrcpts=1,
 msgid=[EMAIL PROTECTED], 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?= [EMAIL PROTECTED], 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=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (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 [EMAIL PROTECTED]; Tue, 24 Jun 2008 18:22:14 +0200
 (CEST)
 (envelope-from [EMAIL PROTECTED])
 H?x?Full-Name: Charlie Root
 H??Received: (from [EMAIL PROTECTED])
 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 [EMAIL PROTECTED]
 /quit 


it gives me

 canonify   input:  user @ private 
 Canonify2  input: user  @ private 
 Canonify2returns: user  @ private . 
 canonify returns: user  @ private . 
 1  input: user  @ private . 
 1returns: user  @ private . 
 HdrFromSMTPinput: user  @ private . 
 PseudoToReal   input: user  @ private . 
 PseudoToReal returns: user  @ private . 
 MasqSMTP   input: user  @ private . 
 MasqSMTP returns: user  @ private . 
 MasqHdrinput: user  @ private . 
 MasqHdr  returns: user  @ public . 
 HdrFromSMTP  returns: user  @ public . 
 final  input: user  @ public . 
 finalreturns: user @ public
 Rcode = 0, addr = [EMAIL PROTECTED]


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.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail Masquerade Problem

2008-06-24 Thread Chuck Swiger

On Jun 24, 2008, at 2:01 PM, Alex de Kruijff wrote:

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 [EMAIL PROTECTED] [EMAIL PROTECTED] 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.


Root is an exposed user, in other words, mail sent by root is not  
masquaraded by default, even if other addresses would be.


Anyway, this doesn't really matter, as your ISP's mail server should  
be willing to relay your mail anyway.  You should talk with tiscali.nl  
about what else you might need to do-- perhaps setting up SMTP auth  
would let you relay through their mailservers...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail Masquerade Problem

2008-06-24 Thread Alex de Kruijff
On Tue, Jun 24, 2008 at 02:19:44PM -0700, Chuck Swiger wrote:
 On Jun 24, 2008, at 2:01 PM, Alex de Kruijff wrote:
 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 [EMAIL PROTECTED] [EMAIL PROTECTED] 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.
 
 Root is an exposed user, in other words, mail sent by root is not  
 masquaraded by default, even if other addresses would be.

I tested this with a regular user.

 Anyway, this doesn't really matter, as your ISP's mail server should  
 be willing to relay your mail anyway.  You should talk with tiscali.nl  
 about what else you might need to do-- perhaps setting up SMTP auth  
 would let you relay through their mailservers...

this works: echo 'test' | mail -vs test [EMAIL PROTECTED] [EMAIL PROTECTED]
this doesn't: echo 'test' | mail -vs test [EMAIL PROTECTED]

Reading: /var/spool/mqueue/qfm5OJ6BIh070839
 V8
 T1214334371
 K1214343000
 N13
 P1110364
 I0/85/1271838
 MDeferred: 451 Temporary local problem - please try later
 Fbs
 $_localhost [127.0.0.1]
 $rESMTP
 $sprivate
 ${daemon_flags}
 ${if_addr}127.0.0.1
 S[EMAIL PROTECTED]
 MDeferred: 451 Temporary local problem - please try later
 rRFC822; [EMAIL PROTECTED]
 RPFD:[EMAIL PROTECTED]
 H?P?Return-Path: \x81g
 H??Received: from private (localhost [127.0.0.1])
 by public (8.13.6/8.13.6) with ESMTP id m5OJ6BIh070839
 for [EMAIL PROTECTED]; Tue, 24 Jun 2008 21:06:11 +0200 (CEST)
 (envelope-from [EMAIL PROTECTED])
 H?x?Full-Name: Charlie Root
 H??Received: (from [EMAIL PROTECTED])
 by private (8.13.6/8.13.6/Submit) id m5OJ6BpJ070838
 for [EMAIL PROTECTED]; Tue, 24 Jun 2008 21:06:11 +0200 (CEST)
 (envelope-from me)
 H??Date: Tue, 24 Jun 2008 21:06:11 +0200 (CEST)
 H??From: Alex de Kruijff [EMAIL PROTECTED]
 H??Message-Id: [EMAIL PROTECTED]
 H??To: [EMAIL PROTECTED]
 H??Subject: test
 H??X-Virus-Scanned: ClamAV 0.92.1/7553/Tue Jun 24 19:23:00 2008 on
 private
 H??X-Virus-Status: Clean

[EMAIL PROTECTED] doesn't exist on the outside and like it to be changed by
sendmail into [EMAIL PROTECTED]

-- 
Alex

Please copy the original recipients, otherwise I may not read your reply.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]