Web Hosting Talk







View Full Version : Postfix configuration


tlsuess
01-01-2007, 10:24 PM
Hi,

My name is Todd, and I have a problem with some unknown spammers. Apparently from the log files, they connect to my SMTP server and use it as a proxy to send spam to people. I don't know their IP addresses since the logs say nothing about their IPs.

I was wondering how I can limit SMTP access to only webmail and not external use (i.e. someone can't use it in Outlook or Thunderbird)?

Here is my current Postfix configuration from main.cf:

#
# Postfix MTA Manager Main Configuration File;
#
# Please do NOT edit this file manually;
#

#
# Postfix directory settings; These are critical for normal Postfix MTA functionallity;
#

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

#
# Some common configuration parameters;
#

inet_interfaces = all
mynetworks_style = host

myhostname = xetaspace
mydomain = xetaspace.local
myorigin = $mydomain

smtpd_banner = $myhostname VHCS2 2.4 Spartacus Managed ESMTP 2.4.7.1
setgid_group = postdrop

#
# Receiving messages parameters;
#

mydestination = $myhostname, $mydomain
append_dot_mydomain = no
append_at_myorigin = yes
local_transport = local
virtual_transport = virtual
transport_maps = hash:/etc/postfix/vhcs2/transport

#
# Delivering local messages parameters;
#

mail_spool_directory = /var/mail
mailbox_size_limit = 0
mailbox_command = procmail -a "$EXTENSION"

biff = no

alias_database = hash:/etc/aliases

local_destination_recipient_limit = 1
local_recipient_maps = unix:passwd.byname $alias_database

#
# Delivering virtual messages parameters;
#

virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_limit = 0

virtual_mailbox_domains = hash:/etc/postfix/vhcs2/domains
virtual_mailbox_maps = hash:/etc/postfix/vhcs2/mailboxes

virtual_alias_maps = hash:/etc/postfix/vhcs2/aliases

virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:8

#
# SASL paramters;
#

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

smtpd_sasl_local_domain = vhcs.net

broken_sasl_auth_clients = yes

smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination

smtpd_reject_unlisted_sender = yes

smtpd_client_restrictions = permit_mynetworks, reject

smtpd_sender_restrictions = reject_unknown_sender_domain

unknown_local_recipient_reject_code = 450

Anything you can offer will help me greatly.

Thanks,
Todd