1
- $ NetBSD : patch-lib_Qmail_Deliverable. pm,v 1.1 2024 / 01 / 10 11 : 51 : 46 schmonz Exp $
1
+ $ NetBSD : patch-lib_Qmail_Deliverable. pm,v 1.2 2024 / 01 / 28 21 : 10 : 35 schmonz Exp $
2
2
3
3
Honor pkgsrc-specified QMAILDIR.
4
4
5
- -- - lib / Qmail/ Deliverable. pm. orig 2024 -01-10 11 : 42 : 48.671762270 +0000
5
+ -- - lib / Qmail/ Deliverable. pm. orig 2024 -01-27 19 : 55 : 05.000000000 +0000
6
6
++ + lib / Qmail/ Deliverable. pm
7
- @@ -66 ,21 +66 ,21 @@ sub reread_config {
8
- % virtualdomains = ();
9
- % users_exact = ();
10
- % users_wild = ();
11
- - my $ locals_fn = -e " /var/qmail/control/locals"
12
- - ? " /var/qmail/control/locals"
13
- - : " /var/qmail/control/me" ;
14
- + my $ locals_fn = -e " @ QMAILDIR @/control/locals"
15
- + ? " @ QMAILDIR @/control/locals"
16
- + : " @ QMAILDIR @/control/me" ;
17
- for (_slurp $ locals_fn ) {
18
- chomp ;
19
- ($ _ ) = lc =~ / $ ascii / or do { warn " Invalid character" ; next ; };
20
- $ locals {$ _ } = 1 ;
21
- }
22
- - for (_slurp " /var/qmail/control/virtualdomains" ) {
23
- + for (_slurp " @ QMAILDIR @/control/virtualdomains" ) {
24
- chomp ;
25
- ($ _ ) = lc =~ / $ ascii / or do { warn " Invalid character" ; next ; };
26
- my ($ domain , $ prepend ) = split /:/ , $ _ , 2 ;
27
- $ virtualdomains {$ domain } = $ prepend ;
28
- }
29
- - for (_slurp " /var/qmail/users/assign" ) {
30
- + for (_slurp " @ QMAILDIR @/users/assign" ) {
31
- chomp ;
32
- ($ _ ) = /$ ascii / or do { warn " Invalid character" ; next ; };
33
- if (s /^ =([^ :]+ ): // ) {
34
- @@ -98 ,7 +98 ,7 @@ sub reread_config {
7
+ @@ -9 ,7 +9 ,7 @@ our $ VERSION = ' 1.09' ;
8
+ our @ EXPORT_OK = qw / reread_config qmail_local dot_qmail deliverable qmail_user / ;
9
+ our % EXPORT_TAGS = (all => \@ EXPORT_OK );
10
+ our $ VPOPMAIL_EXT = 0 ;
11
+ -our $ qmail_dir = ' /var/qmail' ;
12
+ + our $ qmail_dir = ' @QMAILDIR@' ;
13
+
14
+ # rfc2822's "atext"
15
+ my $ atext = " [A-Za-z0-9!#\$%&\'*+\/=?^_\`{ | } ~-]" ;
16
+ @@ -101 ,7 +101 ,7 @@ sub reread_config {
35
17
sub _qmail_getpw {
36
18
my ($ local ) = @ _ ;
37
19
local $/ = " \0" ;
@@ -40,7 +22,7 @@ Honor pkgsrc-specified QMAILDIR.
40
22
chomp @ a ;
41
23
for (@ a ) {
42
24
($ _ ) = /$ ascii / or do { warn " Invalid character" ; return " " ; }
43
- @@ -361 ,16 +361 ,16 @@ returned. A single dot at the end is all
25
+ @@ -368 ,16 +368 ,16 @@ returned. A single dot at the end is all
44
26
Returns the local qmail user for $ address , or undef if the address is not local.
45
27
46
28
Returns $ address if it does not contain an @. Returns the left side of the @ if
@@ -60,7 +42,7 @@ Honor pkgsrc-specified QMAILDIR.
60
42
61
43
= item dot_qmail $address
62
44
63
- @@ -434 ,8 +434 ,8 @@ returned.
45
+ @@ -442 ,8 +442 ,8 @@ returned.
64
46
65
47
= item reread_config
66
48
@@ -71,7 +53,7 @@ Honor pkgsrc-specified QMAILDIR.
71
53
72
54
= back
73
55
74
- @@ -473 ,7 +473 ,7 @@ checks per second for assigned/ virtual u
56
+ @@ -481 ,7 +481 ,7 @@ checks per second for assigned/ virtual u
75
57
slower. For my needs, this is still plenty fast enough.
76
58
77
59
To support local users automatically, C<qmail-getpw > is executed for local
0 commit comments