This commit is contained in:
parent
581fb3f814
commit
dc4e6632a2
|
@ -38,7 +38,7 @@ export const webServer = express()
|
||||||
.listen(8000);
|
.listen(8000);
|
||||||
|
|
||||||
export const emailServer = new SMTPServer({
|
export const emailServer = new SMTPServer({
|
||||||
authOptional: true,
|
disabledCommands: ["AUTH", "STARTTLS"],
|
||||||
async onData(stream, session, callback) {
|
async onData(stream, session, callback) {
|
||||||
const paths = session.envelope.rcptTo.flatMap(({ address }) => {
|
const paths = session.envelope.rcptTo.flatMap(({ address }) => {
|
||||||
const match = address.match(/^(\w+)@kill-the-newsletter.com$/);
|
const match = address.match(/^(\w+)@kill-the-newsletter.com$/);
|
||||||
|
@ -68,19 +68,7 @@ export const emailServer = new SMTPServer({
|
||||||
fs.writeFileSync(path, renderXML(xml));
|
fs.writeFileSync(path, renderXML(xml));
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
},
|
}
|
||||||
...(process.env.NODE_ENV === "production"
|
|
||||||
? {
|
|
||||||
key: fs.readFileSync(
|
|
||||||
"/etc/letsencrypt/live/kill-the-newsletter.com/privkey.pem",
|
|
||||||
"utf8"
|
|
||||||
),
|
|
||||||
cert: fs.readFileSync(
|
|
||||||
"/etc/letsencrypt/live/kill-the-newsletter.com/fullchain.pem",
|
|
||||||
"utf8"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
: {})
|
|
||||||
}).listen(process.env.NODE_ENV === "production" ? 25 : 2525);
|
}).listen(process.env.NODE_ENV === "production" ? 25 : 2525);
|
||||||
|
|
||||||
function Layout({ children }: { children: React.ReactNode }) {
|
function Layout({ children }: { children: React.ReactNode }) {
|
||||||
|
|
Loading…
Reference in New Issue