Outils pour utilisateurs

Outils du site


blog

Postfix Liste blanche et liste noire

Librement traduit de http://www.linuxlasse.net/linux/howtos/Blacklist_and_Whitelist_with_Postfix

Nous pouvons jouer sur deux paramètres :

check_client_access
Bloque par IP, plage d'IP ou nom DNS

check_sender_access
Bloque par adresse email (champ FROM)

Il est important de définir check_client_access et check_sender_access en premier

/etc/postfix/main.cf

smtpd_client_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/client_checks, check_sender_access hash:/etc/postfix/sender_checks

/etc/postfix/client_checks

# Restricts which clients this system accepts SMTP connections from.

mondomain.com             REJECT Fraud rejected
example.com               REJECT No spammers
.example.com              REJECT No spammers, from your subdomain
123.456.789.123           REJECT Your IP is spammer
123.456.789.0/24          REJECT Your IP range is spammer
321.987.654.321           OK
example1.com              OK

/etc/postfix/sender_checks

# Restricts sender addresses this system accepts in MAIL FROM commands.

example.com              REJECT env. from addr any@example.com rejected
.example.com             REJECT env. from addr any@sub.example.com rejected
user@example.com         REJECT We don't want your email
example2.com             OK
postmap /etc/postfix/client_checks
postmap /etc/postfix/sender_checks
postfix reload

Postfix bloquer un domain ou une IP

Source : http://arnofear.free.fr/linux/template.php?tuto=22&page=1

/etc/postfix/main.cf

# Permet de refuser la connexion SMTP pour les IP ou domaines contenus
# dans ce fichier.
smtpd_client_restrictions = check_client_access hash:/etc/postfix/blacklisted_sender

/etc/postfix/blacklisted_sender

# Domaine ou IP.
rolexreplica.com REJECT You are blacklisted
90.123.456.78 REJECT You are blacklisted
postmap /etc/postfix/blacklisted_sender
service postfix reload
2025/03/24 15:06

Cloud - Serverless Framework

Voir : https://www.serverless.com

Install

npm install -g serverless

Exemple

serverless
cd aws-python-project
serverless deploy
 
 
serverless invoke -f hello	
serverless invoke -f hello --log
 
serverless remove
2025/03/24 15:06

Ajout disque SAN Fibre Channel fiber channel - scan newly added fc luns and scsi disks

Source : https://www.learnitguide.net/2016/02/scan-newly-added-fc-luns-and-scsi-disks.html

Identifier les disques existants

LANG=C fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-|type|identifier'

Identifier le numéro de l'adaptateur HBA

systool -c fc_host -v

Ou

# ls /sys/class/fc_host
host0

Rescan des LUNs

echo "1" > /sys/class/fc_host/host0/issue_lip
echo "- - -" > /sys/class/scsi_host/host0/scan

Il peut être nécessaire de rescaner les partitions

partprobe /dev/sdc
partprobe /dev/sdd

(ou addpart ?)

Ou avec le script rescan-scsi-bus.sh

yum install sg3_utils
rescan-scsi-bus.sh

Vérif

LANG=C fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-|type|identifier'
dmesg
lsblk
multipath -l
2025/03/24 15:06

Postfix ajout d'un nouveau alias d'email

Exemple pour que jean@acme.fr reçoit maintenant les emails destiné à poleemploi@acme.fr

1 Modif du fichier "aliases"

On ajout une ligne au fichier /etc/aliases comme ci-dessous

/etc/aliases
ebay1001:     jean

2 Pour générer le fichier ''/etc/aliases.db''

newaliases 

Il n'est pas nécessaire de faire un “reload” ni un “restart” de Postfix

2025/03/24 15:06

Police de caractères - fonts

Voir :

Polices de caractères :

FIXME

Voir https://bits.debian.org/2021/12/2000-fonts-debian.html

ITP #973779 fnt install scheherazadenew
RFP #944140 fnt install arsenal
RFP #757249 fnt install ekmukta
RFP #724629 fnt install firasans
RFP #766211 fnt install orbitron
RFP #803690 fnt install pompiere
RFP #754784 fnt install raleway
RFP #827735 fnt install reemkufi
RFP #986999 fnt install redhat{display,mono,text} 

sudo fc-match "Noto Color Emoji"
 
sudo apt-get install fonts-noto-color-emoji
 
# copy config from this gist your profile config directory
cp 10-emoji.conf $XDG_CONFIG_HOME/fontconfig/conf.d/10-emoji.conf
 
# regenerate font cache
fc-cache -f -v

Open this url in your browser
https://eosrei.github.io/emojione-color-font/full-demo.html

~/.config/fontconfig/conf.d/01-emoji.conf

https://gist.github.com/probil/36dd02d6c9d8446f027aaafb1728a0f3#file-10-emoji-conf ~/.config/fontconfig/conf.d/99-emoji.conf (you will probably need to create the folders!) and add this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match>
    <test name="family"><string>sans-serif</string></test>
    <edit name="family" mode="append" binding="strong">
      <string>Bitstream Vera Serif</string>
      <string>Noto Color Emoji</string>
    </edit>
  </match>
 
  <!-- Add emoji generic family -->
  <alias binding="strong">
    <family>emoji</family>
    <default><family>Noto Color Emoji</family></default>
  </alias>
 
  <!-- Aliases for the other emoji fonts -->
  <alias binding="strong">
    <family>Apple Color Emoji</family>
    <prefer><family>Noto Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Segoe UI Emoji</family>
    <prefer><family>Noto Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Emoji One</family>
    <prefer><family>Noto Color Emoji</family></prefer>
  </alias>
</fontconfig>
cp /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf /usr/local/share/fonts/
chmod 644 /usr/local/share/fonts/NotoColorEmoji.ttf

clear font cache

fc-cache -fv

Autres - setfont

Source : https://tookmund.com/2024/01/fixing-my-shell

if [ -t 1 ]
then
	setfont /usr/share/consolefonts/Lat15-Terminus20x10.psf.gz
fi
dpkg-reconfigure console-setup
fc-cache ~/.fonts/
chkfontpath --add /usr/share/fonts/local/
ttmkfdir -d /usr/share/fonts/local/ -o /usr/share/fonts/local/fonts.scale

Method to add fonts is as follows:

  • Double-click on the “Computer” icon on your desktop.
  • In the “File” menu, choose “Open Location…”
  • Type in: fonts:
  • When the fonts window appears, drag and drop the fonts to be installed into this window.

The new fonts you install should be usable by most GNOME applications. Some applications may have to be restarted to use the newly added fonts.

Source : https://docs.redhat.com/en/documentation/Red_Hat_Enterprise_Linux/5/html-single/international_language_support_guide/index

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki