This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hiding LAN IP/hostnames in outgoing mail?

Hullo, or should I say, helo...

I'm absolutely darned if I can get around this. Hope someone can point me in the right direction.

I'm testing a simple setup with a LAN masquerading on the external interface, like
(LAN_MASQ   Internal_Network__ -> All / All   MASQ__External   None).

E-mail clients on the LAN machines are set up to use the ASL internal interface for outgoing mail over the SMTP proxy.

Any mail sent this way (through the SMTP proxy) is annotated with the following header (yes, I think header is the right word):

Received: from [LAN_IP] (helo=LAN_hostname)
by SMTP_PROXY_HOSTNAME with smtp (Exim 4.10)

with the actual LAN IP/hostname for the sending machine (and the entry for Hostname (MX) in the SMTP proxy, which is fine).

Surely there's a way to hide the internal hostname/IP's?

Thanks.    


This thread was automatically locked due to age.
  • It is not mandetory you use the SMPT proxy, but if you do use it what SMPT server are you running?    
  • I too am wondering about how to hide this.  I'd rather not have the recepient see the names of my internal IP addresses on the LAN. 

    If anyone knows how to get around that, please pass along the info.  
  • I'm using Postfix (on a machine in the DMZ).
    Postfix has capabilities for masquerading/removing local IP's which work fine on any mail sent out of there directly (but there are other issues with that method). My problem is with the HOST/IPs added by the SMTP proxy (Exim, it seems, of which I know nothing) to mail which is relayed through it.
    Anyone?   
  • would indeed be nice to hear an administrator of Astaro talking about this     
  • It's the same in our case, but I don't worry about it, because of this:
    Our Mailserver is in our LAN with an 192.168.111.x address. There is no possibility to connect this server directly. Our internal domainname is not our external domainname.

    But I also would like to know to hide his address anyway.

    bxxp    
  • I don't beleive this an Astaro or Exim issue- it is standard SMTP protocol  behavior.  

     I've tried this same thing with a Lotus Notes server behind a Checkpoint firewall and you get the same result- internal IP addresses are transmitted.  

    If you look on Google newsgroups, there is a ton of info on people coming up with all sorts of trickery trying to get this resolved with various mail servers / firewall combinations with little success.  

    Although it is not the perfect solution, one way around this is to use an e-mail client that  isn't SMTP such as a web-based e-mail client or, if you happen to live in the Windows world, a MAPI client.    In that case, you bypass the client-server SMTP relay and the server sends the e-mail directly and only your external IP  will be visible during the smtp-to-smtp handoff.  That's the workaround I am currently implementing.    
  • Is this possible with the current version of exim in ASL or it it still an SMTP protocol issue. 
  • The mail client is adding the headers.
    That would be a nice last-minute feature for 5, wouldn't it??

    But in the meantime: Exim headers_remove (transport) option

    It sure would be nice if Exim had a headers_only option (~only retain the following headers...); sort of like Default Deny as opposed to default Allow...
       
  • Actually, my mail client is my mail server in the DMZ which can sucessfully remove LAN IP addresses from its outbound headers. The mail header for the ASL to Recipent transaction has the IP I want to hide.

    X-Apparently-To: bjack985@yahoo.com via 216.136.129.233; Fri, 12 Mar 2004 14:49:19 -0800 
    Return-Path:  
    Received: from 206.46.170.106 (EHLO out006.verizon.net) (206.46.170.106) by mta135.mail.dcn.yahoo.com with SMTP; Fri, 12 Mar 2004 14:49:19 -0800 
    Received: from smtp.mydomain.com ([151.197.9.245]) by out006.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id  for ; Fri, 12 Mar 2004 16:49:19 -0600 
    Received: from [192.168.35.12] (helo=mydomain.com) by smtp.mydomain.com with esmtp (Exim 4.22) id 1B1vNG-0008Un-J0 for bjack999@yahoo.com; Fri, 12 Mar 2004 17:43:26 -0500 
    received: from ylime3 (authenticated user myname@mydomain.com) by mydomain.com (Cipher TLSv1:RC4-MD5:128) (Exim 4.22) with ESMTP id 4-md50000000001.tmp for ; Fri, 12 Mar 2004 17:49:17 -0500 
    Reply-to:  
    From: "JimM" 
    To: bjack999@yahoo.com 
    Subject: test 8 
    Date: Fri, 12 Mar 2004 17:49:16 -0500 

    There are 4 "received" header lines.
    The bottom one is attached by my mailserver when the mail is received from my laptop (ylime3).
    The next one up is attached by ASL when it is received from my mailserver (192.168.35.12). ASL is assigning the IP of the "received from" IP in it's header. I want to suppress that.

     
  • I'm surprised it has such a "feature"!!

    Be that as it may, tweaking the Exim processing to strip the header should do it. If you look at the configuration files in the Exim jail (and the other directives on the page cited above), you will probably find where it is adding that header; unless Astaro is running some pipe script to add it. But even the invocation of that would be seen in the Exim configuration files...