mail@subdomain to mail@domain

koudou

Verified User
Joined
Oct 13, 2003
Messages
54
This is an old story, but I am looking for a solution where (exemple)

[email protected] is going to [email protected]

Sounds easy, but not so obvious :
-> secure.beltsa.com is my hostname
I cannot add an alias to secure.beltsa.com because, as soon as I create an alias file in /var/spool/virtual/secure.beltsa.com/ then main accounts of other domains do not go anymore to the domains but to hostname.
-> I have tried to send an email to [email protected] : no problem with exim, but the email simply goes in a place I cannot get it (where is another question ...)
2006-01-29 22:42:05 1F3KJA-0001Ng-Vt <= [email protected] H=green.mynethost.com [64.207.205.53] P=esmtps X=TLSv1:AES256-SHA:256 S=744 [email protected] T="azerty" from <[email protected]> for [email protected]
2006-01-29 22:42:05 1F3KJA-0001Ng-Vt => sympa <[email protected]> F=<[email protected]> R=localuser T=local_delivery S=918
2006-01-29 22:42:05 1F3KJA-0001Ng-Vt Completed

->Even if I have no [email protected], exim say it is ok for [email protected]

So, back to my question : how to have [email protected] going to [email protected] where secure.beltsa.com is the hostname and beltsa.com an installed domain ?

Any suggestion ? (I've tried all around with DNS, cnames etc...)

Michel Lo
 
Try changing your hostname. To me the seems awfully related to the note in the installation guide:

Important: The hostname should not be the same as the primary domain name. e.g. gary.com is not a good hostname, where server.gary.com is. Having the same host/main domain name will cause e-mail and FTP problems. Also, please make sure the hostname resolves once you setup DNS.
http://www.directadmin.com/installguide.html
 
Your subject is really misleading; Your example doesn't involve a subdomain. It involves a hostname.

A subdomain and a hostname look similar, so it's easy to be confused.

Now on to the fix....

Do I have to give away all my secrets :p ?

First chmod the /etc/virtual/<hostname> directory 711, and chown it mail:mail.

Then create in the /etc/virtual/<hostname> directory a file named aliases, chmod 600, chown mail:mail.

Then add these contents:
Code:
abuse: admin
hostmaster: admin
postmaster: admin
webmaster: admin
root: admin
bin: admin
daemon: admin
nobody: admin
ftp: admin
operator: admin
uucp: admin
admin: [email][email protected][/email]
where of course you replace [email protected] with a valid address.

Then add other aliases as you require; for example:
Code:
sympa: [email][email protected][/email]
Since we do the install when we build the server I'm not sure if you'll need to restart exim or not; it won't hurt:.

Note: This works for me. If it doesn't work for you, you can delete it and restart exim.

Jeff
 
Back
Top