Patch vpopmail-check-user.sh untuk ezmlm

Buat yang memanfaatkan Magic-SMTPD sebagai replacement qmail-smtpd, musti tau dulu kl script vpopmail-check-user.sh yang dikasih belum support alias-alias yang dicreate sama EZMLM.

Setelah ngoprek2, berikut patch yang aku bikin untuk ngatasin ini:


#!/bin/sh

EMAIL=$1

if [[ `echo $EMAIL | egrep -c "\-subscribe|\-unsubscribe|\-owner|\-request|\-help|\-sc\.[0-9]|\-uc\.[0-9]"` -eq 1 ]]
then
USERE=`echo $EMAIL | cut -d'-' -f1`
DOMAINE=`echo $EMAIL | cut -d'@' -f2`
if [[ `/home/vpopmail/bin/valias "$USERE@$DOMAINE" | wc -l | grep 6 >/dev/null 2>&1 ; echo $?` -eq 0 ]]
then
MILISADD=0
else
MILISADD=1
fi
else
MILISADD=1
fi

ALIAS=`/home/vpopmail/bin/valias $EMAIL | wc -l | grep "1" >/dev/null 2>&1 ; echo $?`
USER=`/home/vpopmail/bin/vuserinfo $EMAIL >/dev/null 2>&1; echo $? | grep "0" >/dev/null 2>&1 ; echo $?`
MILIS=`/home/vpopmail/bin/valias $EMAIL | wc -l | grep 6 >/dev/null 2>&1 ; echo $?`

if [ $ALIAS -eq 0 ] || [ $USER -eq 0 ] || [ $MILIS -eq 0 ] || [ $MILISADD -eq 0 ]; then
exit 0
else
exit 1
fi

Semoga bermanfaat😉

One Comment Add yours

  1. KaiToU says:

    wedew…
    ampun om, Kai pusing ngeliatna😛
    BTW, ikutan detiknews juga, ya…?
    ihihi ;))

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