On Thu, 2003-11-13 at 14:06, Bill Mullen wrote:
> On Thu, 13 Nov 2003, Michael Holt wrote:
> 
> > On Thu, 2003-11-13 at 08:26, Bill Mullen wrote:
> > 
> > > Including the output of "postconf -n", run on the Postfix box, might
> > > be helpful also, as would the re-inclusion of the two sets of headers;
> > > all that matters is the last couple of "Received:" headers from each
> > > message, as those will be the ones that pertain to your sending
> > > system(s).
> > 
> > postconf -n
> > 
> [snip]
> > mydestination = $myhostname, localhost.$mydomain $mydomain
> > mydomain = holt-tech.net
> > myhostname = earth
> > mynetworks = 192.168.0.0/24, 127.0.0.0/24
> > myorigin = holt-tech.net
> [snip]
> 
> Okay, I think you should at least change the "myhostname =" line, found in
> the /etc/postfix/main.cf file. Having the short hostname of your Postfix
> box here does you no good, as it is of utterly no use to the destination
> system. OTOH, if you changed it to "holt-tech.net", then at least the name
> resolves in one direction (forward), and agrees with the hostname in your 
> MX record for the domain. It would still fail an rDNS check, though, if 
> that check doesn't merely look for whether an rDNS entry exists, but goes 
> further to insist that it match the stated hostname (which it won't). :(

Luckily that's a pretty rare test as few ISPs or hosting companies will
make changes in rDNS for their customers. Lots of legit mail is blocked
when that test is used and eventually someone with some authority slaps
the wrist of the fool admin, who goes and sulks about how their clueless
management won't let them fight spam :-)

> 
> Bear in mind that the "myhostname =" setting in main.cf doesn't need to
> bear even the slightest resemblance to what your system actually calls
> itself; it is the string that is sent whenever Postfix identifies the
> system on which it is running to other systems (both clients and servers).
> As such, the value of this setting *will* have an impact on whether or not
> mail is accepted from you by some servers, as it is sent in the HELO/EHLO 
> statement when Postfix initiates a connection as a client.
> 
> If your external hostname (the one supplied you by your ISP, and currently
> "evrtwa1-ar17-4-35-151-034.evrtwa1.dsl-verizon.net") remains constant or 
> nearly so, then *that* is the ideal string to put into main.cf as your 
> "myhostname =" value, because then your name resolves in both directions.
> If you can do this, it mitigates a lot of problems of this variety. The 
> mere fact that the hostname is obviously tied to the IP address should not 
> be a deal-breaker in and of itself, even if you use DHCP, as many cable 
> and DSL setups that use DHCP in fact change the IP address very rarely.
> 

if the address is in a DHCP pool assigned for home users, more and more
servers out there will block direct SMTP connections from it; only
relaying through the ISP's server will work in this case.

> One could even cobble together a script that determines the current "real"  
> hostname, rewrites main.cf to reflect the change, and reloads Postfix, and
> then set that script to run after every IP address change (both dhcpcd and
> dhclient can be configured for this, and if you use a router, you could
> instead run the script as a cron job to test for such a change, then do
> its thing if one has occurred). If your IP address changes often, that
> hack might allow you to still use your system's "real" name in main.cf.
> 
> Note: if you change "myhostname =" in main.cf, be sure to append the
> string ", earth.$mydomain" to the "mydestination =" line, so that Postfix
> continues to be aware that the box sometimes goes by that name as well.
> 
> > Here was my config.php:
> > 
> > $useSendmail = false;
> > $smtpServerAddress = '192.168.0.3';
> > $smtpPort = 25;
> > $sendmail_path = '/usr/sbin/sendmail';
> > $use_authenticated_smtp = false;
> > 
> > I changed the ip address to 'localhost' and I haven't changed the
> > 'useSendmail' option.
> 
> No problem, it's just talking SMTP directly to port 25, rather than 
> invoking the sendmail pseudo-app. No need to change anything else here.
> 
> > Yes, the postfix server and the squirrel server reside on the same box
> > (as does most everything else).
> 
> Okay, and I gather that the Evolution box is a different one, but also on 
> the same LAN with the server system.
> 
> > Here are the relevant headers:
> > 
> > Received:       from 4.35.151.34 (EHLO servername) (4.35.151.34) by
> > mta130.mail.sc5.yahoo.com with SMTP; Wed, 12 Nov 2003 12:14:06 -0800
> > Received:       from www.holt-tech.net (unknown
> > [server.internal.ip.address]) by servername (Postfix) with SMTP id
> > 13833205CFC for <[EMAIL PROTECTED]>; Wed, 12 Nov 2003 15:16:15 -0500
> > (EST)
> > Received:       from evrtwa1-ar17-4-35-151-34.evrtwa1.dsl-verizon.net
> > ([4.35.151.34]) (SquirrelMail authenticated user michael) by
> > server.internal.ip.address with HTTP; Wed, 12 Nov 2003 12:16:15 -0800
> > (PST)
> > 
> > ************************************************************************
> > 
> > Received:       from 4.35.151.34 (EHLO servername) (4.35.151.34) by
> > mta156.mail.scd.yahoo.com with SMTP; Wed, 12 Nov 2003 12:00:02 -0800
> > Received:       from machinename (unknown [host.internal.ip]) by
> > servername (Postfix) with ESMTP id 0606E205CFC for
> > <[EMAIL PROTECTED]>; Wed, 12 Nov 2003 15:02:11 -0500 (EST)
> 
> You should be able to get rid of the "unknown" bit in the latter set of
> headers by putting an entry into the /var/spool/postfix/etc/hosts file on
> the Postfix box that identifies the Evo system ("machinename") by tying
> its internal IP address to its hostname. It would need to be here, as
> Postfix runs chrooted (in its default MDK configuration), and cannot see
> the "real" /etc/hosts file. You might also want to throw one in that pairs
> the server's internal IP with "www.holt-tech.net"; that ought to clear up
> the "unknown" in the former set of headers.
> 
> Still and all, the headers that pertain to the transactions between your
> Postfix and Yahoo's SMTP server are essentially identical in both of the 
> examples, so it still escapes me why any destination system would be 
> willing to accept one variety of message and not the other. :(
> 
> Unless, of course, the only one giving you fits is your boss', which we
> have already established is hosed in some bizarre fashion <g> ... but
> having Postfix use a more valid hostname may fix that situation, too, even
> though that doesn't fully explain that server's rather eccentric behavior.
> 
> HTH!
-- 
Jack Coates
Monkeynoodle: A Scientific Venture...


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to