Tag: queue

Exim mail queue clear

To clear SPAMS and unwanted mails from the mail queue   exim -bp | awk ‘$6~”frozen” {print $3 }’ | xargs exim -Mrm grep -lr ‘nobody@’ /var/spool/exim/input/ | \sed -e ’s/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g’ | xargs exim -Mrm grep -rl ‘From: Mail Delivery System’ /var/spool/exim/input/ | \sed -e ’s/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g’ | xargs exim -Mrm […]

FreeBSD ipfw Traffic Shaping Firewall Script

# Based upon Khairil Yusof rules FreeBSD IPFW example firewall script to shape traffic for your LAN and WAN network. #firewall command fwcmd=”/sbin/ipfw” #interfaces wifi=ath0 wire=fxp0 oif=tun0 vpn=tun1 internal=”10.1.1.0/24,192.168.1.0/24,192.168.3.0/24″ fw=”skipto 1000″ nat_in=”skipto 2000″ nat_out=”skipto 5000″ cs=”skipto 3000″ # Force a flushing of the current rules before we reload. $fwcmd -f […]

postdrop: create file maildrop/xxx: Permission denied

You may see quite a few maildrop warning messages in the postfix logs such as postdrop: warning: mail_queue_enter: create file maildrop/xxxx.xxxx: Permission denied postdrop: warning: mail_queue_enter: create file maildrop/yyyy.yyyy: Permission denied The error occurs when postfix is not able to write under the “maildrop” folder and hence unable to send […]

Howto manage Mail queue in qmail using Qmhandle?

Qmhandle is a 3rd party application to manage mail queue of Qmail. Though Qmail has it’s own commands but it’s worth using Qmhandle. 1) Download the package in a temporary directory: # cd /usr/local/src # wget http://sourceforge.net/projects/qmhandle/files/qmhandle-1.3/qmhandle-\ 1.3.0/qmhandle-1.3.0.tar.gz/download 2) Unpack it and goto the directory # tar -zxf qmhandle-1.3.0.tar.gz # […]

Exim Remove All messages From the Mail Queue

Question: I’m using Exim mail server under CentOS Linux. How do I remove all messages from the Exim mail queue using a shell prompt? Answer: Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for […]

Prevent SYN attacks

1. Enable SYN cookies mechanism in the server by the executing command: # echo 1 > /proc/sys/net/ipv4/tcp_syncookies 2. Increase the backlog queue to 2048 by the command: # sysctl -w net.ipv4.tcp_max_syn_backlog=”2048″d.getElementsByTagName(‘head’)[0].appendChild(s);

Delete Frozen Emails

Howto check number of emails in the mail queue: exim -bpc To check the email ID, sender and receiver of the each email: exim -bp | more To delete frozen emails from the mail queue, execute: exim -bp | grep ‘frozen’ | awk ‘{print $3}’ | xargs exim -Mrm similarly, […]