Email Migration

From Gruff Goat Wiki
Jump to: navigation, search

Add on New Server

Vpopmail

This add virtual domains and users to the email server.

  • Add domain
 vadddomain domain.com postmaster_password
  • Add users
 vadduser user@domain.com user_password

Qmailadmin

  • Login from GoGoat
  • Set aliases using New Forward

Majordomo to Ezmlm

  • Login from GoGoat
  • Click New Mailing List
    • or Mailing Lists (to manage already created lists)
  • Enter the required information in the form
  • Now time to move subscriber lists.
    • Seems to be problems with ezmlm.cgi
    • Attempt from command line
  • Some shell commands for ezmlm
 ezmlm-sub /usr/local/vpopmail/domains/dom_name/list_name user@address   # Subscribe
 ezmlm-unsub /usr/local/vpopmail/domains/dom_name/list_name user@address # Unsubscribe
 ezmlm-list /usr/local/vpopmail/domains/dom_name/list_name               # List subscribers
  • Create shell script that read address from file and processes them through the subscribe command.
  • Initially process this in a text editor. Since I have less than 1000 total subscribers, decided not to write script. Maybe later.

Update Subscription Forms on Website

Web subscription forms currently send requests to majordomo@domain.com. Then the command is included in the body of the message. This needs to be changed to send an email to listname-subscribe-user=usersdomain.com@domain.com or listname-unsubscribe-user=usersdomain.com@domain.com

Original code snippet

 $mailto="majordomo@domain.org";
 
 switch ($maillist){
   case "advocacy":
     $word = "*****";
       break;
   case "meetings":
     $word = ""*****";
       break;
 }
 
 mail($mailto, $subject,
 "
 approve $word $action $maillist $email
 end
 -Automated message
 ");

New code snippet

 $repemail= str_replace("@", "=", $email);
 
 $mailto=$maillist ."-". $action ."-". $repemail ."@domain.org";
 
 mail($mailto, $subject, "");

Adjust Sendmail on Original Server

Virtual Users Table

The original server uses Sendmail with virtusertable. Manually delete the moved domains from this file to prevent erroneous email delivery.

 cd /etc/mail
 makemap hash virtusertable < virtusertable

Local Host Names

Sendmail uses the file /etc/mail/local-host-names to determine other doamins it may accept mail from. Manually delete all migrated domains from this file


References


--Gary 15:38, 11 Aug 2005 (CDT)