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

Charles Cazabon <[email protected]> Sun, 3 Jun 2018 21:00:34 -0600
Newsgroups gmane.mail.qmail.general
Message-ID <[email protected]>
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.

Charles
-- 
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at:                  http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------