Skip to content


Exim Mail Server – Exim Commands

This is a small tutorial with exim commands you can use with your exim mailserver:

>> Count the number of messages in the queue.
root@localhost# exim -bpc

>> Listing the messages in the queue (time queued, size, message-id, sender, recipient).
root@localhost# exim -bp

>> Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals).
root@localhost# exim -bp | exiqsumm

>> Check what Exim is doing right now.
root@localhost# exiwhat

>> Test how exim will route a given address.
root@localhost# exim -bt user@localdomain.com

>> Display Exim’s configuration settings.
root@localhost# exim -bP

>> Search the queue for messages from a specific sender.
root@localhost# exiqgrep -f [luser]@domain

>> Search the queue for messages for a specific recipient/domain.
root@localhost# exiqgrep -r [luser]@domain

>> Print messages older than the specified number of seconds. Eg: messages older than 1 hour.
root@localhost# exiqgrep -o 3600 [...]

>> Print messages younger than the specified number of seconds. Eg: messages less than an hour old.
root@localhost# exiqgrep -y 3600 [...]

>> Match the size of a message with a regex. Eg: Messages between 500-599 bytes.
root@localhost# exiqgrep -s ‘^5..$’ [...]

>> Match only frozen messages.
root@localhost# exiqgrep -z

>> Match only frozen messages.
root@localhost# exiqgrep -x

>> Print just the message-id of the entire queue.
root@localhost# exiqgrep -i

>> Start a queue run.
root@localhost# exim -q -v

>> Start a queue run for just local deliveries.
root@localhost# exim -ql -v

>> Remove a message from the queue.
root@localhost# exim -Mrm <message-id> [ <message-id> ... ]

>> Freeze a message.
root@localhost# exim -Mf <message-id> [ <message-id> ... ]

>> Thaw a message.
root@localhost# exim -Mt <message-id> [ <message-id> ... ]

>> Deliver a message, whether it’s frozen or not, whether the retry time has been reached or not.
root@localhost# exim -M <message-id> [ <message-id> ... ]

>> Deliver a message, but only if the retry time has been reached.
root@localhost# exim -Mc <message-id> [ <message-id> ... ]

>> Force a message to fail and bounce as “cancelled by administrator”.
root@localhost# exim -Mg <message-id> [ <message-id> ... ]

>> Remove all frozen messages.
root@localhost# exiqgrep -z -i | xargs exim -Mrm

>> Remove all messages older than five days (86400 * 2 = 172800 seconds).
root@localhost# exiqgrep -o 172800 -i | xargs exim -Mrm

>> Freeze all queued mail from a given sender.
root@localhost# exiqgrep -i -f user@example.com | xargs exim -Mf

>> View a message’s headers.
root@localhost# exim -Mvh <message-id>

>> View a message’s body.
root@localhost# exim -Mvb <message-id>

>> View a message’s logs.
root@localhost# exim -Mvl <message-id>

>> Add a recipient to a message.
root@localhost# exim -Mar <message-id> <address> [ <address> ... ]

>> Edit the sender of a message.
root@localhost# exim -Mes <message-id> <address>

Posted in exim, linux.

Tagged with , , .


TinyMCE

Problem:
TinyMCE does not properly support greek characters

Solution:
Change the entity_encoding value from named to raw.

Posted in html, php.


cakephp 2 rc1

At last, cakephp 1.2 rc1 is finally here.
Download it now, or go to the official website: http:www//www.cakephp.org

Posted in cakephp, php.


Identifying MySQL slow queries

Identifying slow db queries is critical for the optimal operation of the db server. There is an excellent guide that helps to accomplish this task: http://www.ducea.com/2006/11/06/identifying-mysql-slow-queries/

Posted in cpanel, mysql.


Apache logs are not rotated in cpanel

use this code to rotate the apache logs in /etc/httpd/logs/ The logs in /etc/httpd/domlogs are rotated according to setting in WHM -> Tweak settings

CODE:
  1. /etc/httpd/logs/*log {
  2. missingok
  3. notifempty
  4. sharedscripts
  5. compress
  6. postrotate
  7. /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
  8. endscript
  9. }

Posted in apache, cpanel.