Hi,

thanks for reply.

I tried using this script but qmail-inject just ignores exported
QMAILQUEUE and calls default qmail-queue

-------
#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
export QMAILQUEUE
exec /var/qmail/bin/qmail-inject-orig
-------
/var/qmail/bin# ls -l *inject
lrwxrwxrwx 1 root root 30 Jun 13 01:43 qmail-inject ->
/var/qmail/bin/qmail-inject.sh

if I try to wrap qmail-queue in bash script I get jus unable to exec
qq - inject fails this way if execv($QMAILQUEUE,0) fails, I tried
changing permisions permisions but still the same error.

I am thinking of hardcoding /var/qmail/bin/qmail-scanner-queue.pl into
qmail.c where is declared path to qeue (with QMAILQUEUE patch it
should first look for env. var)

2013/6/12, Salvatore Toribio <tori...@pusc.it>:
> Hi
>
> Maybe you can try doing in the same way of sqwebmail, sending the
> mails through a bash script that invokes qmail-inject, something like
> this:
>
> -----
> [root@fluffy-1 ~]# more /usr/sqwebmail/share/sqwebmail/sendit.sh
> #!/bin/sh
> #
> # sendit.sh for qmail-inject and qmail-scanner 20091221
> #
> #
>
> # $1 will contain the return (or bounce) address for this mailboxid, as
> # specified by auth.c
> #
> # $2 will contain the sqwebmail mailboxid of the sender (note that we're
> # executing under whatever id auth.c sets for this mailboxid).
> Furthermore,
> # $REMOTE_ADDR will contain the IP address where the client is coming from
> # (the rest of the CGI vars are available too).
> #
>
> QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
> export QMAILQUEUE
>
> # If you want to run spamassassin
> #QS_SPAMASSASSIN="on"
> #export QS_SPAMASSASSIN
>
> QMAILUSER="$1"
> export QMAILUSER
>
> exec /var/qmail/bin/qmail-inject -hf "$1"
> -----
>
> Probably you can ignore the variable QMAILUSER. It's a start...
>
> Regards
>
> ST
>
>
> At 14:05 +0100 12-06-2013, Jan Nekvapil wrote:
>>Hello guys,
>>new qmail admin here building server for demanding client.
>>
>>I need to run additional scans also on mails from my users, but those
>>are send by qmail-inject which is invoking the original qmail-queue.
>>Simply linking qmail-queue to qmail-scanner-queue.pl doesn't work
>>(even if its compiled using pp) as it fails with qq temporary problem
>>4.3.3. (in qmail-scanner-queue.pl I changed the invoked qmail-queue to
>>qmail-queue-orig to avoid looping)
>>
>>I know I will have to check injected mail for looping also because
>>qmail-scanner is using it for reports.
>>
>>I am not afraid to touch qmail-inject.c a little but I couldn't find
>>the qmail-queue in there yet.
>>(also I used qmailrocks.thibs.com to setup qmail on Debian 6 (still on
>>testserver so I can change to 7))
>>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Qmail-scanner-general mailing list
Qmail-scanner-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to