Re: tcp.smtp and qmail-smtpd/run script question

Philip Rhoades <[email protected]> Mon, 04 Jun 2018 15:18:53 +1000
Newsgroups gmane.mail.qmail.general
Message-ID <[email protected]>
Charles,


On 2018-06-04 13:00, Charles Cazabon wrote:
> Philip Rhoades <[email protected]> wrote:
>> 
>>   /usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
>>     -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
>>     -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
>>     /usr/local/bin/spamdyke -f /etc/spamdyke.conf \
>>     /var/qmail/bin/qmail-smtpd 2> /var/log/spamdyke.log
>> 
>> Now spamdyke is not allowing mail to be relayed from local machines -
>> physical, virtual and Docker containers.
>> 
>> I am wondering if there is some scripting magic for this run file 
>> which will
>> cause the ip addresses that are allowed to relay (ie the ones which 
>> appear
>> in tcp.smtp) to be skipped by the spamdyke check somehow? - some sort 
>> of "if
>> then / else / fi" thing?
> 
> Sure.  Write your own shellscript wrapper around spamdyke that 
> basically
> checks whether RELAYCLIENT is set; if so, it skips invoking spamdyke 
> and just
> executes the rest of the command line.
> 
> Then call that shellscript in place of spamdyke in the above command.


Just what I wanted!  Thanks for that - actually I worked out a quick and 
dirty way too - I ran another copy of tcpserver without spamdyke but 
using port 2525 instead.  Tt works when testing with telnet and swaks 
(simulating the relay clients) but there is yet still a another problem 
with my Discourse Docker container talking to the host which I have to 
chase up in another forum . .

Regards,

Phil.
-- 
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  [email protected]