Feature Request: display port on smtpd connections

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature Request: display port on smtpd connections

Matt Rude-3
Currently, as far as I have seen, the SMTP process displays in the logs
the FQDN then the IP address and port of the remote system. ie:
    postfix/smtp[25473]: 84F728F66B4: to=<[hidden email]>,
relay=127.0.0.1[127.0.0.1]:10025, delay...
or
    postfix/smtp[25478]: C7E628F66B5: to=<[hidden email]>,
relay=smtp.comcast.net[76.96.30.117]:587, delay...

But my SMTPD process dose not display the connecting port.  I'm seeing
logs displayed as follows:
    postfix/smtpd[25465]: 84F728F66B4:
client=laptop.example.com[192.168.1.10], sasl_method...
or
    postfix/smtpd[25475]: connect from samantha.example.com[127.0.0.1]

Displaying the port the client is connecting to would help is debugging
connection problems when there are different options configured for
different ports.

Is there is a setting I am missing or some reason this is not a good idea?

Thanks
-Matt


signature.asc (267 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: display port on smtpd connections

Victor Duchovni
On Thu, Jul 10, 2008 at 08:35:03PM -0500, Matt Rude wrote:

> Currently, as far as I have seen, the SMTP process displays in the logs
> the FQDN then the IP address and port of the remote system. ie:
>    postfix/smtp[25473]: 84F728F66B4: to=<[hidden email]>,
> relay=127.0.0.1[127.0.0.1]:10025, delay...
> or
>    postfix/smtp[25478]: C7E628F66B5: to=<[hidden email]>,
> relay=smtp.comcast.net[76.96.30.117]:587, delay...
>
> But my SMTPD process dose not display the connecting port.  I'm seeing
> logs displayed as follows:
>    postfix/smtpd[25465]: 84F728F66B4:
> client=laptop.example.com[192.168.1.10], sasl_method...
> or
>    postfix/smtpd[25475]: connect from samantha.example.com[127.0.0.1]
>
> Displaying the port the client is connecting to would help is debugging
> connection problems when there are different options configured for
> different ports.
>
> Is there is a setting I am missing or some reason this is not a good idea?

Seems you want the port number of local listening end-port, not the remote
client (which is available in 2.5+). The best solution there is multiple
Postfix instances or per smtpd service "-o syslog_name=postfix-submit"
overrides in master.cf.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: display port on smtpd connections

Matt Rude-3
Victor Duchovni wrote:

> On Thu, Jul 10, 2008 at 08:35:03PM -0500, Matt Rude wrote:
>
>  
>> Currently, as far as I have seen, the SMTP process displays in the logs
>> the FQDN then the IP address and port of the remote system. ie:
>>    postfix/smtp[25473]: 84F728F66B4: to=<[hidden email]>,
>> relay=127.0.0.1[127.0.0.1]:10025, delay...
>> or
>>    postfix/smtp[25478]: C7E628F66B5: to=<[hidden email]>,
>> relay=smtp.comcast.net[76.96.30.117]:587, delay...
>>
>> But my SMTPD process dose not display the connecting port.  I'm seeing
>> logs displayed as follows:
>>    postfix/smtpd[25465]: 84F728F66B4:
>> client=laptop.example.com[192.168.1.10], sasl_method...
>> or
>>    postfix/smtpd[25475]: connect from samantha.example.com[127.0.0.1]
>>
>> Displaying the port the client is connecting to would help is debugging
>> connection problems when there are different options configured for
>> different ports.
>>
>> Is there is a setting I am missing or some reason this is not a good idea?
>>    
>
> Seems you want the port number of local listening end-port, not the remote
> client
correct
>  (which is available in 2.5+).
I'm running 2.5.2 (from source), is it in a beta release?
>  The best solution there is multiple
> Postfix instances or per smtpd service "-o syslog_name=postfix-submit"
> overrides in master.cf.
Thanks, I just had a bad day and the port displaying would have shown me
the problem in about 5 secs.

Thanks
-Matt


signature.asc (267 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: display port on smtpd connections

Victor Duchovni
On Thu, Jul 10, 2008 at 09:17:04PM -0500, Matt Rude wrote:

> >>Is there is a setting I am missing or some reason this is not a good idea?
> >
> >Seems you want the port number of local listening end-port, not the remote
> >client
> correct
> > (which is available in 2.5+).
> I'm running 2.5.2 (from source), is it in a beta release?

No, 2.5+ (perhaps even 2.4 I have not checked for the exact release)
are able to log the client source port. There is nothing to log the server's
own port (which is constant for each service).

> >The best solution there is multiple
> >Postfix instances or per smtpd service "-o syslog_name=postfix-submit"
> >overrides in master.cf.
>
> Thanks, I just had a bad day and the port displaying would have shown me
> the problem in about 5 secs.

I use multiple instances or multiple syslog_name values within a single
instance when the distinction matters.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: display port on smtpd connections

Matt Rude-3
Victor Duchovni wrote:

> On Thu, Jul 10, 2008 at 09:17:04PM -0500, Matt Rude wrote:
>
>  
>>>> Is there is a setting I am missing or some reason this is not a good idea?
>>>>        
>>> Seems you want the port number of local listening end-port, not the remote
>>> client
>>>      
>> correct
>>    
>>> (which is available in 2.5+).
>>>      
>> I'm running 2.5.2 (from source), is it in a beta release?
>>    
>
> No, 2.5+ (perhaps even 2.4 I have not checked for the exact release)
> are able to log the client source port. There is nothing to log the server's
> own port (which is constant for each service).
>  
I'm looking for the server's port that was used

>>> The best solution there is multiple
>>> Postfix instances or per smtpd service "-o syslog_name=postfix-submit"
>>> overrides in master.cf.
>>>      
>> Thanks, I just had a bad day and the port displaying would have shown me
>> the problem in about 5 secs.
>>    
>
> I use multiple instances or multiple syslog_name values within a single
> instance when the distinction matters.
>  
Ill look into multiple syslog_names.

Thanks
-Matt


signature.asc (267 bytes) Download Attachment