Insufficient permission

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Insufficient permission

Davide Davini
Hi,

I need some help to figure out this. I'm running a dovecot 2.2.29 server on FreeBSD 10.3-RELEASE-p17 and I'm using sendmail from system as the MTA.
This is how a call maildrop from sendmail:
FEATURE(`local_procmail', `/usr/local/bin/maildrop_wrapper', `maildrop_wrapper -d $u')dnl


maildrop_wrapper:
#!/usr/local/bin/bash

filename="maildrop_wrapper.log"

/usr/local/bin/maildrop $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 2>> /var/log/$filename >> /var/log/$filename

errors=$?
if [[ "$errors" != "0" ]]; then
        hour=`date "+%H:%M:%S"`
        echo $hour $errors $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 >> /var/log/$filename
else
        fetch fetch --ca-cert=/usr/local/etc/certs/trebi_ca.pem -T 15 -o - "https://www.trebigen.com/sendmail_mlhhyo5598ba6unz/sendmail.php?email=$2&user=$4" 2>> /dev/null >> /dev/null
fi
exit $errors

This is my problem: when a user reaches quota limit I park their incoming email in sendmail queue. Everything was working fine until recently. Now the emails stay parked for a while and then at some point hell breaks loose and I get "Insufficient permission" and the emails bounce back.
 
Logs:
Jun  5 14:07:45 odino sm-mta[54920]: v55C7jjq054920: from=[hidden email], size=122865, class=0, nrcpts=1, msgid=[hidden email], proto=ESMTPS, daemon=IPv4, relay=mx0.trebigen.com [10.99.99.99]
Jun  5 14:09:45 odino sm-mta[54923]: v55C7jjq054920: timeout waiting for input from local during Draining Input
Jun  5 14:12:45 odino sm-mta[54923]: v55C7jjq054920: to=davide, delay=00:05:00, xdelay=00:05:00, mailer=local, pri=153174, dsn=4.0.0, stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with EX_TEMPFAIL
Jun  5 14:21:48 odino sm-mta[59390]: v55C7jjq054920: timeout waiting for input from local during Draining Input
Jun  5 14:24:48 odino sm-mta[59390]: v55C7jjq054920: to=davide, delay=00:17:03, xdelay=00:05:01, mailer=local, pri=243174, dsn=4.0.0, stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with EX_TEMPFAIL
Jun  5 15:01:48 odino sm-mta[84763]: v55C7jjq054920: timeout waiting for input from local during Draining Input
Jun  5 15:04:48 odino sm-mta[84763]: v55C7jjq054920: to=davide, delay=00:57:03, xdelay=00:05:00, mailer=local, pri=333174, dsn=4.0.0, stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with EX_TEMPFAIL
Jun  5 15:14:50 odino sm-mta[9923]: v55C7jjq054920: to=davide, delay=01:07:05, xdelay=00:00:00, mailer=local, pri=423174, dsn=5.0.0, stat=Insufficient permission
Jun  5 15:14:50 odino sm-mta[9923]: v55C7jjq054920: v55DElBQ009923: DSN: Insufficient permission

I really don't know what the problem is. I'd really appreciate some help.

Ciao,
Davide


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Insufficient permission

Sam Varshavchik
Davide Davini writes:

> Hi,
>
> I need some help to figure out this. I'm running a dovecot 2.2.29 server on  
> FreeBSD 10.3-RELEASE-p17 and I'm using sendmail from system as the MTA.
> This is how a call maildrop from sendmail:
> FEATURE(`local_procmail', `/usr/local/bin/maildrop_wrapper',  
> `maildrop_wrapper -d $u')dnl
>
>
> maildrop_wrapper:
> #!/usr/local/bin/bash
>
> filename="maildrop_wrapper.log"
>
> /usr/local/bin/maildrop $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 2>> /var/log/$filename  
> >> /var/log/$filename
>
> errors=$?
> if [[ "$errors" != "0" ]]; then
>         hour=`date "+%H:%M:%S"`
>         echo $hour $errors $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 >> /var/log/
> $filename
> else
>         fetch fetch --ca-cert=/usr/local/etc/certs/trebi_ca.pem -T 15 -o -  
> <URL:https://www.trebigen.com/sendmail_mlhhyo5598ba6unz/sendmail.php?
> email=$2&amp;user=$4>"https://www.trebigen.com/sendmail_mlhhyo5598ba6unz/send 
> mail.php?email=$2&user=$4" 2>> /dev/null >> /dev/null
> fi
> exit $errors
>
> This is my problem: when a user reaches quota limit I park their incoming  
> email in sendmail queue. Everything was working fine until recently. Now the  
> emails stay parked for a while and then at some point hell breaks loose and I  
> get "Insufficient permission" and the emails bounce back.
>  
> Logs:
> Jun  5 14:07:45 odino sm-mta[54920]: v55C7jjq054920:  
> from=<URL:mailto:[hidden email]><[hidden email]>, size=122865,  
> class=0, nrcpts=1, msgid=<URL:mailto:
> [hidden email]><[hidden email]
> m>, proto=ESMTPS, daemon=IPv4, relay=mx0.trebigen.com [10.99.99.99]
> Jun  5 14:09:45 odino sm-mta[54923]: v55C7jjq054920: timeout waiting for  
> input from local during Draining Input
> Jun  5 14:12:45 odino sm-mta[54923]: v55C7jjq054920: to=davide,  
> delay=00:05:00, xdelay=00:05:00, mailer=local, pri=153174, dsn=4.0.0,  
> stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with  
> EX_TEMPFAIL
> Jun  5 14:21:48 odino sm-mta[59390]: v55C7jjq054920: timeout waiting for  
> input from local during Draining Input
> Jun  5 14:24:48 odino sm-mta[59390]: v55C7jjq054920: to=davide,  
> delay=00:17:03, xdelay=00:05:01, mailer=local, pri=243174, dsn=4.0.0,  
> stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with  
> EX_TEMPFAIL
> Jun  5 15:01:48 odino sm-mta[84763]: v55C7jjq054920: timeout waiting for  
> input from local during Draining Input
> Jun  5 15:04:48 odino sm-mta[84763]: v55C7jjq054920: to=davide,  
> delay=00:57:03, xdelay=00:05:00, mailer=local, pri=333174, dsn=4.0.0,  
> stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with  
> EX_TEMPFAIL
> Jun  5 15:14:50 odino sm-mta[9923]: v55C7jjq054920: to=davide,  
> delay=01:07:05, xdelay=00:00:00, mailer=local, pri=423174, dsn=5.0.0,  
> stat=Insufficient permission
> Jun  5 15:14:50 odino sm-mta[9923]: v55C7jjq054920: v55DElBQ009923: DSN:  
> Insufficient permission
>
> I really don't know what the problem is. I'd really appreciate some help.

"Insufficient permission" is the error message from your mail server, that's  
how it interprets the EX_TEMPFAIL exit code from maildrop.

You will need to look at maildrop's own generated logs to identify the  
original cause of the delivery failure.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Insufficient permission

Davide Davini
On 05/06/2017 18:16, Sam Varshavchik wrote:
> "Insufficient permission" is the error message from your mail server,
> that's how it interprets the EX_TEMPFAIL exit code from maildrop.
> You will need to look at maildrop's own generated logs to identify the
> original cause of the delivery failure.

When I have the "Insufficient permission" error, the exit code is not 75
but 77. I didn't check at before, sorry.

Provided I want the emails to stay parked in the queue no matter what
happens, does it make sense to force the exit code of the wrapper to 75?
Is sendmail going to interpret that always as a tempfail? I would say
yes, but I maybe I'm missing something important here.

As for the logs, I'll look at the documentation and gather some to show you.

Thanks,
Davide





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Insufficient permission

Sam Varshavchik
Davide Davini writes:

> On 05/06/2017 18:16, Sam Varshavchik wrote:
> > "Insufficient permission" is the error message from your mail server,
> > that's how it interprets the EX_TEMPFAIL exit code from maildrop.
> > You will need to look at maildrop's own generated logs to identify the
> > original cause of the delivery failure.
>
> When I have the "Insufficient permission" error, the exit code is not 75
> but 77. I didn't check at before, sorry.

This was recorded in your logs:

> Jun  5 14:24:48 odino sm-mta[59390]: v55C7jjq054920: to=davide,
> delay=00:17:03, xdelay=00:05:01, mailer=local, pri=243174, dsn=4.0.0,
> stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited with
> EX_TEMPFAIL

> Provided I want the emails to stay parked in the queue no matter what
> happens, does it make sense to force the exit code of the wrapper to 75?
> Is sendmail going to interpret that always as a tempfail? I would say
> yes, but I maybe I'm missing something important here.

sendmail will continue to defer the mail until it expires. I don't recall  
sendmail's default expiration setting, it's probably a week after which  
point it will bounce.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Insufficient permission

Davide Davini
On 06/06/2017 18:18, Sam Varshavchik wrote:

> Davide Davini writes:
>
>> On 05/06/2017 18:16, Sam Varshavchik wrote:
>> > "Insufficient permission" is the error message from your mail server,
>> > that's how it interprets the EX_TEMPFAIL exit code from maildrop.
>> > You will need to look at maildrop's own generated logs to identify the
>> > original cause of the delivery failure.
>>
>> When I have the "Insufficient permission" error, the exit code is not 75
>> but 77. I didn't check at before, sorry.
>
> This was recorded in your logs:
>
>> Jun  5 14:24:48 odino sm-mta[59390]: v55C7jjq054920: to=davide,
>> delay=00:17:03, xdelay=00:05:01, mailer=local, pri=243174, dsn=4.0.0,
>> stat=Deferred: local mailer (/usr/local/bin/maildrop_wrapper) exited
>> with
>> EX_TEMPFAIL
Yes, it is. I probably didn't explain myself correctly. I'll try again:
It tempfails several times and then at some point it hards fails. Like so:
14:26:00 75 -f <email redacted> -d davide -f0
maildrop: Timeout quota exceeded.
14:29:48 75 -f <email redacted> -d davide -f0
maildrop: Timeout quota exceeded.
14:34:49 75 -f <email redacted> -d davide -f0
maildrop: Timeout quota exceeded.
14:37:12 75 -f <email redacted> -d davide -f0
maildrop: Timeout quota exceeded.
15:14:47 77 -f <email redacted> -d davide -f0

>
>> Provided I want the emails to stay parked in the queue no matter what
>> happens, does it make sense to force the exit code of the wrapper to 75?
>> Is sendmail going to interpret that always as a tempfail? I would say
>> yes, but I maybe I'm missing something important here.
>
> sendmail will continue to defer the mail until it expires. I don't
> recall sendmail's default expiration setting, it's probably a week
> after which point it will bounce.

That was not my question. :)

I know that, it's set to stay in queue for several months. My question
was more is sendmail trusting just the exit code? I'm testing it now
anyway. I'll find out. :)

Thanks again,
Davide




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

signature.asc (188 bytes) Download Attachment
Loading...