From: DerelictMan on
Hi,

I searched the group and couldn't find the answer to this question.
Hopefully it's not too obvious.

I have an ancient installation of Cyrus (in the process of being
upgraded) paired with Sendmail 8.13.6 running on Linux. The version
of Cyrus I have doesn't support the socket map feature that would
allow Sendmail to verify deliverability of a particular address in
real time. Therefore, unless I take special precautions, Sendmail
will accept mail to any account at my domain, then attempt to relay it
to the local Cyrus delivery agent. If the account is over quota or
non-existent, a bounce message is generated, which very well result in
backscatter.

In an effort to avoid this, I have a perl script that generates a
virtusertable and copies it to several Sendmail instances I am running
(one on the mail exchanger, one of the outgoing SMTP server for my
users, etc.), and this contains a list of addresses that are
deliverable with a fall through that reports user unknown (I can
provide a sample of this file if it would help someone to answer my
question). So far so good.

However, I recently updated this script to have Sendmail return an
error for mail destined to an account that is over quota. For
example:

user(a)example.com error:tempfail "452 <%0>... Mailbox is full, please
try again later"

This also works well.

The problem is, when the user above (user(a)example.com) attempts to
SEND an email, he/she also receives the same error. It's somewhat
confusing for an end user to be told that they cannot send email to
another (typically local) account because their account is over
quota. I know the simple response to this is to tell the user to make
room in their account and then try again, but if possible I'd prefer
to not apply the virtusertable to the MAIL FROM address and only apply
it to the recipients. Part of the reason is to avoid that potentially
confusing error for the sender, and the other part is that there is a
delay between the user making space in the account and the
virtusertable being updated (5 minutes, but still).

Does anyone have any ideas or suggestions for how I could accomplish
this, or perhaps alternative approaches?

Thanks very much!
From: Andrzej Adam Filip on
DerelictMan <derelictman(a)gmail.com> wrote:
> I searched the group and couldn't find the answer to this question.
> Hopefully it's not too obvious.
>
> I have an ancient installation of Cyrus (in the process of being
> upgraded) paired with Sendmail 8.13.6 running on Linux. The version
> of Cyrus I have doesn't support the socket map feature that would
> allow Sendmail to verify deliverability of a particular address in
> real time. Therefore, unless I take special precautions, Sendmail
> will accept mail to any account at my domain, then attempt to relay it
> to the local Cyrus delivery agent. If the account is over quota or
> non-existent, a bounce message is generated, which very well result in
> backscatter.
>
> In an effort to avoid this, I have a perl script that generates a
> virtusertable and copies it to several Sendmail instances I am running
> (one on the mail exchanger, one of the outgoing SMTP server for my
> users, etc.), and this contains a list of addresses that are
> deliverable with a fall through that reports user unknown (I can
> provide a sample of this file if it would help someone to answer my
> question). So far so good.
>
> However, I recently updated this script to have Sendmail return an
> error for mail destined to an account that is over quota. For
> example:
>
> user(a)example.com error:tempfail "452 <%0>... Mailbox is full, please
> try again later"
>
> This also works well.
>
> The problem is, when the user above (user(a)example.com) attempts to
> SEND an email, he/she also receives the same error. It's somewhat
> confusing for an end user to be told that they cannot send email to
> another (typically local) account because their account is over
> quota. I know the simple response to this is to tell the user to make
> room in their account and then try again, but if possible I'd prefer
> to not apply the virtusertable to the MAIL FROM address and only apply
> it to the recipients. Part of the reason is to avoid that potentially
> confusing error for the sender, and the other part is that there is a
> delay between the user making space in the account and the
> virtusertable being updated (5 minutes, but still).
>
> Does anyone have any ideas or suggestions for how I could accomplish
> this, or perhaps alternative approaches?
>
> Thanks very much!

AFAIR you may try (ugly) "alias in the middle" approach.

virtusertable:
user(a)example.com error+over-quota
error+over-quota(a)example.com error:tempfail "452 Recipient mailbox is full, please try again later"

aliases:
error+over-quota: error+over-quota(a)example.com

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)onet.eu : Andrzej.Filip(a)gmail.com
http://open-sendmail.sourceforge.net/ http://anfi.homeunix.org/
I'd put my money where my mouth is, but my mouth keeps moving.
-- Larry Wall in <199704051723.JAA28035(a)wall.org>
From: DerelictMan on
On Jul 29, 2:01 pm, Andrzej Adam Filip <a...(a)onet.eu> wrote:
> AFAIR you may try (ugly) "alias in the middle" approach.
>
> virtusertable:
> u...(a)example.com  error+over-quota
> error+over-qu...(a)example.com error:tempfail "452 Recipient mailbox is full, please try again later"
>
> aliases:
> error+over-quota: error+over-qu...(a)example.com

Excellent, I will give that a try. Thanks for the suggestion...