Ad Code

Bug Ugrade Debian Etch ke Debian Lenny untuk Email Server Postfix

Jumat (13 Maret 2009) kemaren aku sempatkan mengupgrade Email Server dari Debian Etch ke Debian Lenny (tutorialnya bisa dilihat di web teman goodle saya di http://www.zulfanruri.com ). Intinya ubah source list nya ke repositori debian lenny kemudian :

mailserver:/# apt-key updatemailserver:/# apt-get upgrademailserver:/# apt-get dist-upgrade

Waktu itu tidak begitu bermasalah, hanya sekadar error sedikit saat perintah apt-get update. Berikut ini errornya

......Hit http://security.debian.org lenny/updates/contrib SourcesFetched 2B in 10s (0B/s)Reading package lists... DoneW: There is no public key available for the following key IDs:4D270D06F42584E6W: You may want to run apt-get update to correct these problems

Solusinya cukup mudah, berikut ini :

mailserver:/# apt-get install debian-keyring debian-archive-keyringmailserver:/# apt-key update

Kemarin pagi (16/3/09) ada laporan email tidak bisa menerima. Setelah saya cek ternyata benar, email hanya bisa dilihat data lamanya tetapi tidak bisa untuk mengirim dan menerima. Troblenya berikut ini :

mailserver:/# /etc/init.d/amavis restartStarting amavisd: Found incompatible config file flag!Due to safety concerns, amavisd-new will not be started.

Solusinya rename (not copy) file /etc/amavis/amavisd.conf.disabled menjadi /etc/amavis/amavisd.conf.
Error nya lagi

...Clam Antivirus-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory)...

Maka edit file /etc/amavis/amavisd.conf. Uncomment spt berikut

# ### http://www.clamav.net/ ['ClamAV-clamd',   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],   qr/\bOK$/, qr/\bFOUND$/,   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],# # NOTE: the easiest is to run clamd under the same user as amavisd; match the# # socket name (LocalSocket) in clamav.conf to the socket name in this entry# # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/],

Di file /etc/clamav/clamd.conf jika isinya sbb

LocalSocket /var/run/clamav/clamd

Ubah menjadi

LocalSocket /var/run/clamav/clamd.ctl

Dan install clamav-daemon.

mailserver:/# apt-get install clamav-daemon

Pastikan di file /etc/postfix/master.cf masih ada konfigurai berikut :

smtp-amavis unix - - n - 2 smtp   -o smtp_data_done_timeout=1200   -o smtp_send_xforward_command=yes127.0.0.1:10025 inet n - n - - smtpd   -o content_filter=   -o local_recipient_maps=   -o relay_recipient_maps=   -o smtpd_restriction_classes=   -o smtpd_client_restrictions=   -o smtpd_helo_restrictions=   -o smtpd_sender_restrictions=   -o smtpd_recipient_restrictions=permit_mynetworks,reject   -o mynetworks=127.0.0.0/8   -o strict_rfc821_envelopes=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

Dan pastikan di /etc/postfix/main.cf masih ada konfigurasi sbb

content_filter = smtp-amavis:[127.0.0.1]:10024max_use=10receive_override_options = no_address_mappings

Jika ada error sbb

amavis[11715]: (11715-09) (!!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Permission denied) at (eval 86) line 309

Solusinya masukan amavis ke dalam group clamav, dan pastikan group clamav memiliki permision read-write (rw) file /var/run/clamav/clamd.ctl.

mailserver:/# gpasswd -a amavis clamavmailserver:/# ls -l  /var/run/clamav/clamd.ctl

Dan juga pastikan di file /etc/clamav/clamd.conf ada konfigurasi sbb

AllowSupplementaryGroups true

Jika ada eror

spamc[21165]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#1 of 3): Connection refused

Kemudian spamassassin dijalankan ada eror berikut

mailserver:/# /etc/init.d/spamassassin startSpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin

Maka itu berarti file /etc/default/spamassassin diganti konfigurasi yang baru saat upgrade, buka dan edit ENABLED=0 menjadi ENABLED=1
Kemudian start kembali spamassassin

mailserver:/# /etc/init.d/spamassassin start

Jika sudah restart aplikasi clamav, amavis, spamassassin dan juga postfixnya, atau kalau anda malas reboot aja komputernya.

mailserver:/#/etc/init.d/clamav-freshclam restartmailserver:/#/etc/init.d/clamav-daemon startmailserver:/#/etc/init.d/amavis restartmailserver:/# /etc/init.d/spamassassin restartmailserver:/#/etc/init.d/postfix restart

Selesai !!!

Close Menu