[Mimedefang] Conditional call of MD

Andrea Gabellini agabellini at intelcom.sm
Wed Aug 13 02:17:01 EDT 2003


At 15.25 12/08/03, you wrote:
>On Tue, 12 Aug 2003, Andrea Gabellini wrote:
>
> > I need to filter with MD only some recipients. I set a Sendmail macro if I
> > match the recipient in a  database map. I pass this macro to MD with the -a
> > option and I tell sendmail to pass it to MD with confMILTER_MACROS_ENVFROM.
>
>But if you're testing the _recipient_, how can you pass the macro
>in ENVFROM?  You don't have a recipient yet!

For the test I manually put a demo value in place of the recipient. For the 
run-time rule I copied the code from another sendmail that works well. This 
is the Rule. The last row in the rule is for print the value in sendmail's 
test mode.

INPUT_MAIL_FILTER(`mimedefang', 
`S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:60s;R:60s;E:5m')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}, {auth_authen}, 
{auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}, 
{MacroTest}')dnl

LOCAL_CONFIG
K spamcheck hash -T<TMPF> /etc/mail/spamcheck
K store_it_in macro

LOCAL_RULESETS
SLocal_check_rcpt
dnl R $*                        $: <$(spamcheck $&{rcpt_addr} $: NOTFOUND $)>
R $*                        $: <$(spamcheck agabellini at intelcom.sm $: 
NOTFOUND $)>
R <NOTFOUND>                $@ $&{rcpt_addr}
R <$*>                      $: $(store_it_in {MacroTest} $@ $1 $) $&{rcpt_addr}
dnl R $*                        $: $&{MacroTest}



>MIMEDefang does not support per-recipient macros very well.  You're better
>off doing the test inside MIMEDefang itself rather than in sendmail.cf
>
>Regards,
>
>David.
>_______________________________________________
>MIMEDefang mailing list
>MIMEDefang at lists.roaringpenguin.com
>http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


---------------------------------------
It is better to be defeated on principle than to win on lies.
---------------------------------------
Ing. Andrea Gabellini
Email: agabellini at intelcom.sm
Tel: 0549 886111 (Italy)
Tel. +378 0549 886111 (International)

Intelcom San Marino S.p.A.
Strada degli Angariari, 3
47891 Rovereta
Repubblic of San Marino

http://www.omniway.sm  http://www.intelcom.sm




More information about the MIMEDefang mailing list