Dealing with outgoing smtp problems

In some of my networks there are a huge number users connected through a  internet connection with NAT.
Users do pick up virus’s and bots from time to time. The result is lots of port 25 smtp traffic streaming out the network and the gateway ip obviously gets blacklisted soon.

Seems like SMTP-Gated offers some help with this.

I start of with building a rpm of smtp-gated.
Getting a rpm building environment is easy:

yum install rpm-build redhat-rpm-config gcc openssl openssl-devel

Add a user. It is essential that you NEVER build rpm’s as root.
[devel@hostname ~]$ useradd devel
[devel@hostname ~]$ password devel

Login as newly created devel user.

Add these to make build directory structure:
[devel@hostname ~]$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
[devel@hostname ~]$ echo ‘%_topdir %(echo $HOME)/rpmbuild’ > ~/.rpmmacros