Commit Diff
Diff:
75b10a97d867535b504a033da40e5b02f094b6a1
9f92fa89dcbfcaa96f613cdf7bc2bab17d7983c2
Commit:
9f92fa89dcbfcaa96f613cdf7bc2bab17d7983c2
Tree:
d1f9f5d3f07360efdcbed87972ada6a52d478f4e
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Mon Mar 6 23:38:25 2023 UTC
Message:
Fix file bug
blob - 5d5a9db275d3d99cbe9694f9b3c984762bdaad1a
blob + 9af51a5de3bea0958bed4cbf1367613ba0161815
--- Mail.pm
+++ Mail.pm
@@ -271,9 +271,9 @@ sub deletemail {
my @passwd = main::readarray($passwdpath);
my @virtuals = main::readarray($virtualspath);
my @senders = main::readarray($senderspath);
- @passwd = grep !/^${username}\@${hostname}/, @passwd;
- @virtuals = grep !/^${username}\@${hostname}/, @virtuals;
- @senders = grep !/^${username}\@${hostname}/, @senders;
+ @passwd = grep !/^${username}@${hostname}/, @passwd;
+ @virtuals = grep !/^${username}@${hostname}/, @virtuals;
+ @senders = grep !/^${username}@${hostname}/, @senders;
# trailing newline necessary
`doas touch $passwdpath.bak`;
@@ -282,9 +282,9 @@ sub deletemail {
`doas chmod g+w $passwdpath.bak $virtualspath.bak $senderspath.bak`;
main::writefile("$passwdpath.bak", join("\n", @passwd)."\n");
copy "${passwdpath}.bak", $passwdpath;
- main::writefile("$virtualspath", join("\n", @virtuals)."\n");
+ main::writefile("$virtualspath.bak", join("\n", @virtuals)."\n");
copy "${virtualspath}.bak", $virtualspath;
- main::writefile("$senderspath", join("\n", @senders)."\n");
+ main::writefile("$senderspath.bak", join("\n", @senders)."\n");
copy "${senderspath}.bak", $senderspath;
`doas rcctl restart smtpd`;
IRCNow