This is a discussion on AW: [AMaViS-user] One more question regarding policy bank configuration: quarantine via smtp within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Mark,=20 thanks again for your prompt answer to my never-ending problems :) > > I've been trying to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Mark,=20
thanks again for your prompt answer to my never-ending problems :) > > I've been trying to set up policy banks that quarantine to an > > email address. Using the setting > > $policy_bank{} =3D { > > *_quarantine_method =3D> "quarantine\@mydoma.in" > > } > > or =3D> "local:quarantine\@mydoma.in" > > doesn't seem to work. The GTUBE mail gets tagged, but then > > passed on to the original recipient. > > $QUARANTINEDIR is set to a local path. > > > > Would I need to use the *_quarantine_to_maps to make this > > work? >=20 > The *_quarantine_method is just a documentation shorthand, Yes, and that is the way I used it here as well (I was lazy=20 writing the mail, I'll be more clear now). :) > The value of these variables look like 'local:virus-%m', > and not like "quarantine\@mydoma.in". What you had in mind > was variables: > virus_quarantine_to, banned_quarantine_to, > bad_header_quarantine_to, spam_quarantine_to > which can supply a main address if the corresponding > *_quarantine_method is 'local:...'. Ok, but my amavis version (2.2.1) complains about an unknown option when I use spam_quarantine_to within the policy bank defintion (but see my examples of what I tried below). > See > http://www.ijs.si/software/amavisd/a...tml#quarantine I've read the entire document several times now, and thought I was=20 adhering to the configuration syntax. I think my main problem is that I'm a bit hazy about what _maps actually are within policy maps:=20 anonymous arrays ( *_map =3D [ qw(list) ], )?=20 anonymous hashes (*_map =3D [ [ qw(list) ] ], )?=20 hashes wrapped inside an array (*_map =3D [ [ 'key' =3D> 'value' ] ], )? I've been trying to make sense of things, but so far the light hasn't=20 been seen. Maybe the policy banks contain one indirection too many for=20 me. :) Anyway, what I've tried (explicit config snippets): Global to all configs I've tried: $interface_policy{'10050'} =3D 'test.de'; In addition to the spam_quarantine_method =3D> 'local:spam@test.de', I've also always tried just setting it to 'local'. Variant 1: Config:=20 $policy_bank{'test.de'} =3D {=20 final_spam_destiny =3D> D_DISCARD, =20 spam_quarantine_method =3D> 'local:spam@test.de', spam_quarantine_to =3D> 'spam@test.de' ... }; Result: Amavis complains about unknown configuration option=20 spam_quarantine_to in the logs. Variant 2: Config: $spam_quarantine_to =3D new_RE( [ qr'^(.*)@test\.de$'i =3D> 'sr@baghus.net' ], [ qr'^(.*)(@[^@]*)?$'i =3D> 'virus-${1}${2}' ] ); # above copied from README.lookup $interface_policy{'10050'} =3D 'test.de'; $policy_bank{'test.de'} =3D {=20 final_spam_destiny =3D> D_DISCARD, =20 spam_quarantine_method =3D> 'local:spam@test.de', ... }; Result: Spam gets tagged, but forwarded to original recipient Variant 3: $policy_bank{'test.de'} =3D {=20 final_spam_destiny =3D> D_DISCARD, =20 spam_quarantine_method =3D> 'local:spam@test.de', spam_quarantine_to_maps =3D> [ 'spam@test.de' ], ... }; Result: Spam gets tagged, but forwarded to original recipient Variant 4: $policy_bank{'test.de'} =3D {=20 final_spam_destiny =3D> D_DISCARD, =20 spam_quarantine_method =3D> 'local:spam@test.de', spam_quarantine_to_maps =3D> [ [ 'spam@test.de' ] ], ... }; Result: Spam gets tagged, but forwarded to original recipient Variant 5: $policy_bank{'test.de'} =3D {=20 final_spam_destiny =3D> D_DISCARD, =20 spam_quarantine_method =3D> 'local:spam@test.de', spam_quarantine_to_maps =3D>=20 [ new_RE( [ qr'^.*@test.de$'i =3D> 'spam@test.de' ] ) = ], # above as per example in amavisd.conf-sample ... }; Result: Spam gets tagged, but forwarded to original recipient So right now I'm really stumped, since I've tried every (to me) reasonable configuration variant. Where am I going wrong here? Regs, Sven ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |