Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now mail to 'me' at either domain will be routed locally the same as always, that is, either through a redirection in 'aliases' or to a real user account.
Edit: The above assumes that the MX records for both domains point to this server...
Now mail to 'me' at either domain will be routed locally the same as always, that is, either through a redirection in 'aliases' or to a real user account.
Edit: The above assumes that the MX records for both domains point to this server...
Heya!
Thanks for responding.
I forgot one vital piece of information: I want the two accounts to go to different people (ie - me@onedomain.com to me and me@otherdomain.com to my wife).
On a high level I think I need to do something like recreate my 'me' account into two accounts: 'me@onedomain.com' and 'me@otherdomain.com' using the force-bad-name (or whatever it's called) on my mail server. Then somehow when mail comes in - exim (or something) has to parse out the domain part and then send it to the proper account.
now you need two alias files. /etc/mail/onedomain.com.aliases and /etc/mail/otherdomain.com.aliases.
Now me@onedomain.com will look at onedomain.com.aliases to resolve 'me', whilst me@otherdomain.com will look at otherdomain.com.aliases where presumably 'me' will be an alias to your wife's real address...
I am taking this strait out of the Exim book, but I have never tried this...good luck.
now you need two alias files. /etc/mail/onedomain.com.aliases and /etc/mail/otherdomain.com.aliases.
Now me@onedomain.com will look at onedomain.com.aliases to resolve 'me', whilst me@otherdomain.com will look at otherdomain.com.aliases where presumably 'me' will be an alias to your wife's real address...
I am taking this strait out of the Exim book, but I have never tried this...good luck.
Heya..
This sounds reasonable, but I'm not sure what the 'aliasfile' is supposed to be....is that an example? The word aliasfile itself creates an error when I try to restart the MTA.
Hey. Sorry, this is an old book, I think the alias driver is now called "redirect".
aliases are just a way to map email prefixes (local parts in exim terminology) to either a local account or another email address entirely. You almost certainly already have one in /etc/mail/aliases or perhaps just /etc/aliases.
The file looks like this:
Code:
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: root
postmaster: root
info bulliver
# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root
# Well-known aliases -- these should be filled in!
root: bulliver
What you can see here is that mail sent to adm@ or exim@ etc are actually mapped to 'root@' and root in turn is mapped to bulliver@ (which is my personal account to collect all system mail). This works for anything however, I also have:
in aliases so an email sent to any of the four above addresses will actually be sent to bulliver's mailbox.
You can also make an alias to an email account at a different domain ie:
Code:
darrenkirby: dkirby@some_other_domain.com
In your case, you need two alias files, one for each domain so that exim knows which mailbox to send each me@ mail to. Just a note: you need to run 'newaliases' after updating an alias file.
Again though...I have never actually set up something like you want, so I am just trying to point you in the right direction.
and I have a /etc/mail/mywifesdomain.com.aliases file with the single line me@mywifesdomain.com: kelly in it.
When I try to restart my MTA (after running /etc/exim4/update.exim4.conf.conf) I get the error that 'search_type' is not understood.
If I take that line out, the MTA will restart, but any mail to me@mywifesdomain.com just gets bounced with the error 'User unknown in virtual alias table'.
I was hoping that just a simple line in my /etc/aliases file reading 'me@mywifesdomain.com: kelly' would work, but alas no...
Any more ideas?
THanks!
Edit: I probably should mention that the mywifesdomain.com MX record already points to my machine and I get mail for her domain. That part is set up correctly. It's just that since she likes my 'me@mydomain.com' account so much that she's insisting on her own....groan.
Just one idea: The location of the alias files are a build-time configuration option for exim that cannot be changed, so if your current alias file lives in /etc then you will want to make the other one there too. Don't forget to change "file = /etc/mail/$domain.aliases" to "file = /etc/$domain.aliases
Another idea, is that perhaps exim strips the ".com" from the $domain variable, so try just mydomain.aliases instead of mydomain.com.aliases
This book is really giving me troubles. Philip Hazel obviously made a lot of non-backwards compatible changes between version 3 and 4, because what is in the book does not correspond to the current exim docs.
Originally posted by bulliver Just one idea: The location of the alias files are a build-time configuration option for exim that cannot be changed, so if your current alias file lives in /etc then you will want to make the other one there too. Don't forget to change "file = /etc/mail/$domain.aliases" to "file = /etc/$domain.aliases
Another idea, is that perhaps exim strips the ".com" from the $domain variable, so try just mydomain.aliases instead of mydomain.com.aliases
This book is really giving me troubles. Philip Hazel obviously made a lot of non-backwards compatible changes between version 3 and 4, because what is in the book does not correspond to the current exim docs.
Excellent ideas. I'll play with them tonight and post back my results.
Nothing works, I always get the email bounced back with the error 'User unknown in virtual alias table'
I've Googled it, but there's no quick answers out there. Obviously this seemingly simple thing is much more complicated than I thought.
It's driving me nuts though, I mean all I want to do is write a..what...a redirector? That will look at the whole email address 'me@mywifesdomain.com' and put it in the local mywifesname mailbox. Why is that so hard? Arrgh...
It's driving me nuts though, I mean all I want to do is write a..what...a redirector? That will look at the whole email address 'me@mywifesdomain.com' and put it in the local mywifesname mailbox. Why is that so hard? Arrgh...
Heh, it is easy... as long as you know what you're doing. Reading the docs it is quite clear that exim has many filtering tools including reg-exps to make what you want easy, but unfortunately I don't understand how to implement them, or how they work...so I cannot help.
Unfortunately I haven't had a play with exim yet so not sure if sites like this (http://www.tty1.net/virtual_domains_en.html) help. But for exactly what you want I usually use qmail with vpopmail etc etc and the easy way to install these I reckon is through the lazydog installer (http://lazyinstaller.net/) this project is just a shell script to grab all the installers you need and install them for ya the vpopmail handles multiple domains no problems at all. Using this though your username for checking mail will be username@mydomain.com not username but hey it is a small sacrifice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.