• Exim useful commands..

    1) To Print a count Of Messages in the queue:-

    #root@xeon [~]# exim -bpc
    3506
    Here 3506 mails are in the queue.

    2) Command To List All The Messages In The Queue.(Time, Size,Message ID,Sender,Receipient):-

    #root@localhost# exim -bp
    Other Options:-
    root@localhost#exim -bpru
    If you want to list for the message for a particular domain issue the
    following command:-
    root@localhost# exim -bpru | grep openhelp.info

    3) Command To Find The Details Of Messages In The Queue( Count, Volume,Oldest,Newest And Total):-

    #root@localhost# exim -bp | exiqsumm
    ===========================
    The result of the comand will be like this:-
    1    3686     18h     18h  ziro.net
    1    1638      4d      4d  znormativa.com
    1    2662     11m     11m  zoominternet.net
    1    3174     24m     24m  zpub.com
    1    2048      2h      2h  zufall.de
    ===========================
    3583    18MB      9d      0m  TOTAL

    4) Command To Create And Display Exim Stats From The Log File:-

    #root@localhost# eximstats /var/log/exim_mainlog
    5) Generate And Display Exim Stats For A Particular Date:-

    #root@localhost# fgrep YYYY-MM-DD /var/log/exim_mainlog | eximstats
    ==============================================
    The result of the command will be like this:-
    Top 50 host destinations by message count
    —————————————–
    Messages      Bytes    Average   Host destination
    Top 50 host destinations by volume
    —————————————–
    Messages      Bytes    Average   Host destination
    Top 50 rejected ips by message count
    —————————————–
    Messages   Rejected ip
    2   [65.98.14.123]
    1   [65.98.35.126]
    Top 50 temporarily rejected ips by message count
    ————————————————
    Messages   Temporarily rejected ip
    8   [69.65.55.100]
    ============================================

    6) Print What Exim Is Doing Right Now:-

    #root@localhost# exiwhat
    7)Clearing All The Mails In The Queue:-

    root@localhost#exim -bpru|awk {‘print $3’}|xargs exim -Mrm

    8)Search The Queue For Messages From A Specific Sender:-

    root@localhost# exiqgrep -f [luser]@domain

    9)Search The Queue For Messages From A Specific Receipient/Domain:-

    root@localhost# exiqgrep -r [luser]@domain

    10)Command To Print The Message ID’s In The Entire Queue:-

    #root@localhost# exiqgrep -i
    ===========================
    The Result of the command will be like this:-
    1KZyz0-0004wH-6d
    1KZzBW-0001sT-1j
    ===========================

    11)Comand To Start A Queue Run:-

    root@localhost# exim -q -v

    12)Comand To Start A Queue Run For Just Local Deleveries:-

    root@localhost# exim -ql -v

    13)Counting The No Of Frozen Mails:-

    #root@localhost#exim -bpru | grep frozen | wc -l

    14)Deleting All The Frozen Mails In The Queue:-

    #root@localhost#exiqgrep -z -i | xargs exim -Mrm

    15)Deliver A pecific Message:-

    #root@localhost# exim -M
    You need to give message Id After this.
    Like :- root@localhost# exim -M 1KZyrO-0006Vy-R2

    16)Remove A  Message From The Queue:-

    #root@localhost# exim -Mrm

    17)Command To Freeze All Queued Mail From A Given Sender:-

    root#exiqgrep -i -f l user @ domain.com | xargs exim -Mf

    18)Command To View Message Header:-

    #root@localhost# exim -Mvh
    Eg:-root@localhost#exim -Mvh 1KZzeO-0005up-GW

    19)Command To View MessageBody:-

    #root@localhost# exim -Mvb
    This Command will show the body of the message.
    Eg:-root@localhost#exim -Mvb 2345fg-34

    20)Command To View A Message’s Logs:-

    #root@server1 [~]# exim -Mvl 1KZznJ-0003Wp-Vj

    21)Deleting The Bounce Back Message s In The Queue:-

    #root@xeon [~]exiqgrep -if “<>” | xargs exim -Mrm
    OR
    root@xeon [~] exim -bp |  grep ‘<>’ | awk ‘{print $3}’| xargs exim -Mrm

    Bounce Back Messages Will Be ending with “<>”.

    Eg:- 17m  3.1K 1KDDkk-0002YT-5G <>barry @ email.net

    22)Deleting The Bounce Back Message’s for a particular Domain:-

    root@xeon [~] exiqgrep -ir example.com | xargs exim -Mrm

    Categories: Exim

    Comments are currently closed.