Directadmin smtp limiter

Directadmin smtp limiter

Directadmin kontrol panelinizde, kullanıcılara günlük mail gönderim limti belirtmek için bu eklentiyi kurmamız gerekiyor,

Anlatım iyi derecede linux bilenler içindir, işleme başlamadan önce yedek almayı ihmal etmeyin;

Mevcut dosyaları yedekle

cp /etc/exim.conf /etc/exim.conf.smtp.once
cp /etc/exim.pl /etc/exim.pl.once

Yeşil renkte olanlar, yapmamız gereken düzenlemeleri ifade ediyor;

1)

acl_smtp_data = check_message
acl_not_smtp = check_not_smtp
acl_smtp_rcpt = check_recipient

2) begin acl
check_not_smtp:
deny set acl_c0 = ${perl{find_user}}
condition = ${if def:acl_c0{${if exists{/etc/virtual/.smtp_deny/$acl_c0} {yes}}}}
message = User $acl_c0 is not allowed to use SMTP

accept

3) accept  hosts = +auth_relay_hosts
endpass
message = authentication required
authenticated = *
set acl_c0 = ${perl{find_user}}

4) check_message:
deny condition = ${if def:acl_c0{${if exists{/etc/virtual/.smtp_deny/$acl_c0} {yes}}}}
message = User $acl_c0 is not allowed to use SMTP

5) begin routers
check_limits:
driver = redirect
domains = ! +local_domains
condition = ${if def:acl_c0{${if first_delivery{${perl{check_limits}{$acl_c0}}}}}}
allow_fail
data = “:fail: You ($acl_c0) have reached your message limit”

6) condition = “${perl{check_limits}}” bu satırın başına # işareti koyuyoruz
Bu şekilde olacak #condition = “${perl{check_limits}}”

7) accept  hosts = +relay_hosts
set acl_c0 = ${lookup{$sender_host_address}lsearch{/etc/virtual/pophosts_user}\
{${perl{find_user}{$value}}}}

8 ) Bu satırdaki # işareti varsa kaldır condition = ${if eq {}{${if exists{/etc/virtual/${domain}/passwd}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/passwd}}}}}{no}{yes}}

9) Bu satıra # işaretini ekle: #condition = ${perl{save_virtual_user}}

chmod 777 /etc/virtual/limit

cp -f /usr/local/directadmin/plugins/SMTP_Limiter/scripts/exim.pl /etc/exim.pl

/etc/init.d/exim restart

About the Author