Operations grimoire/Legacy archive/Mail server notes: Difference between revisions
From Nasqueron Agora
(Created page with "== Utilities == === qmail-autoresponder === If invoked from vpopmail instead vmailmgr, it doesn't contain From: header. ; /usr/ports/mail/qmail-autoresponder/files/patch-main...") |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div style="background-color: #939599; border: solid 3px #F7E10E; color: white; font-size: large; padding: 2em;"> | |||
This document is historical. We adopted Dovecot, Postfix and ViMbAdmin for mail server. | |||
</div> | |||
== IMAP and POP servers == | |||
=== courier-authlib === | |||
To use courier-authlib against vpopmail MySQL authentication: | |||
;/usr/local/etc/authlib/authmysqlrc | |||
MYSQL_SERVER localhost | |||
MYSQL_USERNAME ... | |||
MYSQL_PASSWORD ... | |||
MYSQL_PORT 0 | |||
MYSQL_OPT 0 | |||
MYSQL_DATABASE vpopmail | |||
MYSQL_USER_TABLE vpopmail | |||
MYSQL_CRYPT_PWFIELD pw_passwd | |||
MYSQL_UID_FIELD 1189 | |||
MYSQL_GID_FIELD 1189 | |||
MYSQL_LOGIN_FIELD CONCAT(pw_name, '@', pw_domain) | |||
MYSQL_HOME_FIELD pw_dir | |||
MYSQL_NAME_FIELD pw_gecos | |||
== Utilities == | == Utilities == | ||
=== qmail-autoresponder === | === qmail-autoresponder === | ||
If invoked from vpopmail instead vmailmgr, it doesn't contain From: header. | If invoked from vpopmail instead vmailmgr, it doesn't contain From: header. | ||
; /usr/ports/mail/qmail-autoresponder/files/patch-main.c | ; /usr/ports/mail/qmail-autoresponder/files/patch-main.c — Autoresponder used only error-way (e.g. catchall) | ||
diff --git main.c main.c | diff --git main.c main.c | ||
index ba1a0b9..5de20cc 100644 | index ba1a0b9..5de20cc 100644 | ||
Line 18: | Line 41: | ||
if(opt_subject_prefix) | if(opt_subject_prefix) | ||
obuf_put4s(out, "Subject: ", opt_subject_prefix, subject.s, "\n"); | obuf_put4s(out, "Subject: ", opt_subject_prefix, subject.s, "\n"); | ||
; /usr/ports/mail/qmail-autoresponder/files/patch-main.c — Target account used as From: | |||
(patch to write) | |||
Installation tips: | |||
; To grant minimal privileges to a qmailresponder MySQL account: | |||
GRANT SELECT,DELETE,INSERT ON vpopmail.response TO 'qmailresponder'@'localhost' IDENTIFIED BY '...'; | |||
GRANT SELECT ON vpopmail.autoresponder TO 'qmailresponder'@'localhost'; | |||
; Add to my.cnf: | |||
[qmail-autoresponder] | |||
# Public account to see the currently set responders. | |||
user=qmailresponder | |||
password=... | |||
database=vpopmail | |||
[[Category:Notes|Mail server notes]] | |||
[[Category:Mail|Legacy archive/Mail server notes]] | |||
[[Category:Operations grimoire|Mail server notes]] | |||
[[Category:Legacy documentation|Mail server notes]] |
Latest revision as of 21:56, 24 October 2024
This document is historical. We adopted Dovecot, Postfix and ViMbAdmin for mail server.
IMAP and POP servers
courier-authlib
To use courier-authlib against vpopmail MySQL authentication:
- /usr/local/etc/authlib/authmysqlrc
MYSQL_SERVER localhost MYSQL_USERNAME ... MYSQL_PASSWORD ... MYSQL_PORT 0 MYSQL_OPT 0 MYSQL_DATABASE vpopmail MYSQL_USER_TABLE vpopmail MYSQL_CRYPT_PWFIELD pw_passwd MYSQL_UID_FIELD 1189 MYSQL_GID_FIELD 1189 MYSQL_LOGIN_FIELD CONCAT(pw_name, '@', pw_domain) MYSQL_HOME_FIELD pw_dir MYSQL_NAME_FIELD pw_gecos
Utilities
qmail-autoresponder
If invoked from vpopmail instead vmailmgr, it doesn't contain From: header.
- /usr/ports/mail/qmail-autoresponder/files/patch-main.c — Autoresponder used only error-way (e.g. catchall)
diff --git main.c main.c index ba1a0b9..5de20cc 100644 --- main.c +++ main.c @@ -475,6 +475,9 @@ int main(int argc, char* argv[]) out = &bufout; } + //TODO: create a mailer-daemon@domain.tld finder + //For example: read /var/qmail/control/me, and prepend by mailer-daemon@ + obuf_put3s(out, "From: Mail Delivery Subsystem <mailer-daemon@", "grip.espace-win.org", ">\n"); obuf_put3s(out, "To: <", sender, ">\n"); if(opt_subject_prefix) obuf_put4s(out, "Subject: ", opt_subject_prefix, subject.s, "\n");
- /usr/ports/mail/qmail-autoresponder/files/patch-main.c — Target account used as From
(patch to write)
Installation tips:
- To grant minimal privileges to a qmailresponder MySQL account
GRANT SELECT,DELETE,INSERT ON vpopmail.response TO 'qmailresponder'@'localhost' IDENTIFIED BY '...'; GRANT SELECT ON vpopmail.autoresponder TO 'qmailresponder'@'localhost';
- Add to my.cnf
[qmail-autoresponder] # Public account to see the currently set responders. user=qmailresponder password=... database=vpopmail