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
Line 1: Line 1:
== 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 ===
Line 18: Line 37:
     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");
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

Revision as of 02:07, 21 October 2013

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
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");

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