Get MUA from Logs?

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

Get MUA from Logs?

asai
Greetings,

Is it possible to determine the Mail User Agents in use via logging in
Postfix and / or Dovecot?

Thanks,
Asai

Reply | Threaded
Open this post in threaded view
|

Re: Get MUA from Logs?

Ralph Seichter-3
* [hidden email]:

> Is it possible to determine the Mail User Agents in use via logging in
> Postfix and / or Dovecot?

You can configure Postfix to log headers like "User-Agent", but not all
MUAs generate this type of information.

-Ralph
Reply | Threaded
Open this post in threaded view
|

RE: Get MUA from Logs?

Paolo Schiro
In reply to this post by asai
Hallo Asai,

MUA informations are not passed trough POP or IMAP protocol therefore there is no way to get it recorded into logs as I know.

SMTP is almost the same but MUAs are known to insert a range of different mime headers and values into generated messages.

In theory you may try to log them using an header_checks rule resulting into a warning (or at least i recall something similar).

Anyway it's a journey i don't suggest because you will likely result in an endless chasing of MUAs list their behaviors and obviously.... exceptions.


  Paolo

Reply | Threaded
Open this post in threaded view
|

Re: Get MUA from Logs?

Gerald Galster
In reply to this post by asai
> Is it possible to determine the Mail User Agents in use via logging in Postfix and / or Dovecot?

Assert you're using header-checks with pcre in main.cf:

header_checks = pcre:/etc/postfix/header_checks


Then add the following to /etc/postfix/header_checks and reload postfix:

/^(User-Agent|X-Mailer):/    INFO


This prints a log line like:

Jul 23 00:34:24 mx2.server.com postfix/cleanup[11568]: 4BBqyS5c2CzTVVPX: info: header X-Mailer: Apple Mail (2.3445.104.14) from client.provider.com[1.2.3.4]; from=<[hidden email]> to=<[hidden email]> proto=ESMTP helo=<PCNAME>

This might be sufficient for your case but keep in mind what Ralph and Paolo said.

Best regards
Gerald
Reply | Threaded
Open this post in threaded view
|

Re: Get MUA from Logs?

asai
Thank you, Gerald, Ralph, and Paolo, I will try this.