[Mimedefang] filter_sender, authenticated or smtp (port 25) Connections

Jan-Pieter Cornet johnpc at xs4all.net
Sat Feb 18 11:35:42 EST 2012


On 2012-2-18 16:17 , Tilman Schmidt wrote:
>> Is there any way I can find out in mimedefang whether a connection is made as authenticated users or coming through the standard smtp (25) port??
> 
> I don't think you can find out on which port the connection was made,

Actually, you can, by inspecting $SendmailMacros{daemon_name}

That's not the port, but it's equivalent to the port (it's the Name= argument of the DAEMON_OPTIONS m4 macro in sendmail.mc).

However, having said that...

> but you can easily check whether it was authenticated. For example, I am
> using
> 
>         if (defined($SendmailMacros{"auth_type"})) {

It's indeed much better to check explicitly for authentication, as demonstrated in this code. You may also want to log $SendmailMacros{"auth_authen"} as that is the username that authenticated (so if spam is sent out via a weak password, you at least know whose password was compromised).

-- 
Jan-Pieter Cornet <johnpc at xs4all.net>
Systeembeheer XS4ALL Internet bv
Internet: www.xs4all.nl
Contact: www.xs4all.nl/contact

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 331 bytes
Desc: OpenPGP digital signature
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20120218/b048777a/attachment.sig>


More information about the MIMEDefang mailing list