Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

qmail attachments problem

Status
Not open for further replies.

mirco73

Programmer
Feb 5, 2003
8
0
0
IT
Hi everybody !
I've got a problem with Qmail, sending emails with attachments.
It seems that if I send an email with an attachment to a user of my domain it is delivered without problems, while if the dest. does not belong to my domain, the email is never delivered.
I've not got problems whith messages without attachments.
 
Actually I almost solved the problem because I realized
that the firewall configured on the same machine caused the problem. I had do disable the firewall and it worked fine, but I still wonder what rule can let me send attachment or not.
 
You're right !
here is the script I run to configure the firewall :

iptables -t filter -A INPUT -p icmp -i eth1 -j DROP
iptables -t filter -A INPUT -p icmp -i eth0 -j ACCEPT

iptables -A INPUT -p tcp -i eth1 --destination-port 22 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 53 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 25 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 110 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 3128 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 6000 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 6400 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 13568 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 28160 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 28416 -j DROP
iptables -A INPUT -p tcp -i eth1 --destination-port 32768 -j DROP

iptables -A INPUT -p tcp -i eth1 -j ACCEPT
iptables -A INPUT -p udp -i eth1 -j ACCEPT

iptables -A INPUT -p tcp -i eth0 -j ACCEPT
iptables -A INPUT -p udp -i eth0 -j ACCEPT


echo " FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG

echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

When I realized the the outgoing mail did not work properly
I made a
iptables -F
and it started to work fine, but the firewall was disabled.
 
I still can't comment -- I don't know what all you are using your machine for.

Your rules seem to allow everything except a small set of ports. I recommend you set the default action to DROP and allow only those ports you need. Keeping, of course, the rules for maintaining existing connections, etc. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top