Gestion basique des mails en mode console sous Linux (réception, tri, filtrage, envois)






$ chmod 600 ~/.fetchmailrc

$ vim ~/.fetchmailrc


---------------------------------------------------------------------------------------------------------------
set postmaster "fred"
set bouncemail

poll pop.free.fr with proto POP3
user fred password 1234

poll pop.online.net with proto POP3
user fred password 1234

poll pop.online.net with proto POP3
user fred password 1234

poll pop.freesbee.fr with proto POP3
user fred password 1234

# Lancement de procmail
mda "/usr/bin/procmail -Y -d %T"


---------------------------------------------------------------------------------------------------------------
Fetchmail stocke les mails dans un fichier :

fred@fred1:/var/spool/mail$ ls
fred

Procmail viendra ensuite les rechercher et les dispatcher en fonction des règles de triage.





Tri des mails avec Procmail



vim ~/.procmailrc

--------------------------------------------------------------------------------------------------------

LOGNAME=fred
SHELL=/bin/sh
DEFAULT=$HOME/Mail/boite-reception/
SHELL=/bin/sh

# filtrage

:0fw
* < 50000
| /usr/bin/spamc

:0:
* ^X-Spam-Status: Yes.*
$HOME/Mail/spam/

# Doublons vers repertoire /spam
:0 Whc: msgid.lock
| formail -D 8192 msgid.cache
:0 a:
$HOME/Mail/spam/

# Attachements indésirables
:0 HB:
* .*name=.*\.(scr|vba|vb|bat|cmd|pif|exe).*
$HOME/Mail/spam/



Activation régulière de fetchmail et procmail avec cron



crontab -e

--------------------------------------------------
*/10 * * * * /usr/bin/fetchmail -m /usr/bin/procmail >> /home/fred/.fetchlog 2>&1


Lancement toute les 10 mns






Filtrage des mails



Spamassassin + pyzor + razor

Apprentissage : sa-learn --spam --dir /home/fred/Mail/spam/new


~/.spamassassin$ vim user_prefs


#spamAssassin config file for version 2.5x
# generated by http://www.yrex.com/spam/spamconfig.php (version 1.01)

# How many hits before a message is considered spam.

# Whether to change the subject of suspected spam
rewrite_subject 1

# Text to prepend to subject if rewrite_subject is used
subject_tag *****SPAM*****

# Encapsulate spam in an attachment
report_safe 1

# Use terse version of the spam report
use_terse_report 0

# Enable the Bayes system
use_bayes 1

# Enable Bayes auto-learning
auto_learn 1

# Enable or disable network checks
use_razor2 1
use_dcc 1
use_pyzor 1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
# - french
ok_languages fr








blacklist_from *@microsoft.com
whitelist_to *@CULTe.org
whitelist_to *@lists.debian.org
blacklist_from friend@somewhere.com
blacklist_from *@isp.com
blacklist_from someone@somewhere.com

dns_available yes

Edition des mails avec MUTT






http://www.muttfr.org/

Sébastien MICHEL: http://michoux.born2frag.org/config/muttrc.html





Envoi des mails avec exim


eximconf + section rewrite


######################################################################
# REWRITE CONFIGURATION #
######################################################################

*@localhost ${lookup{$1}lsearch{/etc/email-addresses}\
{$value}fail} frFs

#*@fred ${lookup{$1}lsearch{/etc/email-addresses}\
*@fred1.fred ${lookup{$1}lsearch{/etc/email-addresses}\
{$value}fail} frFs

f1sxo@ref-union.org fred@localhost, bctT
zulian@free.fr fred@localhost, bctT
zulian@zulian.com fred@localhost, bctT




Date de dernière modification: 16/08/2005
Contact : Frédéric ZULIAN




http://www.zulian.com/

http://www.zulian.com/cv/index.html

http://www.zulian.com/cv/cvfred.html

http://www.zulian.com/perfperf/index.html

http://www.zulian.com/vae/

http://www.zulian.com/vae/livret2DEESINET.html

http://www.zulian.com/dala/index.html

http://lada.zulian.com/doc/clim.html

http://lada.zulian.com/distrib.html

http://www.zulian.com/dala/doc/ural-lada/

http://lada.zulian.com/photos-video/images.html

http://lada.zulian.com/photos-video110/images-110.html

http://www.zulian.com/dala/indexrusse.htmll

http://psycholo.zulian.com/

http://www.zulian.com/culte/sitecopy.html

http://hamradio.zulian.com/

http://hamradio.zulian.com/vpnwifi.html

http://www.zulian.com/culte/

http://www.zulian.com/culte/conflada.html

linux, LINUX, DEBIAN Gestion basique des mails en mode console sous Linux réception, tri, filtrage, envois

http://www.zulian.com/culte/mail-console.html

http://www.zulian.com/culte/traduc.html


http://www.zulian.com/

http://www.zulian.com/cv/index.html

http://www.zulian.com/cv/cvfred.html

http://www.zulian.com/perfperf/index.html

http://www.zulian.com/vae/

http://www.zulian.com/vae/livret2DEESINET.html

111, 1121, niva, NIVA, calina, Kalina, zulian, colomiers, toulouse, Parent, parents, parent, Enfant, Enfants, enfant, enfants, enfance, psychologie, psychanalyse, pédiatrie, linux, LINUX, DEBIAN, d

http://www.zulian.com/dala/index.html

http://www.zulian.com/culte/mail-console.html

http://www.zulian.com/culte/traduc.html

http://lada.zulian.com/doc/clim.html

http://lada.zulian.com/distrib.html

http://www.zulian.com/dala/doc/ural-lada/

http://lada.zulian.com/photos-video/images.html

http://lada.zulian.com/photos-video110/images-110.html

http://www.zulian.com/dala/indexrusse.html

http://psycholo.zulian.com/

http://www.zulian.com/culte/sitecopy.html


référencement naturel et referencement publicitaire




ONT FACE="Arial">referencement publicitaire