Friday, February 17, 2012

Exim Commands.


  1. Log file is located at /var/log/exim/main_log
  2. To see some general stats: eximstats -nr /var/log/exim_mainlog
  3. To see current activity: exim -bp | exiqsumm
  4. To see output number of mails in the queue: exim -bpc, to list queued mails exim -bp
  5. To see undelivered messages in the queue: exim -bpu
  6. To see what the actual processes are doing: exiwhat
  7. Checking mailbox size: du -hsc * (run in /home)
  8. The configuration template is in /etc/exim/update-exim.conf. and the actual config file in in /var/lib/exim/config.auto generated.
  9. Regenerate the config file from the template: update-exim.conf
  10. Reload the configuration: invoke-rc.d exim reload
  11. Send a test message send "content" | mail -s "subject" user@example.com
  12. Send a message without "send": echo "body" | mail -s "subject" user@example.com
  13. Process the queue: exim -q -v
  14. Process the queue, ignoring retry times: exim -qf -v
  15. Process the queue, including even frozen messages: exim -qff -v or exim -qff -v -C /etc/exim.conf &
  16. To see the contents of a specific message: exim -Mvc message id
  17. To remove mails by id exim -v -Mrm ID
  18. To delete frozen mails exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm
  19. To freeze mails from sender exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf
  20. To remove mails from sender exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm
  21. To find most emailing ip tail -1000 /var/log/exim_mainlog |grep '\[' |cut -d[ -f2 |cut -d] -f1|sort -n |uniq -c |sort -n or tail -2000 /var/log/exim_mainlog | grep public
  22. To find the mail in the queue with $name exim -bp|grep $name
  23. To view the message header exim -Mvh $MSGID
  24. To view the message body exim -Mvb $MSGID
  25. To Force deliver of message exim -M $MSGID
  26. To view the transact of message exim -v -M $MSGID
  27. To force exim update in cpanel server /scripts/eximup --force

No comments: