PUSH YOUR SIEVE FILTERS IN COMMAND LINE Computer & Internet

Source link:https://doc.clickup.com/36146776/p/12f3jr-83/learn-more-why-your-business-needsa-mobilee-commerce-app/12f3jr-83/learn-more-why-your-business-needs-a-mobile-e-commerce-app
Sieve filters are mail filtering rules executed by the mail server (NB: not all of them offer it). In my opinion, this is the cleanest option for filtering emails: whatever my software for consulting my emails (webmail, graphical or textual client on computer, client on smartphone, etc. ) , the filtering will always be the same, without need to copy the rules.
To edit these rules, there are several solutions. The Blue mind groupware solution, which I use personally and professionally, provides a graphic editor on webmail, but it is too limited for my use: I can only combine rules and not mix them, create sub-rules, etc An example of a sub-rule: if I want the mails coming from the address to foo@example.orgbe stored in a folder foo, and if, among these mails, the subject contains bar, the mail is marked as read, I can write in Sieve:
if allof (address :contains "from" ["foo@example.org"] ) {
if allof ( header :contains "Subject" "bar" ) {
setflag "Seen";
} https://gitlab.com/jmjrwe
fileinto "foo";
stop;
}
But Bluemind does not allow this, the rules will be more basic (ah, GUI limitations!). Thunderbird can use an extension, Sieve to manage Sieve filters, but I'm not sure what it's worth anymore, I haven't used Thunderbird for a long time. Kmail , the KDE mail client that I use, allows you to (natively) manage Sieve filters graphically but pushed or… to write them directly. That's great! Ah but… it's not open in Vim . Too bad, I have my little habits and I hate using another text editor.
The command line: sieve-connect
So personally, I use Vim to write my Sieve scripts and sieve-connect to send them to my mail server. Example:
sieve-connect -s serveur.example.org -p 2000 -u luc@example.org
--localsieve /home/luc/filter.siv --upload --remotesieve mes_regles.sieve
Explanation of options:
• -s serveur.example.org : the server address ;
• -p 2000 : the port used by the server for the Sieve filter management interface;
• -u luc@example.org : my login;
• --localsieve /home/luc/filter.siv : the address of the file to push;
• --upload : the action to be taken, therefore the sending to the server;
• --remotesieve mes_regles.sieve : the name of the remote file in which I will push my rules. You can indeed have several rules files, but only one will be active. Convenient to have special rules for the holidays: just activate the file that contains them and go

キーワード
websitetraffic
business
revenue

このノウハウを評価する

評価、コメントするにはサービスに登録してください。

サービス登録をする

コメントを見る

コメントするにはサービスに登録してください。

サービス登録をする

FC2ID新規登録

ログイン

▲ PageTop