Sponsored Content
Special Forums UNIX and Linux Applications SMTP traffic filter on FreeBSD 7.0 gateway Post 302286038 by matagou on Tuesday 10th of February 2009 07:19:06 AM
Old 02-10-2009
SMTP traffic filter on FreeBSD 7.0 gateway

Hello,

I have a question about ways to filter smtp traffic that passes from LAN through FreeBSD 7.0 machine (configured with NAT and gateway="yes" in /etc/rc.conf) to the Internet.

I've installed both SpamAssassin and ClamAv, and now need the software that would listen to port 25 on private IP address. I think it would be something like Squid Web proxy

I have read about smtp-gated, assp, but i think that this software is for use with configured mail server and not for my purpose

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Smtp

Hi All, I am running an email server on a Linux machine. My goal is to set up in a way that I can use pop3 to retrieve mail from a Windows machine using Outlook. Now I can download the messages from the Linux email server, however I can not send out messages. I encounter this error: ... (1 Reply)
Discussion started by: vtran4270
1 Replies

2. Programming

C Smtp

how do you send a ".\n" in a smtp client? >354 Send message, end with <CRLF>.<CRLF> >. > i have already issued a "./n" but it doesnt work. please help. thanks. (1 Reply)
Discussion started by: grotesque
1 Replies

3. IP Networking

Configure router to allow smtp traffic

Hello all, I have installed ubuntu hardy and for some testing I have configured sendmail on it. I have a router facing the internet and I am having hard time configuring the router to allow traffic on port 25 to my server. I have a BCM96338 ADSL Router. I have set iptable rules to allow the... (0 Replies)
Discussion started by: h3llh0l3
0 Replies

4. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

5. UNIX for Dummies Questions & Answers

Smtp

Hi All, I have a unix box which is in a network with windows machine, I am able to send the mails to the user id's with in the unix box. I dont have Internet connection for this box, so I am not able to test if it can send mails to external network or not? I want to know, if SMTP is already... (1 Reply)
Discussion started by: balu_puttaganti
1 Replies

6. Linux

GNUGK-How to setup static gateway to gateway routing

Dear Sir I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper. I am having a problem, configuring static call routing on GNUGK in the section ... (0 Replies)
Discussion started by: mfondoum
0 Replies

7. IP Networking

Divert DNS traffic to another gateway

hello all, i have a local bind9 dns server running on debian. its default gateway is 10.0.0.x. This internet gateway has limited bandwidth. we have another high speed internet connection(adsl) and the gateway to access this connection is 10.0.0.y. all users in the office are using... (2 Replies)
Discussion started by: coolatt
2 Replies

8. IP Networking

Dividing traffic with u32 iptables filter

I would like to divide traffic between two squid servers. I have been thinking about using iptables u32 filter, to check last bit of ip address which is comming to gateway. Then I would like to direct even IP adresses to one squid host, and odd to the other. Is it reasonable ? Thank you for... (2 Replies)
Discussion started by: new_item
2 Replies

9. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

10. UNIX for Beginners Questions & Answers

Inconsistency between RedHat 6.5 global gateway and single gateway leads to loss of default gateway

Dear friends I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies
clamsmtpd(8)						    BSD System Manager's Manual 					      clamsmtpd(8)

NAME
clamsmtpd -- an SMTP server for scanning viruses via clamd SYNOPSIS
clamsmtpd [-d level] [-f configfile] [-p pidfile] clamsmtpd -v DESCRIPTION
clamsmtpd is an SMTP filter that allows you to check for viruses using the ClamAV anti-virus software. It accepts SMTP connections and for- wards the SMTP commands and responses to another SMTP server. The DATA email body is intercepted and scanned before forwarding. By default email with viruses are dropped silently and logged without any additional action taken. clamsmtpd aims to be lightweight and simple rather than have a myriad of options. The options it does have are configured by editing the clamsmtpd.conf(5) file. See the man page for clamsmtpd.conf(5) for more info on the default location of the configuration file. OPTIONS
Previous versions had more options. These still work for now but have equivalents in clamsmtpd.conf(5) and are not documented here. The options are as follows. -d Don't detach from the console and run as a daemon. In addition the level argument specifies what level of error messages to dis- play. 0 being the least, 4 the most. -f configfile specifies an alternate location for the clamsmtpd configuration file. See clamsmtpd.conf(5) for more details on where the configuration file is located by default. -p pidfile specifies a location for the a process id file to be written to. This file contains the process id of clamsmtpd and can be used to stop the daemon. -v Prints the clamsmtp version number and exits. LOGGING
clamsmtpd logs to syslogd by default under the 'mail' facility. You can also output logs to the console using the -d option. LOOPBACK FEATURE
In some cases it's advantageous to consolidate the virus scanning and filtering for several mail servers on one machine. clamsmtpd allows this by providing a loopback feature to connect back to the IP that an SMTP connection comes in from. To use this feature specify only a port number (no IP address) for the OutAddress setting in the configuration file. This will cause clamsmtpd to pass the email back to the said port on the incoming IP address. Make sure the MaxConnections setting is set high enough to handle the mail from all the servers without refusing connections. TRANSPARENT PROXY FEATURE
A transparent proxy is a configuration on a gateway that routes certain types of traffic through a proxy server without any changes on the client computers. clamsmtpd has support for transparent proxying of SMTP traffic by enabling the TransparentProxy setting. This type of set- up usually involves firewall rules which redirect traffic to clamsmtpd and the setup varies from OS to OS. The SMTP traffic will be forwarded to it's original destination after being scanned. When doing transparent proxying for outgoing email it's probably a good idea to turn on bounce notifications using the Action: bounce set- ting. Also note that some features (such as SSL/TLS) will not be available when going through the transparent proxy. Make sure that the MaxConnections setting is set high enough for your transparent proxying. Because clamsmtpd is not being used as a filter inside a queue, which usually throttles the amount of email going through, this setting may need to be higher than usual. VIRUS ACTIONS
Using the VirusAction option you can run a script or program whenever a virus is found. This may be handy in certain circumstances but it has several drawbacks. For one, the performance of the virus filtering will take a hit, perhaps DOS'ing your machine under heavy load. Secondly as with running any program there are security implications to be considered. Please consider the above carefully before implementing a virus action. The script is run without its output being logged, or return value being checked. Because of this you should test it thoroughly. Make sure it runs without problems under the user that clamsmtpd(8) is being run as. Various environment variables will be present when your script is run. You may need to escape them properly before use in your favorite scripting language. Failure to do this could lead to a REMOTE COMPROMISE of your machine. CLIENT The network address of the SMTP client connected. EMAIL When the Quarantine option is enabled, this specifies the file that the virus was saved to. RECIPIENTS The email addresses of the email recipients. These are specified one per line, in standard address format. REMOTE If clamsmtpd is being used to filter email between SMTP servers, then this is the IP address of the original client. In order for this information to be present (a) the SMTP client (sending server) must an send an XFORWARD command and (b) the SMTP server (receiving server) must accept that XFORWARD command without error. REMOTE_HELO If clamsmtpd is being used to filter email between SMTP servers, then this is the HELO/EHLO banner of the original client. In order for this information to be present (a) the SMTP client (sending server) must an send an XFORWARD command and (b) the SMTP server (receiving server) must accept that XFORWARD command without error. SENDER The email address for the sender of the email. SERVER The network address of the SMTP server we're connected to. TMPDIR The path to the temp directory in use. This is the same as the TempDirectory option. VIRUS The name of the virus found. SECURITY
There's no reason to run this daemon as root. It is meant as a filter and should listen on a high TCP port. It's probably a good idea to run it using the same user as the clamd(8) daemon. This way the temporary files it writes are accessible to clamd(8) Care should be taken with the directory that clamsmtpd writes its temporary files to. In order to be secure, it should not be a world write- able location. Specify the directory using the TempDirectory setting. When using the VirusAction option make sure you understand the security issues involved. Unescaped environment variables can lead to execu- tion of arbitrary shell commands on your machine. If running clamsmtpd on a publicly accessible IP address or without a firewall please be sure to understand all the possible security issues. This is especially true if the loopback feature is used (see above). SEE ALSO
clamsmtpd.conf(5) clamd(8), clamdscan(1) AUTHOR
Stef Walter <stef@memberwebs.com> clamsmtp June 1, 2019 clamsmtp
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy