Thursday, 24 September 2009

E mail issues

cd /home/username/mail/domain name -Here all mail accounts will be present.

cd 'mail account'

mail -v mailid . -To send mail through the shell

^To move frozen messages

exim -bprc | grep frozen | awk {'print $3'} | xargs exim -Mrm

^To get count of the mail

exim -bpc
pgrep exim | wc -l

^To get error logs
tail -f /usr/local/apache/logs/error_logs

^Print what Exim is doing right now:

root@localhost# exiwhat

^Test how exim will route a given address:

root@localhost# exim -bt alias@localdomain.com
user@thishost.com
<-- alias@localdomain.com   router = localuser, transport = local_delivery

root@localhost# exim -bt user@thishost.com

user@thishost.com

router = localuser, transport = local_delivery root@localhost# exim -bt user@remotehost.com   router = lookuphost, transport = remote_smtp   host mail.remotehost.com [1.2.3.4] MX=0

root@localhost# exim -bt user@remotehost.com
router = lookuphost, transport = remote_smtp
host mail.remotehost.com [1.2.3.4] MX=0

^Freeze a message:

root@localhost# exim -Mf [ ... ]

^Thaw a message:

root@localhost# exim -Mt [ ... ]

^Deliver a message:

root@localhost# exim -M [ ... ]

^Force a message to fail and bounce as "cancelled by administrator":

root@localhost# exim -Mg [ ... ]

^Remove all frozen messages:

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

^Remove all messages older than five days (86400 * 5 = 432000 seconds):

root@localhost# exiqgrep -o 432000 -i | xargs exim -Mrm

^Freeze all queued mail from a given sender:

root@localhost# exiqgrep -i -f luser@example.tld | xargs exim -Mf

^View a message's headers:

root@localhost# exim -Mvh

^View a message's body:

root@localhost# exim -Mvb

^View a message's logs:

root@localhost# exim -Mvl

^Add a recipient to a message:

root@localhost# exim -Mar

[
... ]

Edit the sender of a message:

root@localhost# exim -Mes

No comments:

Post a Comment