Operations grimoire/Legacy archive/Mail server notes: Difference between revisions

From Nasqueron Agora
No edit summary
No edit summary
 
(4 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 ==
== IMAP and POP servers ==
=== courier-authlib ===
=== courier-authlib ===
Line 22: Line 26:
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 38: Line 42:
       obuf_put4s(out, "Subject: ", opt_subject_prefix, subject.s, "\n");
       obuf_put4s(out, "Subject: ", opt_subject_prefix, subject.s, "\n");


To grant minimal privileges to a qmailresponder MySQL account:
; /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,DELETE,INSERT ON vpopmail.response TO 'qmailresponder'@'localhost' IDENTIFIED BY '...';
  GRANT SELECT ON vpopmail.autoresponder TO 'qmailresponder'@'localhost';
  GRANT SELECT ON vpopmail.autoresponder TO 'qmailresponder'@'localhost';


Add to my.cnf:
; Add to my.cnf:
  [qmail-autoresponder]
  [qmail-autoresponder]
  # Public account to see the currently set responders.
  # Public account to see the currently set responders.
Line 49: Line 58:
  database=vpopmail
  database=vpopmail


[[Category:Notes]]
[[Category:Notes|Mail server notes]]
[[Category:Server administration]]
[[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