[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Network Troublshooting  |  Linux Servers Support  |  Topic: Junk Mails Control
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: Junk Mails Control  (Read 292 times)
0 Members and 1 Guest are viewing this topic.
rajesh.bahl
Linux Learner
***
Offline Offline

Posts: 73


View Profile
« on: May 26, 2008, 03:24:42 AM »


Dear Experts,

Need your help in sorting out this issue:-

WE get lot of mails from different domains which are basically advertisements/promotions. The requirement is that these mails should get rejected at the server itself. We are using Postfix running on CentOS 4.6.
The configuration files are as follows:-

main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
default_privs = nobody
myhostname = xxxx.xxxxxx.net
mydomain = xxxxxx.net
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =    check_client_access
            hash:/etc/postfix/access
            permit_mynetworks
            reject_unauth_destination
            reject_non_fqdn_sender
            reject_unknown_sender_domain
            reject_unknown_recipient_domain
            check_helo_access
            pcre:/etc/postfix/helo_checks
            reject_unauth_pipelining
            permit
smtpd_soft_error_limit = 3
smtpd_hard_errors_limit = 6
smtpd_helo_restrictions = permit_mynetworks,
   reject_rbl_client  =   sbl.spamhaus.org
   reject_rbl_client  =   proxies.relays.monkeys.com
   reject_rbl_client  =   opm.blitzed.org
   reject_rbl_client  =   dnsbl.njabl.org
   reject_rbl_client  =   blackholes.wirehub.net
   reject_rbl_client  =   list.dsbl.org
mynetworks = 192.168.0.0/24, 127.0.0.0/8
append_at_myorigin = yes
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = $mydomain
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
always_bcc = backup@paceinfosys.net
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/mbl-body-deny
mime_header_checks = pcre:/etc/postfix/mime_header_checks
debug_peer_level = 2
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.2.10/samples
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
alias_database = hash:/etc/postfix/aliases
mailbox_size_limit = 1000000000
content_filter = smtp-amavis:[127.0.0.1]:10024
unknown_local_recipient_reject_code = 450
html_directory = no

master.cf

smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr     fifo  n       -       n       300     1        qmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
smtp-amavis   unix     -     -        y       -       2       smtp
   -o smtp_data_done_timeout=1200
   -o disable_dns_lookups=yes
127.0.0.1:10025 inet   n       -       n      -     -    smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject_unauth_destination
   -o mynetworks=127.0.0.0/8
   -o strict_rfc821_envelope=yes
   -o smtpd_error_sleep_time=0
   -o smtpd_soft_error_limit=1001
   -o smtpd_hard_error_limit=1000   
#   -o receive_override_options=no_header_body_checks
trace     unix   -   -   n   -   0   bounce
verify     unix   -   -   n   -   1   verify
anvil     unix   -   -   n   -   1   anvil
scache     unix   -   -   n   -   1   scache
discard     unix   -   -   n   -   -   discard
tlsmgr    unix  -       -       n       1000?   1       tlsmgr

Can we reject such mails coming from particular domains at the server itself so that these do not propagate into the network ?

rajesh.bahl
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
September 08, 2008, 02:32:07 AM

Login with username, password and session length
Navigation
Recent Discussions
[September 06, 2008, 08:31:28 PM]

[September 06, 2008, 08:55:12 AM]

[September 06, 2008, 08:52:26 AM]

[September 06, 2008, 08:35:40 AM]

[September 06, 2008, 08:20:19 AM]

[September 06, 2008, 08:17:39 AM]

[September 06, 2008, 08:17:19 AM]

[September 06, 2008, 08:12:49 AM]

[September 06, 2008, 08:09:07 AM]

[September 06, 2008, 08:08:26 AM]
Members
Total Members: 6004
Latest: piyush85
Stats
Total Posts: 8138
Total Topics: 2195
Online Today: 5
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 13
Total: 13
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc