> Date: Thursday, January 12, 2017 18:08:05 -0700
> From: jdehnert <jdehn...@dehnert.com>
>
> Thanks for the feedback Christian,
> 
> I have been reading the ADDRESS_REWRITING pages in the Postfix web
> site, but so far everything I try ends up with no mail being passed.
> 
> I have tried using sender canonical maps, but I don't think I was
> configuring it properly because I can't get relayed email to get
> forwarded.
> 
> I have tried using a sender_canonical_map with the contents:
> 
>     /.+/      kem...@enphaseenergy.com
> 
> I was hopping that that would catch all the incoming mail and
> rewrite the sender in the message and envelope to
> kem...@enphaseenergy.com.  It might have done that, but nothing was
> ever delivered, and I did remember to run my postmap mapname after
> any edits.
> 
> Keep in mind that if I send an email from the mail relay host in
> the cli, that does get relayed. (I just tested it again, and yup,
> that is working.)
> 
> 
> Christian Kivalo wrote
>> Have you read http://www.postfix.org/ADDRESS_REWRITING_README.html
>> ?
>> 
>> For better help show logs of one message that passes through your 
>> system.
>> 
>> Take a look at the documentation for sender_canonical_maps 
>> http://www.postfix.org/postconf.5.html#sender_canonical_maps and 
>> canonical_maps
>> http://www.postfix.org/postconf.5.html#canonical_maps
>> 
>> I suspect you probably need to set local_header_rewrite_clients 
>> http://www.postfix.org/postconf.5.html#local_header_rewrite_client
>> s for  your rewriting of mails from remote hosts to be made.
>> 
>> -- 
>>   Christian Kivalo
> 
> I have saved the log info for one of the incoming emails that
> should get relayed.  Its rather large so I put it on pastebin.
> 
>     http://pastebin.com/nE83zdvG
> 
> The first process under PID 3027 is the system accepting mail from
> an internal system.
> The second process under PID 4433 is the relay host trying to
> connect to the exchange server at the office365.com site.
> 
> The user /kem...@enphaseenergy.com/ is a valid email user on the
> office365.com exchanger server, and the account we are trying to
> use to connect to, authenticate, and send mail from all of the
> internal hosts and devices. 
> 
> Just for grins, I also made a pastebin of mail send from the mail
> relay host that does get delivered.
> 
>     http://pastebin.com/wK3mLW12
> 
> this helps show that the users connection can, and does work
> sometimes.
> 
> 

Line 232 has:

   smtp.office365.com[40.97.0.2]:587: 
     MAIL FROM:<kem...@enphaseenergy.com>

which I think is what you're after, but it's followed by the
following in line 245:

   smtp.office365.com[40.97.0.2]:587:
     550 5.7.60 SMTP; Client does not have permissions to send
     as this sender

which might help explain your problem.


Reply via email to