Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81517 - QMAIL: Relaying is not working
Summary: QMAIL: Relaying is not working
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-10 10:25 UTC by Stonki
Modified: 2005-09-11 15:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stonki 2005-02-10 10:25:50 UTC
Hello,

I search the bug database and there are some problems similar to mine, but their solution doesnt work. 

Computer: AMD64, 2GB RAM

mail root # equery uses qmail
[ Found these USE variables for mail-mta/qmail-1.03-r15 ]
 + + ssl             : Adds support for Secure Socket Layer connections
 - - noauthcram      : If you do NOT want AUTHCRAM to be available
 + + notlsbeforeauth : If you do NOT want to require STARTTLS before offering 
 - - selinux   

mail root # equery uses relay-ctrl
[ No USE flags found for net-mail/relay-ctrl-3.1.1-r2]

I modified the files like explained:

1) conf-smtpd
QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"


2) courier files
root # grep relay /etc/courier-imap/pop3d
PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"

root # grep relay /etc/courier-imap/authdaemonrc
authmodulelist="authvchkpw relay-ctrl-allow"

3) I made sure, that the directory rights are ok:
root # ls -als /var/spool/relay-ctrl/
0 drwx--x--x  3 root root 30 Feb  9 22:26 .
0 drwxr-xr-x  8 root root 98 Feb  9 22:26 ..
0 drwxrwxrwt  2 root root  6 Feb  9 23:10 allow

4) I added to  /etc/env.d/99qmail:
RELAY_CTRL_DIR=/var/spool/relay-ctrl/allow


But relaying is not allowed after fetching some mails. (delivery to a local account works fine): "Sorry, the domain isn't in my list of allowed rcpthost..."

Any ideas left ?

I am not able to see any files created in "/var/spool/relay-ctrl/allow". I am also not sure, if the files are started the correct way. If I got the documentation correct, than the author is using a different order to start the programs: http://untroubled.org/relay-ctrl/






Reproducible: Always
Steps to Reproduce:
1.fetch Email
2.try send email to a non local address
3.

Actual Results:  
Relaying is blocked by qmail: "Sorry, the domain isn't in my list of allowed 
rcpthost..." 

Expected Results:  
accepting email to non local address 

Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3,  
glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r1 x86_64)  
=================================================================  
System uname: 2.6.9-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3000+  
Gentoo Base System version 1.4.16  
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  9 2005,  
23:17:04)]  
dev-lang/python:     2.3.4-r1  
sys-devel/autoconf:  2.13, 2.59-r6  
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4  
sys-devel/binutils:  2.15.92.0.2-r1  
sys-devel/libtool:   1.5.10-r4  
virtual/os-headers:  2.6.8.1-r2  
ACCEPT_KEYWORDS="amd64"  
AUTOCLEAN="yes"  
CFLAGS="-O2"  
CHOST="x86_64-pc-linux-gnu"  
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc"  
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"  
CXXFLAGS="-O2"  
DISTDIR="/usr/portage/distfiles"  
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"  
GENTOO_MIRRORS="http://distfiles.gentoo.org  
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"  
MAKEOPTS="-j2"  
PKGDIR="/usr/portage/packages"  
PORTAGE_TMPDIR="/var/tmp"  
PORTDIR="/usr/portage"  
SYNC="rsync://rsync.gentoo.org/gentoo-portage"  
USE="amd64 acpi alsa authdaemond berkdb bitmap-fonts crypt f77 font-server  
fortran gd gif gpm imagemagick imap jp2 jpeg libwww lzw lzw-tiff maildir  
multilib mysql ncurses nls opengl oss pam perl png python readline ssl tcpd  
tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xpm xrandr xv  
zlib"  
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY  
  
 
mail allow # ps aux | grep courier 
root      5336  0.0  0.0   3688   508 ?        S    06:01   
0:00 /usr/lib/courier-imap/courierlogger -pid=/var/run/authdaemon.pid 
-start /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5337  0.0  0.0   9400   720 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5386  0.0  0.0   9400   784 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5387  0.0  0.0   9400   784 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5388  0.0  0.0   9400   784 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5389  0.0  0.0   9400   784 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root      5390  0.0  0.0   9400   784 ?        S    06:01   
0:00 /usr/lib/courier-imap/authlib/authdaemond.plain 
root     26026  0.0  0.0   6704   696 ?        S    17:12   
0:00 /usr/lib/courier-imap/couriertcpd -address=0 
-stderrlogger=/usr/lib/courier-imap/courierlogger -stderrloggername=imapd 
-maxprocs=40 -maxperip=4 -pid=/var/run/imapd.pid -nodnslookup -noidentlookup 
143 /usr/sbin/imaplogin /usr/lib/courier-imap/authlib/authdaemon /usr/sbin/courier-imapd .maildir 
root     26028  0.0  0.0   3692   504 ?        S    17:12   
0:00 /usr/lib/courier-imap/courierlogger imapd 
root      5432  0.0  0.0   6704   696 ?        S    18:20   
0:00 /usr/lib/courier-imap/couriertcpd -address=0 
-stderrlogger=/usr/lib/courier-imap/courierlogger -stderrloggername=pop3d 
-maxprocs=40 -maxperip=4 -pid=/var/run/pop3d.pid -nodnslookup -noidentlookup 
110 /usr/sbin/pop3login /usr/lib/courier-imap/authlib/authdaemon /usr/sbin/courier-pop3d .maildir 
root      5434  0.0  0.0   3692   504 ?        S    18:20   
0:00 /usr/lib/courier-imap/courierlogger pop3d 
root      5568  0.0  0.0   4728   444 ?        S    18:24   
0:00 /usr/sbin/pop3login /usr/lib/courier-imap/authlib/authdaemon /usr/sbin/courier-pop3d .maildir 
root      5627  0.0  0.0   2524   556 pts/0    S+   18:25   0:00 grep courier 
mail allow # ps aux | grep qmail 
root      5084  0.0  0.0   3964   820 pts/3    S+   18:16   0:00 
less /var/qmail/control/conf-smtpd 
root      5305  0.0  0.0   2324   312 pts/0    S    18:20   0:00 supervise 
qmail-send 
qmails    5306  0.0  0.0   2504   412 pts/0    S    18:20   0:00 qmail-send 
qmaill    5308  0.0  0.0   2336   312 pts/0    S    18:20   
0:00 /usr/bin/multilog t s2500000 n10 /var/log/qmail/qmail-send 
root      5309  0.0  0.0   2324   312 pts/0    S    18:20   0:00 supervise 
qmail-smtpd 
root      5317  0.0  0.0   2460   376 pts/0    S    18:20   0:00 
qmail-lspawn ./.maildir/ 
qmailr    5318  0.0  0.0   2460   388 pts/0    S    18:20   0:00 qmail-rspawn 
qmailq    5319  0.0  0.0   2452   364 pts/0    S    18:20   0:00 qmail-clean 
qmaild    5320  0.0  0.0   6908   876 pts/0    S    18:20   
0:00 /usr/bin/tcpserver -p -v -R -x /etc/tcprules.d/tcp.qmail-smtp.cdb -c 40 
-u 201-g 200 0.0.0.0 25 relay-ctrl-check /var/qmail/bin/qmail-smtpd 
qmaill    5339  0.0  0.0   2336   312 pts/0    S    18:20   
0:00 /usr/bin/multilog t s2500000 n10 /var/log/qmail/qmail-smtpd 
root      5656  0.0  0.0   2524   556 pts/0    S+   18:25   0:00 grep qmail 
mail allow #
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-10 12:39:06 UTC
What version of courier-imap are you using?

courier-imap-4* upstream has broken compatability with relay-ctrl.
Comment 2 Stonki 2005-02-11 08:55:59 UTC
*  net-mail/courier-imap
      Latest version available: 3.0.8
      Latest version installed: 3.0.8
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-11 09:19:17 UTC
strange that files aren't created in /var/spool/relay-ctrl/allow.

The only thing I can think of is:
chmod 755 /var/spool/relay-ctrl/
(since it's 711 in your details there).

Put the PRERUN line in /etc/courier-imap/pop3d
and make sure to restart everything (right down to authdaemond)

then use telnet to try and login to POP3/IMAP manually
and look to see if the files in /var/spool/relay-ctrl/allow
are being created, or if you see anything in the logs.
Comment 4 Jory A. Pratt 2005-04-01 15:46:14 UTC
Robin there is a simple fix for this on the forums I need to get with ya on it seeing it is modifing a file of ours that has solved this issue in the past.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-04-01 15:54:10 UTC
jory: post a link to the forums item please.
Comment 6 Jory A. Pratt 2005-05-04 20:03:05 UTC
http://forums.gentoo.org/viewtopic-t-140319-highlight-relayctrl.html

fjenou
refer to comment listed there for fix
Comment 7 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-08-07 03:56:20 UTC
Isn't this a courier issue instead of a qmail issue?
Comment 8 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-09-11 15:16:26 UTC
No response from the reporter in more than seven months.