Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

Missing information in headers written by qmail

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


qmail at bruger

Feb 6, 2010, 7:01 AM

Post #1 of 7 (1427 views)
Permalink
Missing information in headers written by qmail

Hi all,

I've been looking at mail-headers for around a week, and noticed that
my qmail never seem to get these variables right:

variable: environment variable:
remoteip (TCPREMOTEIP)
remotehost (TCPREMOTEHOST)
remoteinfo (TCPREMOTEINFO)
local (TCPLOCALHOST, TCPLOCALIP)
relayclient (RELAYCLIENT)


Here's an example where qmail receives from gmail:

Received: from unknown (HELO mail-ew0-f220.google.com) (unknown)


Here's an example where Communigate receives from gmail:

Received: from josef.avalonia.dk ([62.243.190.20] verified)
by elias.avalonia.dk (CommuniGate Pro SMTP 5.2.18)
with ESMTP id 1434763 for me [at] mydomain; Mon, 01 Feb 2010 23:39:53
+0100

Does anyone else encounter this; is it a known issue / is there
already a fix ?


Love,
Jens


lists-qmail at maexotic

Feb 6, 2010, 8:40 AM

Post #2 of 7 (1381 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

On Sat, Feb 06, 2010 at 04:01:28PM +0100, Jens Bauer wrote:
> I've been looking at mail-headers for around a week, and noticed that
> my qmail never seem to get these variables right:

Mine does for more than 10 years and all else I have ever installed
do so, too.

> Here's an example where qmail receives from gmail:
> Received: from unknown (HELO mail-ew0-f220.google.com) (unknown)

What makes you think it is really from Google and not only a faked
HELO from a host without reverse DNS?

> Here's an example where Communigate receives from gmail:
> Received: from josef.avalonia.dk ([62.243.190.20] verified)
> by elias.avalonia.dk (CommuniGate Pro SMTP 5.2.18)
> with ESMTP id 1434763 for me [at] mydomain; Mon, 01 Feb 2010 23:39:53
> +0100

This is definitly NOT from Google.

> Does anyone else encounter this

What patches did you apply? How do you start qmail-smtpd? What is the
contents of your tcprules control file?

\Maex

--
Markus Stumpf


qmail at bruger

Feb 6, 2010, 8:56 AM

Post #3 of 7 (1379 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

Hi Markus,

On 6. Feb, 2010, at 17:40, Markus Stumpf wrote:

> On Sat, Feb 06, 2010 at 04:01:28PM +0100, Jens Bauer wrote:
>> I've been looking at mail-headers for around a week, and noticed that
>> my qmail never seem to get these variables right:
>
> Mine does for more than 10 years and all else I have ever installed
> do so, too.

Alright, then there must be either something with my Mac OS X 10.5.8
(Leopard) or my netqmail source, which caused it.

>> Here's an example where qmail receives from gmail:
>> Received: from unknown (HELO mail-ew0-f220.google.com) (unknown)
>
> What makes you think it is really from Google and not only a faked
> HELO from a host without reverse DNS?

Because I know the senders. =)
-Besides, my qmail never-never placed anything but 'unknown' in the
above fields.

>> Here's an example where Communigate receives from gmail:
>> Received: from josef.avalonia.dk ([62.243.190.20] verified)
>> by elias.avalonia.dk (CommuniGate Pro SMTP 5.2.18)
>> with ESMTP id 1434763 for me [at] mydomain; Mon, 01 Feb 2010 23:39:53
>> +0100
>
> This is definitly NOT from Google.

Sorry, I copied the wrong field in my absence.
The following should be the correct field (from the same mail)
Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com
[209.85.220.214])
by josef.avalonia.dk (Postfix) with ESMTP id DC3ED1335FA8
for <me [at] mydomain>; Mon, 1 Feb 2010 23:42:21 +0100 (CET)

>> Does anyone else encounter this
>
> What patches did you apply? How do you start qmail-smtpd? What is the
> contents of your tcprules control file?

Two, to get netqmail-1.06 to compile under Leopard.
strerr-sys is one of them,
the other one is an include file, which seems to be compiler-dependant.
Apart from that, netqmail-1.06 is unmodified.
(see http://qmail.bruger.mine.nu/, that's the installation I'm running)


Love,
Jens


lists-qmail at maexotic

Feb 6, 2010, 9:12 AM

Post #4 of 7 (1390 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

Hoi Jens,

On Sat, Feb 06, 2010 at 05:56:15PM +0100, Jens Bauer wrote:
> Apart from that, netqmail-1.06 is unmodified.
> (see http://qmail.bruger.mine.nu/, that's the installation I'm running)

All the TCP* environment variables are set by "tcpserver" from the ucspi-tcp
package. Do you start qmail-smtpd via tcpserver?
Can't see that from your link above and I don't know anything about Mac OSX.

If you do, you can try the following:
- write a little shell script (/tmp/e.sh) and make it executable:
------------------------------------------------------------------------
#!/bin/sh
env | sort
------------------------------------------------------------------------
- on the commandline start
$ tcpserver 0 34343 /tmp/e.sh
34343 ist the port used, you can use any you like if it is not yet occupied.
- in another window type:
$ telnet localhost 34343
this should result in your environment being returned and there should
be lines like:
TCPLOCALHOST=localhost
TCPLOCALIP=127.0.0.1
TCPLOCALPORT=34343
TCPREMOTEHOST=localhost
TCPREMOTEIP=127.0.0.1
TCPREMOTEPORT=58399
If they are not, tcpserver has some problems and does not set the
environment variables correctly.

If they are, you have to search on :-D

\Maex


qmail at bruger

Feb 6, 2010, 10:05 AM

Post #5 of 7 (1361 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

Hi Markus,


On 6. Feb, 2010, at 18:12, Markus Stumpf wrote:

> Hoi Jens,
>
> On Sat, Feb 06, 2010 at 05:56:15PM +0100, Jens Bauer wrote:
>> Apart from that, netqmail-1.06 is unmodified.
>> (see http://qmail.bruger.mine.nu/, that's the installation I'm
>> running)
>
> All the TCP* environment variables are set by "tcpserver" from the
> ucspi-tcp
> package. Do you start qmail-smtpd via tcpserver?

No, I'm using launchd, which is installed on all versions of Mac OS X
10.4 and later.

> Can't see that from your link above and I don't know anything about
> Mac OSX.
>
> If you do, you can try the following:
> - write a little shell script (/tmp/e.sh) and make it executable:
>
> ------------------------------------------------------------------------
> #!/bin/sh
> env | sort
>
> ------------------------------------------------------------------------
> - on the commandline start
> $ tcpserver 0 34343 /tmp/e.sh
> 34343 ist the port used, you can use any you like if it is not yet
> occupied.
> - in another window type:
> $ telnet localhost 34343
> this should result in your environment being returned and there
> should
> be lines like:
> TCPLOCALHOST=localhost
> TCPLOCALIP=127.0.0.1
> TCPLOCALPORT=34343
> TCPREMOTEHOST=localhost
> TCPREMOTEIP=127.0.0.1
> TCPREMOTEPORT=58399
> If they are not, tcpserver has some problems and does not set the
> environment variables correctly.
>
> If they are, you have to search on :-D


Brilliant information. I've now performed a small test.
A perl-script is dumping all the environment variables...

foreach $key (keys %ENV){ print("$key=$ENV{$key}\n"); }

--- it gives the following output: ---
$ telnet sparrow 123
Trying 10.0.1.0...
Connected to sparrow.
Escape character is '^]'.
HOME=/nohome
LOGNAME=_qmaild
__CF_USER_TEXT_ENCODING=0x9A:0:0
SHELL=/bin/false
TMPDIR=/var/folders/Oa/OafzCsIaEeG27s93pK5qHU+++7c/-Tmp-/
USER=_qmaild
PATH=/usr/bin:/bin:/usr/sbin:/sbin
Connection closed by foreign host.
---

Which again tells me that none of the environment variables that qmail
expects are passed by launchd!
-So my next job is to figure out how to do just that. ;)
Currently, all I've seen (man launchd) is 'LAUNCHD_SOCKET is exported
when invoking a command via the launchd command line'.

Thank you for pointing me in the right direction.


Love,
Jens


search-web-for-address at pyropus

Feb 6, 2010, 10:54 AM

Post #6 of 7 (1369 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

Jens Bauer <qmail [at] bruger> wrote:
>
> No, I'm using launchd, which is installed on all versions of Mac OS X
> 10.4 and later.
[...]
> Which again tells me that none of the environment variables that qmail
> expects are passed by launchd!
> -So my next job is to figure out how to do just that. ;)
> Currently, all I've seen (man launchd) is 'LAUNCHD_SOCKET is exported
> when invoking a command via the launchd command line'.

The tcp-env program does a similar setup of the appropriate variables for when
qmail-smtpd is launched from inetd; I know nothing of launchd, but it might
work. If not, it gives you a starting point for creating a similar program.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------


qmail at bruger

Feb 6, 2010, 7:09 PM

Post #7 of 7 (1356 views)
Permalink
Re: Missing information in headers written by qmail [In reply to]

Hi all,

The problems are now fixed, and for anyone running Mac OS X, the final
working LaunchDaemon can be downloaded from http://
qmail.bruger.mine.nu/, so just go nuts. ;)

On 6. Feb, 2010, at 19:54, Charles Cazabon wrote:

> The tcp-env program does a similar setup of the appropriate
> variables for when
> qmail-smtpd is launched from inetd; I know nothing of launchd, but
> it might
> work. If not, it gives you a starting point for creating a similar
> program.

Thank you Markus and Charles for all the help regarding the missing
environment variables.


Love,
Jens

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.