I run my own sendmail mail server at my office which has been functioning perfectly for years.
I recently noticed that when travelling, my emails to friends are sometimes bounced - often due to the fact that IP address I am using is part of a range that are dynamically allocated by whichever ISP I happen to be using. These addresses often end up for one reason or another on a blacklist.
My question is, does anyone know how I can get sendmail to rewrite the header information so that anything (especially from me using my email address) can be rewritten to look like it was sent from my own network (we have our own C class range). Effectively I want all my outgoing mail that goes through my mail server to look like it was sent physically from my office.
Apologies - I should explained more clearly. When I am travelling, I am using my own email account which uses my own mail server as the SMTP host. It appears that when I am connected to the net via a dynamically allocated IP address and send email via my SMTP server, it gets rejected by the destination host. I was pretty sure I was using authentication to my server - I'll check when I'm able in a few hours.
Addendum:
Here are the headers for a typical rejection from gmail.com after I sent an email from my current location to my Google account via my SMTP server. Th e problem is being caused by the original "Received From" header.
----- Transcript of session follows ----- ... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 [203.217.18.80 12] Our system has detected that this message is
<<< 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail,
<<< 550-5.7.1 this message has been blocked. Please visit
<<< 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for
<<< 550 5.7.1 more information. pp2si5211798pbb.61 - gsmtp
554 5.0.0 Service unavailable
>--t157o6hX029609.1423122606/edrs.com.au
>Content-Type: message/delivery-status
>
>Reporting-MTA: dns; edrs.com.au
>Received-From-MTA: DNS; 58-6-171-5.dyn.iinet.net.au
>Arrival-Date: Thu, 5 Feb 2015 18:49:51 +1100
>
>Final-Recipient: RFC822; edrs.com.au@gmail.com
>Action: failed
>Status: 5.7.1
>Remote-MTA: DNS; gmail-smtp-in.l.google.com
>Diagnostic-Code: SMTP; 550-5.7.1 [203.217.18.80 12] Our system has detected that this >message is
>Last-Attempt-Date: Thu, 5 Feb 2015 18:50:06 +1100
>--t157o6hX029609.1423122606/edrs.com.au
>Content-Type: message/rfc822
>Content-Transfer-Encoding: binary
>Return-Path: <dna@edrs.com.au>
>Received: from [192.168.0.166] (58-6-171-5.dyn.iinet.net.au [58.6.171.5])
(authenticated bits=0)
by edrs.com.au (8.13.8/8.13.8) with ESMTP id t157nohY029604
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO)
for <edrs.com.au@gmail.com>; Thu, 5 Feb 2015 18:49:51 +1100
>Message-ID: <54D3209E.6050702@edrs.com.au>
>Date: Thu, 05 Feb 2015 17:49:50 +1000
>From: Nigel Allen <dna@edrs.com.au>
>User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
>MIME-Version: 1.0
>To: Nigel Allen <edrs.com.au@gmail.com>
>Subject: {SPAM?} Fwd: Re: Listener Issue: App installation or download
>References: <54d1192bdcc4e_4688829e981572fd@help.tunein.com>
>In-Reply-To: <54d1192bdcc4e_4688829e981572fd@help.tunein.com>
>X-Forwarded-Message-Id: <54d1192bdcc4e_4688829e981572fd@help.tunein.com>
>Content-Type: multipart/mixed; boundary="----------=_1423122599-19274-10"
>X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (edrs.com.au [203.32.74.10]); Thu, 05 Feb 2015 18:49:52 +1100 (AEDT)
>X-Spam-Score: 6.618 (******) >AWL,BAYES_00,DNS_FROM_AHBL_RHSBL,HTML_MESSAGE,RCVD_IN_PBL,RCVD_IN_RP_RNBL,RDNS_DYNAMIC
>Content-Transfer-Encoding: binary
>X-Scanned-By: MIMEDefang 2.70 on 203.32.74.10