Hi, ich bein mir sicher dass es irgendwo steht, aber v.......t noch mal, ich finde einfach nicht wo es gestanden hat. Ich versuche eine nicht Verknüpfung in eine Regel einzubauen: Ich hab stehen: :0 c ! meineemail@foo.bar Auf diese Weise leite ich mir Mails an einen Webmailer weiter. Ich will das Rezept um folgende Features er- weitern: 1. Nur E-Mails an Adresse1 und an Adresse2 sollen weitergeleitet werden. 2. Nicht jedoch wenn WORT drin vorkommt. Also hab ich draus gemacht: :0 c # forwarding to webaccount * 1^0 ^To:*sa@programmers-world.com * 1^0 ^To:*sascha.andres@keatec.com * ! ^Subject:*WORT* ! sascha.andres@livingit.de Jetzt klappt aber gar nichts mehr (Nichts wird weitergeleitet). Ich find einfach nicht den Grund warum ;( Wäre Nett wenn mir mal jemand auf die Sprünge helfen könnte. Ciao Sascha -- http://www.programmers-world.com sa at programmers-world dot com
Hallo, On Sun, 09 Jun 2002, Sascha Andres wrote:
Ich versuche eine nicht Verknüpfung in eine Regel einzubauen:
Ich hab stehen:
:0 c ! meineemail@foo.bar
Auf diese Weise leite ich mir Mails an einen Webmailer weiter. Ich will das Rezept um folgende Features erweitern:
1. Nur E-Mails an Adresse1 und an Adresse2 sollen weitergeleitet werden. 2. Nicht jedoch wenn WORT drin vorkommt.
Also hab ich draus gemacht: :0 c # forwarding to webaccount * 1^0 ^To:*sa@programmers-world.com * 1^0 ^To:*sascha.andres@keatec.com * ! ^Subject:*WORT* ! sascha.andres@livingit.de
Jetzt klappt aber gar nichts mehr (Nichts wird weitergeleitet). Ich find einfach nicht den Grund warum ;(
Denkfehler deinerseits. Oder Brett vor'm Kopp ;) Du willst nochmal ueber 'man 5 procmailrc' meditieren. Und ueber 'man 7 regex' und 'man 1 egrep'[1] *g* Mehrere Zeilen sind _UND_ verknuepft. Weiters hast du bei "WORT" noch ne flasche Regex (was soll das: "Beliebig viele ':', dann WOR, dann bel. viele 'T'"?). Und sowieso: Was soll das '1^0' sein?
Wäre Nett wenn mir mal jemand auf die Sprünge helfen könnte.
==== UNGETESTET ==== # forward-copy to webaccount :0 c * TO_(sa@programmers-world.com|sascha.andres@keatec.com) * !^Subject:.*WORT ! sascha.andres@livingit.de ==== UNGETESTET ==== HTH, -dnh, hoffend, dabei behilflich sein koennend, o.g. Brett zu entfernen :) [1] d.h. 'man 1 grep' mit bes. Beachtung der egrep/grep -E Variante -- Ich hoffe das dieser Satz nicht so endet wie die meisten von mir. Nämlich als Wognatur. [WoKo in dag°]
Hallo David, David Haller schrieb:
On Sun, 09 Jun 2002, Sascha Andres wrote:
Also hab ich draus gemacht: :0 c # forwarding to webaccount * 1^0 ^To:*sa@programmers-world.com * 1^0 ^To:*sascha.andres@keatec.com * ! ^Subject:*WORT* ! sascha.andres@livingit.de
Jetzt klappt aber gar nichts mehr (Nichts wird weitergeleitet). Ich find einfach nicht den Grund warum ;(
Du willst nochmal ueber 'man 5 procmailrc' meditieren. Und ueber 'man 7 regex' und 'man 1 egrep'[1] *g*
Mehrere Zeilen sind _UND_ verknuepft. Weiters hast du bei "WORT" noch ne flasche Regex (was soll das: "Beliebig viele ':', dann WOR, dann bel. viele 'T'"?). Und sowieso: Was soll das '1^0' sein?
Weighted scoring (man 5 procmailsc). w^x w = weight, x = exponent x = 0 zählt w nur beim ersten Treffer hinzu. Somit kann man mit mehreren 1^0 - Zeilen eine Oder-Verknüpfung erreichen. Saschas Versuch klappt wohl deshalb nicht, weil er mit "To:*" das Leerzeichen zwischen To: und der Email-Adresse nicht erwischt.
Wäre Nett wenn mir mal jemand auf die Sprünge helfen könnte.
==== UNGETESTET ==== # forward-copy to webaccount :0 c * TO_(sa@programmers-world.com|sascha.andres@keatec.com) * !^Subject:.*WORT ! sascha.andres@livingit.de ==== UNGETESTET ====
Eigentlich müsste man im TO_-Pattern noch die Punkte escapen, da der Punkt in einem RE als Zeichen für "ein beliebiges Zeichen" steht (was natürlich auch ein Punkt sein kann.) :-) Gruß christian
Hi, On Mon, Jun 10, 2002 at 06:21:28AM +0200, David Haller wrote:
Mehrere Zeilen sind _UND_ verknuepft. Weiters hast du bei "WORT" noch ne flasche Regex (was soll das: "Beliebig viele ':', dann WOR, dann bel. viele 'T'"?). Und sowieso: Was soll das '1^0' sein?
Das Brett wurde mir bereits per PM genommen ;) Ich hab mit Google gesucht und ein Tutorial gefunden (hab die URL nicht da, aber war glaub ich von ner UNI), und dort wurde '1^0' als Oder Verknüpfung angegeben. Mit den Regülären Ausdrücken werde ich mich wohl noch ein wenig beschäftigen müssen ...
==== UNGETESTET ==== # forward-copy to webaccount :0 c * TO_(sa@programmers-world.com|sascha.andres@keatec.com) * !^Subject:.*WORT ! sascha.andres@livingit.de ==== UNGETESTET ====
Das mit der Verneinung funktinoiert jetzt auch ;) Thx Sascha -- http://www.livingit.de http://www.mobile-bookmarks.info http://www.programmers-world.com linux at programmers-world dot com
Hi, On Mon, Jun 10, 2002 at 06:21:28AM +0200, David Haller wrote:
Mehrere Zeilen sind _UND_ verknuepft. Weiters hast du bei "WORT" noch ne flasche Regex (was soll das: "Beliebig viele ':', dann WOR, dann bel. viele 'T'"?). Und sowieso: Was soll das '1^0' sein?
Ich hab mail im Netzt näher nach 1^0 und procmail gesucht. Und siehe da: 1^0 ist irgendwie doch ein oder: --- Zitat von: http://www.columbia.edu/acis/email/delivery/procmail/regexp.html --- Logical OR (another way) * 1^0 ^From:.*someone@.*someplace\.edu * 1^0 ^From:.*anotherone@.*someplace\.edu The above is another way to do logical OR. It uses the weighted scoring system as described in the procmailsc man page. Each match gets a score of 1, and if the total score is at least 1, the action line gets executed. In weighted scoring, Procmail tries all the conditions, even if one doesn't match, and then tests the score. This is a very simple example; if you had several conditions you could require matching more than just one or give some conditions more weight than others. --- Zitat Ende --- Man lernt nie aus ;) Ciao Sascha -- http://www.livingit.de http://www.mobile-bookmarks.info http://www.programmers-world.com linux at programmers-world dot com
participants (3)
-
Christian Schult
-
David Haller
-
Sascha Andres