# Relay Control Not Working help

## gunn187

I've been trying really hard to get the Relay control to work with vpopmail courier imap, and qmail, i emerged everything and follow the instructions very carefully. But it still doesn't work. I've did the following the the qmail-conf

# If you are interested in providing POP or IMAP before SMTP type relaying,

# emerge relay-ctrl, then uncomment the next 2 lines

QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"

QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"

# In /etc/courier-imap/authdaemonrc add the next line to the end:

#authmodulelist="${authmodulelist} relay-ctrl-allow"

# Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl}

# Add this at the end

#PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"

But when i send email out via pop or imap the system would return the domain name is not in the rcpthost. I've also did the part where it says to add the line in the authdaemonrc, imapd, imapd-ssl, pop3d, and pop3d-ssl.

If anyone got it to work, any help would be appreciated  Thanks.

----------

## fjenou

Hi,

I am having a similar problem.

Relay-ctrl works well with qmail-pop3d, but not with courier-imap.

I messed arround with /usr/lib/courier-imap/gentoo-imapd.rc (this file is read by /etc/init.d/courier-imapd), adding "envdir /etc/relay-ctrl relay-ctrl-chdir" manually before couriertcpd, but didn't work.

Also, according to Bruce Gunther, a symlink to /usr/bin/relay-ctrl-allow has to be made in /usr/lib/courier-imap/authlib.

Do you have any progress since your 1rst post?

Regards,

----------

## gunn187

uhuhLast edited by gunn187 on Thu Mar 25, 2004 8:43 am; edited 1 time in total

----------

## fjenou

Thanks!

----------

## irasnyd

Any more help with this?  I've been messing with it all day, and I cannot get relay-ctrl to write ip's to /var/spool/relay-ctrl/allow

Thanks.

----------

## fjenou

Hi,

You have to edit /usr/lib/courier-imap/gentoo-imapd.rc, and insert the following line (bottom of the script file):

eval $PRERUN \

/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \

   -stderrlogger=/usr/lib/courier-imap/courierlogger \

   -stderrloggername=imapd \

   -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \

   -pid=$PIDFILE $TCPDOPTS \

   $PORT ${exec_prefix)/sbin/imaplogin $LIBAUTHMODULES \

   /usr/bin/relay-ctrl-allow \    ---> add this line

        /usr/sbin/courier-imapd ${MAILDIR)

----------

## eltech

 *fjenou wrote:*   

> Hi,
> 
> You have to edit /usr/lib/courier-imap/gentoo-imapd.rc, and insert the following line (bottom of the script file):
> 
> eval $PRERUN \
> ...

 I dont have my setup working as of yet, but using your example, i get

/etc/init.d/courier-imapd restart

  [ ok ]ing courier-imapd...

 * Starting courier-imapd...

* PREAUTH Ready.

INFO: LOGIN, user=root, ip=[127.0.0.1], protocol=IMAP

  [ ok ]urier-IMAP server shut down by signal.

----------

## eltech

But this did work..

https://forums.gentoo.org/viewtopic.php?t=176827

----------

