Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 19:49:59

Author Topic: Mail Problems again  (Read 12658 times)

0 Members and 1 Guest are viewing this topic.

Offline kennethwu

  • Junior Member
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Mail Problems again
« Reply #30 on: 2014-10-24, 13:35:53 »
i see two files one is qmail-remote and qmail-remote.orgin, after change the qmail-remote.orgin to qmail-remote, mail sending seems resume normal, i don't know why it happen

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Mail Problems again
« Reply #31 on: 2014-10-24, 13:45:58 »
Qmail-remote is bash file to add DKIM for qmail. This qmail-remote execute qmail-remote.orig.

So, rename qmail-remote.orig to qmail-remote make your qmail without DKIM feature.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kennethwu

  • Junior Member
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Mail Problems again
« Reply #32 on: 2014-10-24, 14:19:32 »
But if i do not rename it , the mail cannot send it out, below is my config for the qmail-remote that which cannot send out, is there have problems?

[root@smtp bin]# cat qmail-remote_bak
#!/bin/bash
# version 6
PATH=/bin:/usr/bin:/usr/local/bin
shopt -q -s extglob
host="$1"
sender="$2"
# First, figure out who the sending domain is:
[[ -z "$sender" && "$DEFAULTDOMAIN" ]] && sender="@$DEFAULTDOMAIN"
[ -z "$sender" ] && sender=@`hostname -f`
DOMAIN="${sender##*@}"
# Sanity-check the sender
if [[ $DOMAIN == !(+([a-zA-Z0-9\!\#$%*/?|^{}\`~&\'+=_.-])) ]] ; then
        # ' fix vim quote logic
        echo "DSender address contains illegal characters."
        exit 0
fi
# Now, fill in the basic variables (if they don't exist already)
[ "$DKREMOTE" ] || DKREMOTE="/var/qmail/bin/qmail-remote.orig"
[ "$DKSIGN" ]   || DKSIGN="/var/qmail/control/domainkeys/%/private"
# Now try and find the right subdomain, per RFC 4871
# (you can eliminate this loop if you don't want parent domains signing child
# domain's email)
if [ "$DOMAIN" ] ; then
        while [ ! -r "${DKSIGN//\%/$DOMAIN}" ] ; do
                # try parent domains, per RFC 4871, section 3.8
                DOMAIN=${DOMAIN#*.}
                DPARTS=( ${DOMAIN//./ } )
                [ ${#DPARTS
  • } -eq 1 ] && DOMAIN="${sender##*@}" && break

        done
fi
DKSIGN="${DKSIGN//\%/$DOMAIN}"
# Now that we have the correct DKSIGN value (i.e. the filename of the key to
# use to sign email), check to see if this file exists
if [ -r "$DKSIGN" ] ; then
        # The key does exist, so now use it to generate signatures!
        tmp=`mktemp -t dk.sign.XXXXXXXXXXXXXXXXXXX`
        tmp2=`mktemp -t dk2.sign.XXXXXXXXXXXXXXXXXXX`
        cat - >"$tmp"

        # compute the DomainKey signature
        error=`(dktest -s "$DKSIGN" -c nofws -h <"$tmp" | \
                sed 's/; d=.*;/; d='"$DOMAIN"';/' > "$tmp2") 2>&1`
        if [ "$error" ] ; then
                # Communicate the problem to qmail (that's why the 'Z')
                echo "ZDomainKey error: $error"
                rm "$tmp" "$tmp2"
                exit -1
        fi

        # compute the DKIM signature
        error=`(dkimsign.pl --type=dkim --selector=private --domain="$DOMAIN" \
                                --key="$DKSIGN" --method=relaxed <"$tmp" | \
                        tr -d '\r' >> "$tmp2") 2>&1`
        if [ "$error" ] ; then
                # Communicate the problem to qmail (that's why the 'Z')
                echo "ZDKIM error: $error"
                rm "$tmp" "$tmp2"
                exit -2
        fi

        # feed the signatures and the original message to the real qmail-remote
        # I'm combining to a third temp file to allow the file to be "rewound",
        # since some folks like that ability
        tmp3=`mktemp -t dk3.sign.XXXXXXXXXXXXXXXXXXX`
        cat "$tmp2" "$tmp" > "$tmp3"
        rm "$tmp" "$tmp2"
        "$DKREMOTE" "$@" < "$tmp3"
        retval=$?
        rm "$tmp3"
        exit $retval
else
        # No signature added
        exec "$DKREMOTE" "$@"
fi

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Mail Problems again
« Reply #33 on: 2014-10-24, 14:29:01 »
Make sure chmod for qmail-remote is 775.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kennethwu

  • Junior Member
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Mail Problems again
« Reply #34 on: 2014-10-24, 15:33:59 »
i have tried to chmod 755 for it before but still got the error, is the config file have problem?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Mail Problems again
« Reply #35 on: 2014-10-24, 15:45:41 »
I am not sure about this issue. If you prepare with your trick (rename qmail-remote.orig to qmail-remote), use it at this moment.

I will check this issue tomorrow.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kennethwu

  • Junior Member
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Mail Problems again
« Reply #36 on: 2014-10-24, 16:02:04 »
Thanks , should i also post my qmail-remote.org out for reference?

Offline kennethwu

  • Junior Member
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Mail Problems again
« Reply #37 on: 2014-10-26, 02:25:32 »
I am not sure about this issue. If you prepare with your trick (rename qmail-remote.orig to qmail-remote), use it at this moment.

I will check this issue tomorrow.

Hi there, any update for such issue?

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.026 seconds with 18 queries.

web stats analysis