Rok Potočnik wrote: > Hi! > > Would it be possible somehow to figure out if the sender is an > authenticated user and fix the spam score accordingly (e.g. if he's > authenticated, decrease the spam score with 3 or something)... > > I'm using Postfix 2.7, and in case of an authenticated user there's a > > Received: from ... > ... > ... > (Authenticated sender: u...@domain.com) > by my.server.com ... > That is added by:
main.cf: ... smtpd_sasl_authenticated_header = yes You can use a header check rule to rewrite the header, somthing like this: header_checks = pcre:/etc/postfix/header_checks # vim /etc/postfix/header_checks /^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\)).*\(Authenticated sender: ([^)]+)\).*by (mail\.example\.com) \(([^)]+)\) with (E?SMTPS?A?) id ([A-F[:digit:]]+).*/ REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1]) by Authenticated User (mail.example.com) with $5 id $6 And then, in SA local config I used: # vim /etc/spamassassin/20_smtp_auth_user_checks.cf header SMTP_AUTH_LOCAL_RCVD Received =~ /Authenticated User \(mail.example.com\).* / And then you local score this rule: # vim /etc/spamassassin/50_local_scores.cf score SMTP_AUTH_LOCAL_RCVD -4 -4 -4 -4 Hope this helps. NOTE: it a single line > ... > > What would be the easiest way of doing that... with a hook of some sort? > I really lack the knowledge of Perl programming so any help would be > greatly appreciated. > > -- Jorge Armando Medina Computación Gráfica de México Web: http://www.e-compugraf.com Tel: 55 51 40 72, Ext: 124 Email: jmed...@e-compugraf.com GPG Key: 1024D/28E40632 2007-07-26 GPG Fingerprint: 59E2 0C7C F128 B550 B3A6 D3AF C574 8422 28E4 0632 ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user Please visit http://www.ijs.si/software/amavisd/ regularly For administrativa requests please send email to rainer at openantivirus dot org