Tag Archives: Linux

Exim Tips & Tricks – Unclog your queue!

Original article here

This article will focus on some general Exim MTA tips and tricks as well as how to parse mail logs. I originally put this guide together for use with Exim on cPanel. Many cPanel server administrators use the built in Exim MTA without giving it a second thought because it works. It works until they end up providing virtual hosting systems (shared hosting) where some of the users do not update their scripts regularly or simply think setting a cron job that runs every minute and clogs the queue is a good idea. Then running the built in Exim MTA with no knowledge of how it works becomes a disaster! Learn Exim today and save your self some serious headaches!

Is your Exim queue piled up with thousands or even millions of emails? Are you getting complaints from your upstream provider because your servers are sending spam? Are your users complaining emails that they are expecting aren’t coming in or take hours or days to get there? Are your servers blacklisted on the major lists and you have no idea why? If any of these situations describe your problems then this guide should serve as a good primer for you to get the basic idea of how Exim works. You can use the knowledge here to solve all of these problems!

Read More

Various Iptables Tricks

> iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
> iptables -t nat -P PREROUTING DROP
> # Box 1
> iptables -t nat -A PREROUTING -m mac –mac-source 00:50:da:e3:f3:45 -j
> ACCEPT
> # Box 2
> iptables -t nat -A PREROUTING -m mac –mac-source 00:d0:b7:18:0f:f5 -j
> ACCEPT
>
> Now this works as expected, all packets from the two MAC addresses above are
> masq’ed and routed, anything from any other MAC address is DROP’ed.

mmh… but it is a bit unclean to drop packets in the nat table. You want
to filter packets, so use the filter table. Why? Because it is
– unclean
– only the first packet of each connection hits the nat table.

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

iptables -t filter -N restr
iptables -t filter -A restr -p tcp –dport 25 -j DROP

iptables -t filter -P FORWARD DROP
iptables -t filter -A FORWARD -m mac –mac-source 00:50:da:e3:f3:45 -j ACCEPT
iptables -t filter -A FORWARD -m mac –mac-source 00:d0:b7:18:0f:f5 -j restr

Read More

Bad Behavior has blocked 88 access attempts in the last 7 days.