On Sat, Feb 18, 2012 at 04:17:58PM +0100, Tilman Schmidt 
([email protected]) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Am 18.02.2012 06:57, schrieb Jobst Schmalenbach:
> 
> I don't think you can find out on which port the connection was made,
> but you can easily check whether it was authenticated. For example, I am
> using
> 
>         if (defined($SendmailMacros{"auth_type"})) {
> 
> to avoid running SpamAssassin on messages submitted by my customers.
> (Not because of the server load it generates, but because my customers
> tend to be miffed if my server marks their messages as spam. ;-)

Thanks for that.
I have tried this but I can't get it to work.

I added to sendmail.mc

define(`confMILTER_MACROS_ENVFROM', ``i, {auth_type}, {auth_authen}, 
{auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}'')

and to /etc/mail/mimedefang.conf

MD_EXTRA="-a auth_type -a auth_authen -a auth_ssf -a auth_author -a mail_mailer 
-a mail_host"

and restarted the lot (sendmail, all milters and mimedefang)

then in filter_sender I did:

    if(defined($SendmailMacros{"auth_type"}))
    {
        md_syslog('info', "###################################### filter sender 
  : sendmail authtype SET.");
    }
    else
    {
        md_syslog('info', "###################################### filter sender 
  : sendmail authtype NOT set.");

    }

but it did not work, here is the log of sendmail (I turned some debugging on).

Feb 19 18:19:03  sendmail[23578]: q1J7J3bQ023578: Milter (greylist): init 
success to negotiate
Feb 19 18:19:03  sendmail[23578]: q1J7J3bQ023578: Milter (mimedefang): init 
success to negotiate
Feb 19 18:19:03  sendmail[23578]: q1J7J3bQ023578: Milter (clamav): init success 
to negotiate
Feb 19 18:19:03  sendmail[23578]: q1J7J3bQ023578: Milter: connect to filters
Feb 19 18:19:03  mimedefang.pl[21047]: filter relay    : <175.36.163.211> 
<[175.36.163.211]> <> Continue checking ..... 
Feb 19 18:19:04  sendmail[23578]: STARTTLS=server, 
relay=pa175-36-163-211.pa.vic.optusnet.com.au [175.36.163.211] (may be forged), 
version=TLSv1/SSLv3, verify=NO, cipher=RC4-MD5, bits=128/128
Feb 19 18:19:05  sendmail[23578]: AUTH=server, 
relay=pa175-36-163-211.pa.vic.optusnet.com.au [175.36.163.211] (may be forged), 
authid=jobst, mech=PLAIN, bits=0
Feb 19 18:19:05  milter-greylist: User jobst authenticated, bypassing 
greylisting
Feb 19 18:19:05  mimedefang.pl[21171]: filter sender   : 
<[email protected]>, 175.36.163.211, [175.36.163.211], 
pa175-36-163-211.pa.vic.optusnet.com.au

Feb 19 18:19:05  mimedefang.pl[21171]: ###################################### 
filter sender   : sendmail authtype NOT set.

Feb 19 18:19:05  mimedefang.pl[21047]: filter recipient: 
<[email protected]>, <[email protected]>, 175.36.163.211, 
[175.36.163.211], <[email protected]>, 
pa175-36-163-211.pa.vic.optusnet.com.au, ?, ?, ?
Feb 19 18:19:05  sendmail[23578]: q1J7J3bQ023578: from=<[email protected]>, 
size=690, class=0, nrcpts=1, 
msgid=<[email protected]>, proto=ESMTP, 
daemon=MTA-SSL, relay=pa175-36-163-211.pa.vic.optusnet.com.au [175.36.163.211] 
(may be forged)
Feb 19 18:19:05  sendmail[23578]: q1J7J3bQ023578: Milter add: header: 
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by 
milter-greylist-3.0a1 (mail.barrett.com.au [220.233.246.146]); Sun, 19 Feb 2012 
18:19:05 +1100 (EST)
Feb 19 18:19:05  mimedefang.pl[21047]: filter main     : 175.36.163.211 NOT 
DOMAIN based -> continue checking ..
Feb 19 18:19:05  mimedefang.pl[21047]: 
MDLOG,q1J7J3bQ023578,mail_in,,,<[email protected]>,<[email protected]>,Test
 
Feb 19 18:19:05  sendmail[23578]: q1J7J3bQ023578: Milter add: header: 
X-Scanned-By: MIMEDefang 2.63 on 220.233.246.146
Feb 19 18:19:05  sendmail[23578]: q1J7J3bQ023578: Milter accept: message
Feb 19 18:19:07  sendmail[23585]: STARTTLS=client, 
relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, 
cipher=RC4-SHA, bits=128/128
Feb 19 18:19:09  sendmail[23585]: q1J7J3bQ023578: 
to=<[email protected]>, delay=00:00:04, xdelay=00:00:04, 
mailer=esmtp, pri=4690, relay=gmail-smtp-in.l.google.com. [74.125.127.27], 
dsn=2.0.0, stat=Sent (OK 1329635949 g9si15313381pbd.311)



Jobst




-- 
People without trees are like fish without clean water!

  | |0| |   Jobst Schmalenbach, [email protected], General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to