On Thu, Jan 07, 1999 at 11:34:40PM -0600, Aijaz A. Ansari wrote:
...
> However, I cannot send mail from within MSOE to domain names that I do
> not host (specifically anyone at interaccess.com). I get the common
> `sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)'
...
>
> My questions are:
> 1) To do this, do I have to know in advance what the IP addresses for
> which I want to allow relaying are?
...
I got this to work.
To all of you who responded to me and helped me out, thanks.
The rest of this email is a description of how I got this to work (for
others who might have the same questions) as well as a question about
logging with qmail-pop3d.
1) Read David Harris' page on smtp-poplock (at
http://www.davideous.com/smtp-poplock/ ).
2) Download and install smtp-poplock.tar.gz.
3) There is a typo in the README file in the smtp-poplock
distribution:
The lines that contain the inetd.conf configuration have a typo:
the path should start with '/usr/src/smtp-poplock/' and not
'/usr/src/smtp-poploc/'. At two in the morning, it's easy to miss
that one :).
4) For some reason, I couldn't get qmail-pop3d to create log entries
in any of the log files in /var/logs. I wanted to use qmail-pop3d
so that I could use Maildir, but after trying in vain for a couple
of hours to find log entries upon succesful pop authorization, I
decided to use the copy of in.pop3d I had that went to ~/Mailbox.
QUESTION: If anyone knows how to generate log entries when
qmail-pop3d is being used, please let me know; I'd feel much more
comfortable using that instead of in.pop3d.
The in.pop3d I use generates log entries in /var/log/secure
5) Because the entries were logged to secure, I changed the entry in
/etc/syslog.conf from what Harris recommended to:
authpriv.* |/var/log/maillog-fifo
6) Due to the nature of the log files I had to change the 'next
unless' lines in /usr/src/smtp-poplock/readlog to:
next unless /in.pop3d/;
next unless /(\d+\.\d+.\d+.\d+)/;
7) Finally (and this took me FOREVER to figure out), the lines in
/usr/src/smtp-poplock/README that are supposed to go into
inetd.conf just didn't work for me; the relaylock program was never
being invoked. I'm running RedHat 5.2 and not RedHat 5.1, on which
Harris had tested this.
Through trial and error I realized that I had to insert tcpd as the
first program in the list of programs that get executed. So now,
my smtp line in inetd.conf looks like: [on one line]
smtp stream tcp nowait qmaild /usr/sbin/tcpd /var/qmail/bin/tcp-env
/usr/src/smtp-poplock/relaylock /var/qmail/bin/qmail-smtpd
I feel I learned a lot through this entire endeavor, and although I'm
no expert, I don't see why this kind of solution would not work for
Linux distributions other than Redhat. The main step is to find a
pop3 daemon that enters log entries upon successful authorization.
Again, I'd like to thank everyone who responded and also David Harris.
Sincerely,
Aijaz Ansari.