postfix makemap reminder

Nov 19, 2008 12:39

makemap dbm /etc/mail/aliases < /etc/mail/aliases

to recreate the mail.dir

postfix, makemap

Leave a comment

Comments 2

amaena November 19 2008, 17:48:34 UTC
NOTE: Strykar writes:

This is what works for me when placed in DocumentRoot:

root@host:/var/www/htdocs# cat .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^web_mail(.*) https://%{SERVER_NAME}/web_mail$1 [R,L]

A common mistake is to have a leading slash which is meant when this info is put in Apache's config file and not htaccess.

RewriteRule ^/web_mail(.*) https://%{SERVER_NAME}/web_mail$1 [R,L]

Readers, if you find mistakes in, or better solutions than, this howto, please email webmaster so I can post additions and corrections like this one. :)

Reply


amaena November 21 2008, 03:57:46 UTC
#!/usr/bin/perl
$domain = `cat ~/.lp_config/domain`;
chomp $domain;
$ip2=`cat ~/.lp_config/ip2`;
chomp $ip2;
$pass = `cat ~/.lp_config/mysql_pass`;
chomp $pass;
open d, "doms.txt" or die $!;
while() {
chomp $_;
`mysql -u root --password=$pass -e "insert into domains_data.records set name='$_',type='SOA',content='ns1.$domain ns2.$domain 1',ttl='86400';"`;
`mysql -u root --password=$pass -e "insert into domains_data.records set name='$_',type='NS',content='ns1.$domain',ttl='86400';"`;
`mysql -u root --password=$pass -e "insert into domains_data.records set name='$_',type='NS',content='ns2.$domain',ttl='86400';"`;
`mysql -u root --password=$pass -e "insert into domains_data.records set name='$_',type='A',content='$ip2',ttl='120';"`;
`mysql -u root --password=$pass -e "insert into domains_data.records set name='$_',type='MX',content='mail.$_',ttl='120';"`;
}
close d;

Reply


Leave a comment

Up