Outils pour utilisateurs

Outils du site


informatique:reseau:exim4

Exim4

MTA, Service SMTP

Voir aussi:

Documentation:

Tips & Tricks

fallback (wildcard) alias

In /etc/exim4/exim4.conf.template replace:

system_aliases:
  ...
  data = ${lookup{$local_part}lsearch{/etc/aliases}}

By:

system_aliases:
  ...
  data = ${lookup{$local_part}lsearch*@{/etc/aliases}}

Add the fallback alias in /etc/aliases

For example:

  * : a_local_user

or

  * : a_remote_user@internet.net

Run newaliases to make Exim4 know new aliases.

Vider le queue

Forcer le traitement de la queue:

# /usr/sbin/exim -qf

Ainsi que les messages “frozen”:

# /usr/sbin/exim -qff

Compter le nombre de messages dans la queue:

# /usr/sbin/exim -bpr | grep "<" | wc -l 

Helpful Exim Commands

exim4 -bP => dump la configuration

$ sudo exim4 -bP| grep nonmail
smtp_accept_max_nonmail = 100
smtp_accept_max_nonmail_hosts = *
exim4   -M   email-id        => Force delivery of one message
exim4 -qf                  => Force another queue run
exim4 -qff                 => Force another queue run and attempt to flush the frozen message
exim4  -Mvl   messageID  => View the log for the message
exim4  -Mvb  messageID  => View the body of the message
exim4  -Mvh  messageID  => View the header of the message
exim4 -Mrm  messageID  =>  Remove message without sending any error message
exim4  -Mg  messageID   =>  Giveup and fail message to bounce the message to the Sender

exim4 -bpr | grep “<” | wc -l    =>Number of emails in the que
exim4 -bpr | grep frozen | wc -l   => How many Frozen mails on the queue

# Deleteing Frozen Messages
$ sudo exim4 -bpr | grep frozen | awk {'print $3'} | xargs sudo /usr/sbin/exim -Mrm

no immediate delivery

no immediate delivery: more than 10 messages received in one connection

$ sudo editor /etc/exim4/exim4.conf.template

change (or add) line: smtp_accept_queue_per_connection=30

update config: $ sudo update-exim4.conf

That's all.

View new config: $ sudo exim4 -bP | grep smtp_accept_

informatique/reseau/exim4.txt · Dernière modification: 12/06/2020 20:31 de cyrille