how to get the user that authenticates
Nicolas de Bari Embriz Garcia Rojas <[email protected]> Fri, 30 Jul 2010 22:21:09 +0100
| Newsgroups | gmane.mail.qmail.ldap |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am trying to make a filter so that users can only send for
example 100 emails per day, so far I got something to work but the
problem that I am facing now is that the sender can change the 'from'
of the email and avoid the 'protection' since is based only on the env
qmailuser and qmailhost, I get the from like this:
$from = $ENV{QMAILUSER};
$from .= "\@$ENV{QMAILHOST}";
and later query ldap for a param that i called 'smtpThrottle', but I
would like to get the real email of the users that authenticates so i
can exactly throttle the emails sent per authenticated user
On the logs I can see that qmail-smtp with can get the auth user and
from the code i see this 'logline2(2,"authentication success, user ",
remoteinfo);
also i see patch i see this remoteinfo = env_get("TCPREMOTEINFO");
my question is how can i get that var remoteinfo or the content of
TCPREMOTEINFO so I can use it on my filter.
thanks in advance.