Manually adding mailbox for sites not created with DA

payman

Verified User
Joined
Feb 21, 2006
Messages
12
Hi
I've been searching this forum for getting an answer but to no avail.
This is my problem:
I have a multisite setup which is a collection of subdomains and for each subdomain I have set multiple domains pointing to it. I did it by manually adding the required DNS zones and virtualhost sections in httpd.conf(with the neccessary redirect directives).
I now need to create mailboxes for those domains and I know I'll have to do it manually(e.g. adding /etc/virtual/mydomain/*, editing aliases, passwd...).
I've had an initial attempt but I got:
Could not connect: Got an unknown RCPT TO response: 550 authentication required
1.How does exim deliver emails to a specific mailbox and how can I manually create a mailbox and the corresponding email address?
2.Is there a perl script that can do this task?
Any pointers to what I can do is appreciated.
 
If the sites weren't created with DA then none of the infrastructure required by exim.conf are available for the site.

You'd have to create some new delivery methods in exim.conf and an infrastructure for exim to use.

Jeff
 
I solved the problem! :D
After reading the entire exim.conf and exim.pl thoroughly(!), I was able to figure out the mechanism of email delivery in exim and the required DA configuration.
For those who may have the same problem, here's the major steps I've taken:
1)add a new user to handle the email process
2)add "yourdomain" to "/etc/virtual/domains"
3)add "yourdomain: user" to "/etc/virtual/domainowners"
4)create "/etc/virtual/yourdomain folder with the files from one of the existing domains.(double check the permissions and owners!)
5)edit "/etc/virtual/yourdomain/passwd" file and add the desired alias and password hash
6)create "/var/spool/virtual/yourdomain" folder with the files from one of the existing domains.(double check the permissions and owners!)
-the files which are in "/var/spool/virtual/yourdomain" are the actual inboxes(e.g. if your email address is "youralias@yourdomain" you should have a "youralias" file here;remember:double check the permissions and owners!)
-check to see if it works via:
http://www.dnsreport.com/tools/mail.ch?domain=youralias@yourdomain
-also check to see if you can login via your email client.
Hope that's clear enough :p
Not sure if I have mentioned all the steps I've taken though, but in any case just try to imitate the settings of the other sites which were created using DA.
Cheers :)
 
Brilliant! This resolved the questions I had as well. Thanks for your work.

I created a little shell script to automate your steps for me. Some manual modifications might still be needed but it worked for me as is...


#!/bin/sh

# add email capability for subdomain in DA
# created 20060715; pmd

# subdomain you want to receive mail on
SUBDOMAIN=sub.domain.com

# existing site from which to copy email config files
TEMPLATE=domain.com

# domain owner/user
USER=username

echo $SUBDOMAIN >> /etc/virtual/domains
echo $SUBDOMAIN :$USER >> /etc/virtual/domainowners
mkdir /etc/virtual/$SUBDOMAIN
cp -v /etc/virtual/$TEMPLATE/* /etc/virtual/$SUBDOMAIN
chown -R mail.mail /etc/virtual/$SUBDOMAIN
chmod 711 /etc/virtual/$SUBDOMAIN
mkdir /var/spool/virtual/$SUBDOMAIN
chown $USER.mail /var/spool/virtual/$SUBDOMAIN
chmod 770 /var/spool/virtual/$SUBDOMAIN
 
Back
Top