Export your mail table as some sort of delimited file. I would suggest
tab delimited. Write a perl script that opens the file, splits the line
into the various elements and then executes dbmail-user for each user.
Example:
#!/usr/bin/perl
open (INFILE, "<access.output.txt");
while (<INFILE>)
{
($username,$password,$email_address) = split($_, a'\"\,\"'); # $_ is
implied and I'm assuming a tab
delimited file
chomp; #get rid of leading and trailing whitespace and carriage returns
$username = s/\"//g;
$password = s/\"//g;
$email_address = s/\"//g; #gets rid of the rest of the quotation marks
system "dbmail-users -a username -g clientid -m maxmailboxsize -p
plaintext -w password -s [EMAIL PROTECTED] email_address_2 email_address_3
...";
# line above is wrapped. It should be one line.
}
Or something like that.
Curtis
April Lorenzen wrote:
I need to add about 800 users to dbmail and I have an MS Access mdb
with user, domain and password.
I am expecting to just do an SQL insert to dbmail_users table in
postgresql and then do an SQL insert to dbmail_aliases table, using
the user_idnr from dbmail_users as the deliver_to column in
dbmail_aliases.
I would like to use plain text as the encryption_type. Some existing
records have '' for encryption_type column in dbmail_users. Is this
the right way to represent plain text as the encryption_type choice?
I assume the client_idnr column of dbmail_users table is for the
"group" - and that I can set it to 1 for now.
Has anyone else done this type of mass user import, any tips or
warnings, something I'm not thinking of? I have not been able to find
related info in the archives or googling.
I have been using an early version of dbmail 2 for about 3 months on a
few domains. I upgraded to the latest 2.01 "testing" debian package
today and am ready to expand our usage of dbmail with the additional
users today.
Thank you,
- April
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail