Re: courier-users Digest, Vol 217, Issue 10

Jerome Bullert <[email protected]> Sat, 13 Jul 2024 11:50:49 -0700
Newsgroups gmane.mail.imap.courier.general
Message-ID <[email protected]>
On 6/21/2024 5:32 AM, [email protected] wrote:
Andrew Athan writes:

 > « HTML content follows
 >
 > »Sorry to trouble the list with what may be a trivial question, but 
is there a quick way to support "plus addresses" in courier? E.g. 
<URL:mailto:[email protected]>[email protected] is a valid address means 
automatically that also 
<URL:mailto:foo%[email protected]>[email protected] is a valid 
address....

No, but "minus addresses" work the same way:

[email protected]

See the first couple of paragraphs of the DESCRIPTION in the dot-courier 
manual page.

Anyone recall if Qmail supported -extension before sendmail and postfix 
supported +extension? I believe so, Qmail was first.

---

Years ago I explored this as well because I missed this feature" from 
the old Netscape Mail Server. I read that the Netscape Mail Server got 
it from Sendmail, but I don't if there was an earlier source.

To enable plus addressing functionality, I created and implemented the 
following simple  bash script using Courier's authlib functionality. 
It's an executive bash script locate, in my installation, at:

f<code>


/home/courier/DynamicDeliveryInstructions/EasyAlias.authtest

#!/bin/sh

# If the LOCAL part of the address contains a "+",  strip LOCAL down to 
only the string
# the string before the plus, and return the resulting full address as 
the delivery target.

case $LOCAL in
*[+]*) userid=`echo $LOCAL | cut -d + -f 1`;
address=$userid@$HOST;
if (authtest $address > /dev/null 2>&1); then
echo "$address";
exit 0;
elif (authtest $userid > /dev/null 2>&1); then
echo "$userid";
exit 0;
else exit 67;
fi ;;
*) exit 67;;
esac

</code>

I don't know the security implications of running this as an authlib 
script, which is why I didn't submit it to the list previously. But I've 
since had  to move my critical email services to an off-site provider, 
so there's no longer any risk to me of sharing this script. I'll happily 
answer any questions that I can, though it seems pretty self-explanatory.

I hope this helps you or anyone else who wants to enable plus addressing.

-- 

-Jerome



_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users