Index of /qmail/patches/qmail-smtpd-tagauthinfo

Icon  Name                                  Last modified      Size  
[TXT] netqmail-1.05-smtpd-tagauthinfo.patch 11-Mar-2004 11:28 1.6K [   ] zftoaster-smtpd-tagauthinfo.patch 11-Mar-2004 10:58 1.6K
*******************************************************************
SMTPD ADDING MAIL HEADER WITH AUTHENTICATION INFO
*******************************************************************

This patch adds an X-Authinfo-header to all messages handled by
qmail-smtpd. This header contains information about the source of
authentication and the authenticated user.

Users that authenticated via SMTP AUTH will find there username
withing the X-Authinfo-header:

   X-Authinfo: SMTP authenticated <user@domain.com>

In addition this patch makes use of the environment variable AUTHINFO
and prints its contents to the X-Authinfo-header. This enables
external authentication programms to use the header. A example would
be SMTP-After-POP3 where the POP3-authenticator that opens relaying
for the authenticated IP address also adds AUTHINFO:

   1.2.3.4:allow,RELAYCLIENT="",RBLSMTPD="",AUTHINFO="user@domain.com"

The header will note the external authentication:

   X-Authinfo: externally authenticated <user@domain.com>

By default this patch always adds the header even if no authentication
is available:

   X-Authinfo: none

ATTENTION: This patch needs a version of qmail with the SMTP-AUTH
patch provided by Erwin Hoffmann [1]. Other SMTP-AUTH patches may work
or may not. 

*******************************************************************
Usage
*******************************************************************

Get the patch from the following location:

   http://alex.zeitform.de/qmail/qmail-smtpd-tagauthinfo/

Apply the patch over netqmail-1.05 with SMTP-auth [2]:

   patch -p0 < netqmail-1.05-smtpd-tagauthinfo.patch

To enable adding the X-Authinfo-header you either 

   echo 1 > /var/qmail/control/tagauthinfo

or set the environmant variable TAGAUTHINFO=1.

Tagging can be disabled by setting either to "0" (zero). It is
recommended to set the control file to "1" and disable tagging for
certain senders within tcp.smtp by adding TAGAUTHINFO=0.

ATTENTION: this patch is not thorougly tested yet. Use with caution.

*******************************************************************
Notes on vpopmail and other external authenticators
*******************************************************************

The external authenticator (e.g. vchkpw) need to set AUTHINFO to the
username of the authenticated user. This requires changes in the
code. These changes must be done by yourself. I might provide a patch
for vpopmail 5.4.x.

*******************************************************************
Credits
*******************************************************************

I was inspired by a mail of Markus Stumpf to the qmail mailing list.

*******************************************************************
Author and License
*******************************************************************

In case of trouble or questions contact:
Alex Pleiner, zeitform Internet Dienste, alex@zeitform.de

This code is free. The terms of the GNU GPL [7] apply.

*******************************************************************
References
*******************************************************************

[1] http://www.fehcom.de/qmail/smtpauth.html
[2] http://qmail.mirrors.space.net/netqmail/

-alex