Filtrovani prichozi posty - Exim-3.13-3

David Rohleder davro na ics.muni.cz
Pondělí Listopad 26 20:59:04 CET 2001


mbenes na tenez.cz (Miroslav BENES) writes:

> Preji krasny den !
> 
> Prosim o radu, jak filtrovat prichozi postu. Z jedne adresy
> prichazeji kravoviny a rad bych zahazoval postu, ktera je vetsi nez
> nejake rozumne cislo. Ale nevim jak na to, i kdyz jsem si prosel
> dokumentaci.
> 
> a) Rad bych zahazoval _veskerou_ postu prichazejici z konkretni
> adresy (domeny) pokud ma urcite vlastnosti (napr. velikost >
> ...). Tohle jsem v manualu nenasel.
> 
> b) Pripadne bych to mohl nasadit jako filtr jen pro konkretni
> uzivatele (neni jich moc).  Ale to taky nejde - viz priklad.
> 
> Priklad filtru :
> 
> --- begin --- 
> # Exim filter
> 
> if $header_from contains "m" then if $message_size is above 10k then
> finish endif endif
> 
> deliver tenez071
> ---  end  ---
> 
> 
> Neboli pokud je v adrese odesilatele pismeno "m" a pokud je zprava vetsi nez 10 kB, 
> pak ji nedorucuj nikam (podminka je uhozena, ale na otestovai to staci).
> 
> 
> Kdyz to vyzkousim, ohlasi mi exim :
> 
> $ /usr/lib/sendmail -bf .forward <maillong
> Sender taken from "From" line
> Sender    = mbenes na tenez.cz
> Recipient = tenez071 na mail.tenez.cz
> Testing Exim filter file .forward
> 
> Finish
> Filter processing ended:
>   Filtering did not set up a significant delivery.
>   Normal delivery will occur.
> 
> 
> Takze kdyz filtr neurci kam se ma zprava dorucit (== ma se zahodit),
> povazuje to exim za chybu (??) a provede doruceni jako by zadny
> filtr neexistoval :-\
> 

When in the course of delivery a message is processed by a filter
file, what happens next, that is, after the whole filter file has been
processed, depends on whether the filter has set up any significant
deliveries or not. If there is at least one significant delivery, then
the filter is considered to have handled the entire delivery
arrangements for the current address, and no further processing of the
address takes place. If, however, no significant deliveries have been
set up, Exim continues processing the current address as if there were
no filter file, and typically sets up a delivery of a copy of the
message into a local mailbox. In particular, this happens in the
special case of a filter file containing only comments.


Jinak vam tam chybi zaklinadlo seen:

# Exim filter
if $reply_address contains "@spam.site" and
   $reply_address does not contain "postmaster@"
then
   seen finish
endif

To je priklad z dokumentace.



-- 
-------------------------------------------------------------------------
David Rohleder						davro na ics.muni.cz
Institute of Computer Science, Masaryk University
Brno, Czech Republic
-------------------------------------------------------------------------


Další informace o konferenci Sendmail