Mandriva : Install ClamSMTP di Postfix


oke langsung aja…

download paket clamsmtp di
http://memberwebs.com/nielsen/software/clamsmtp/

#wget http://memberwebs.com/nielsen/software/clamsmtp/clamsmtp-1.6.tar.gz

ekstrak

#tar xzpf clamsmtp-1.6.tar.gz

konfigurasi awal

# CFLAGS=”-O3 -march=i686 -mcpu=i686 \
-funroll-loops -fomit-frame-pointer” \
./configure \
–sysconfdir=/etc \
–bindir=/usr/bin \
–sbindir=/usr/sbin \
–mandir=/usr/share/man

trus compile
#make
#make check
#make install
#strip /usr/sbin/clamsmtpd

copy konfigurasi clamsmtp ke /etc
#cp doc/clamsmtpd.conf /etc/

kemudian edit untuk menyesuaikan dengan sistem yang sudah ada
#vim /etc/clamsmtpd.conf
OutAddress: 10026
Listen: 127.0.0.1:10025

#disesuaikan dengan soket clamav
ClamAddress: /var/lib/clamav/clamd.socket
Header: X-Virus-Scanned: ClamAV using ClamSMTP
TempDirectory: /tmp
Quarantine: on #defaultnya off
User: clamav

cek clamsmtpd
#clamsmtpd -d 4
clamsmtpd: read config file: /etc/clamsmtpd.conf
clamsmtpd: parsed option: OutAddress: 10026
clamsmtpd: parsed option: Listen: 127.0.0.1:10025
clamsmtpd: parsed option: ClamAddress: /var/lib/clamav/clamd.socket
clamsmtpd: parsed option: Header: X-Virus-Scanned: ClamAV using ClamSMTP
clamsmtpd: parsed option: TempDirectory: /tmp
clamsmtpd: parsed option: Quarantine: on
clamsmtpd: parsed option: User: clamav
clamsmtpd: starting up (1.6)…
clamsmtpd: switched to user clamav (uid 86, gid 86)
clamsmtpd: created socket: 127.0.0.1:10025

oke clamsmtpd beres alias bisa digunakan di mandriva kita🙂

sekarang step selanjutnya ubah konfigurasi si Postfix
main.cf dan master.cf

#vim /etc/postfix/main.cf
pada bagian bawah sendiri tambahkan baris berikut ini
content_filter = scan:127.0.0.1:10025
#receive_override_options = no_address_mappings
#ini saya komen soale suka deferred, alias imel gak bisa di proses dan gak nyampe

dan

#vim /etc/postfix/master.cf
tambahkan juga pada baris paling akhir
scan unix – – n – 16 smtp
-o smtp_send_xforward_command=yes

127.0.0.1:10026 inet n – n – 16 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8

selesai…

restart si Postfix
#service postfix restart

hasilnya jika udah konek clamsmtpd nya

clamsmtpd: created thread for connection
clamsmtpd: 100000: processing 4 on thread b7e81bb0
clamsmtpd: 100000: accepted connection from: 127.0.0.1
clamsmtpd: 100000: SERVER connected to: 127.0.0.1
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: intercepting initial response
clamsmtpd: 100000: CLIENT > 220 smtp.passthru
clamsmtpd: 100000: CLIENT
clamsmtpd: 100000: SERVER > EHLO hujan.semusim.info
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: intercepting host response
clamsmtpd: 100000: CLIENT > 250-smtp.passthru
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: filtered ESMTP feature: PIPELINING
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: CLIENT > 250-SIZE 10240000
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: CLIENT > 250-VRFY
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: CLIENT > 250-ETRN
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: CLIENT > 250-XFORWARD NAME ADDR PROTO HELO SOURCE
clamsmtpd: 100000: SERVER
clamsmtpd: 100000: CLIENT > 250 8BITMIME
clamsmtpd: 100000: CLIENT
clamsmtpd: 100000: SERVER > XFORWARD NAME=n12b.bullet.scd.yahoo.com ADDR=209.73.160.79

cek juga log nya di /var/log/main/info
Feb 16 09:46:46 kampes postfix/smtpd[17528]: 067182514FF: client=server23.client.org[67.19.121.26]
Feb 16 09:46:48 kampes postfix/cleanup[17529]: 067182514FF: message-id=
Feb 16 09:46:48 kampes postfix/qmgr[16257]: 067182514FF: from=, size=4954, nrcpt=1 (queue active)
Feb 16 09:46:48 kampes postfix/smtpd[17528]: disconnect from server23.client.org[67.19.121.26]
Feb 16 09:46:48 kampes clamsmtpd: 100001: accepted connection from: 127.0.0.1
Feb 16 09:46:48 kampes postfix/smtpd[17532]: connect from semusim.info[127.0.0.1]
Feb 16 09:46:48 kampes postfix/smtpd[17532]: 55A881BDE1F: client=server23.client.org[67.19.121.26]
Feb 16 09:46:48 kampes postfix/cleanup[17529]: 55A881BDE1F: message-id=
Feb 16 09:46:48 kampes postfix/qmgr[16257]: 55A881BDE1F: from=, size=5180, nrcpt=1 (queue active)
Feb 16 09:46:48 kampes clamsmtpd: 100001: from=tanya-jawab-return-37247-box=semusim.info@linux.or.id, to=box@semusim.info, status=CLEAN
Feb 16 09:46:48 kampes postfix/smtp[17530]: 067182514FF: to=, relay=127.0.0.1[127.0.0.1], delay=61, status=sent (250 Ok: queued as 55A881BDE1F)
Feb 16 09:46:48 kampes postfix/smtpd[17532]: disconnect from semusim.info[127.0.0.1]
Feb 16 09:46:48 kampes postfix/qmgr[16257]: 067182514FF: removed
Feb 16 09:46:48 kampes postfix/local[17534]: 55A881BDE1F: to=, relay=local, delay=0, status=sent (delivered to mailbox)

sukses deh :))
Wednesday February 15, 2006 – 06:47pm (PST) Edit | Delete | 0 Comments | Permanent Link
Good Bye Amavisd-New + Spamassasin
akhirnya…..
gara² terinfeksi virus clamsmtpd dari milis
jadi juga mo ngegusur si Amavisd-New ma si SpamAssassin….
padahal udah beberapa kali install sesuai petunjuk yang di dapet dari google
dengan keyword “install clamsmtp”
dan alasan mengapa harus ganti … semuanya ada di google :))

last step untuk blog edisi ini :))

# urpme amavisd-new

removing amavisd-new-2.3.2-5mdk.noarch
warning: /etc/amavisd/amavisd.conf saved as /etc/amavisd/amavisd.conf.rpmsave

urpme spamassassin-spamd-3.1.0-1mdk.i586 spamassassin-3.1.0-1mdk.i586

removing spamassassin-3.1.0-1mdk.i586 spamassassin-spamd-3.1.0-1mdk.i586
warning: /etc/mail/spamassassin/local.cf saved as /etc/mail/spamassassin/local.cf.rpmsave

oke sekarang beres…

One comment

  1. Bisa info ke saya cara setting postfix hanya untuk smtp relay?bisa bantu?
    saya isikan sbb di main.cf
    # User configurable parameters

    inet_interfaces = localhost
    mynetworks_style = host
    delay_warning_time = 4h
    smtpd_banner = $myhostname ESMTP $mail_name
    ($mail_version) (Mandriva Linux)
    unknown_local_recipient_reject_code = 450
    smtp-filter_destination_concurrency_limit = 2
    lmtp-filter_destination_concurrency_limit = 2
    smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
    relayhost=smtp.telkom.net.id
    mynetworks=192.168.0.0/24,127.0.0.0/8
    myhostname=routerint

    setelah di reload postfixnya, di Outlook tidak bisa
    send mail, kalo dicek tail -f /var/log/mail/errors
    muncul pesan sbb :

    Feb 21 09:49:25 routerint postfix/smtpd[6392]: fatal:
    open database /etc/postfix/aliases.db: No such file or
    directory

    apa konfigurasi di main.cf saya sudah benar?ada yang
    bisa bantu?

    trim’s
    Cyd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: