| Linode Forum https://forum.linode.com/ |
|
| What do I need to forward, and only forward? https://forum.linode.com/viewtopic.php?f=11&t=1502 |
Page 1 of 1 |
| Author: | lpfavreau [ Sun Feb 27, 2005 5:03 pm ] |
| Post subject: | What do I need to forward, and only forward? |
Hi everyone, I'm running Debian Sarge and I want to create aliases for the emails sent @mydomain.net. I'm new to the mail server thing and I don't know where to start. What I know is:
So, could someone help me out, at least to give me a hint of what kind of setup I should try? Thanks! |
|
| Author: | Xan [ Sun Feb 27, 2005 5:12 pm ] |
| Post subject: | |
I really like Exim4, and as it's the default in Sarge anyway I recommend you stick with it. I've set up pretty much exactly what you're talking about. In /etc/exim4/conf.d/router, I created a file called 160_local_virtual_users containing: Code: virtual_users: Suppose your domain is mydomain.com. All you have to do now is create a file /etc/aliases-domains/mydomain.com containing: Code: *: myreal@address.com That'll send all mail coming in to that domain (assuming you've already told exim you'll accept mail for that domain) to your other address. |
|
| Author: | Xan [ Sun Feb 27, 2005 5:16 pm ] |
| Post subject: | |
Oh, and as far as handling specific addresses, in /etc/aliases-domain/mydomain.com : Code: user1: user1@otherplace.com |
|
| Author: | Xan [ Sun Feb 27, 2005 5:19 pm ] |
| Post subject: | |
Should have read all your questions before starting this... In order to receive mail from the outside, your Linode will need to be able to accept new connections on port 25. When it forwards mail someplace else, it will connect to the other machine's port 25. So your firewall rules must allow unsolicited inbound connections on port 25, and new connections to be created outgoing to port 25. |
|
| Author: | lpfavreau [ Sun Feb 27, 2005 5:21 pm ] |
| Post subject: | Wow! |
Wow thanks Xan for all the answers and the speed! I'm trying this out this evening and I'll give some news about the results. |
|
| Author: | lpfavreau [ Sun Feb 27, 2005 7:17 pm ] |
| Post subject: | Configuration |
Is there something else to do? It doesn't work. Here's what I did to configure the whole thing.
Here's what I did for debugging:
So, it seems my firewall is setup correctly, that the exim4 server is running and can receive email to relay but that it disapears in it. Maybe it is not relayed or maybe it doesn't know where to relay it (bad configuration?). I've found a message telling me to add a line in the main configuration but I'm not sure to understand: Quote: * put this into /etc/exim4/conf.d/router/160_local_virtual_users
* add a "domainlist virtual_domains = ..." to conf.d/main/ I feel a bit lost, I'm not sure what I should do next to pinpoint my problem. Any clues? Thanks again for your time! |
|
| Author: | lpfavreau [ Sun Feb 27, 2005 9:03 pm ] |
| Post subject: | Update |
Ok, I did receive the emails in my Linux account (when I type mail) so they are not forwarded to my other@domain.net. I guess there's a problem with my config. Any clue to why it is not working? |
|
| Author: | Xan [ Sun Feb 27, 2005 11:28 pm ] |
| Post subject: | |
hmm... Did you run update-exim4.conf and restart Exim after making config file changes? That's what makes Exim 4 assimilate changes. |
|
| Author: | lpfavreau [ Mon Feb 28, 2005 12:00 am ] |
| Post subject: | Not yet... |
I can now receive mail but only if:
Also, altought I did an update-exim4.conf and restarted exim, the aliases are not refreshed every time. I'm not sure to understand. |
|
| Author: | Xan [ Mon Feb 28, 2005 12:22 am ] |
| Post subject: | |
You say you've made two aliases: user1@mydomain.net and admin@mydomain.net. Just to double-check: inside the file /etc/aliases-domains/mydomain.net, they're just known as user1 and admin. So it should look like: Code: user1: someplace@else.net Is that what you have? |
|
| Author: | lpfavreau [ Mon Feb 28, 2005 12:37 am ] |
| Post subject: | Something like that... |
I exactly have in /etc/aliases-domains/mydomain.net: Code: user1: user1@elsewhere.com mydomain.net being my linode. elsewhere.com is another domain. user1 being an account on my linode. admin is *not* an account. Is that okay? |
|
| Author: | Xan [ Mon Feb 28, 2005 12:53 am ] |
| Post subject: | |
I just tried exactly that alias file, and it worked exactly as expected. I went through all the Exim config files to find the ones that I'd modified, and the only one that would remotely relate to what we're doing was 400_exim4-config_system_aliases. I'm not sure what I even changed, or if it relates, but it now reads: Code: system_aliases: Other than that, I'm not sure what to tell you... |
|
| Author: | lpfavreau [ Mon Feb 28, 2005 2:06 am ] |
| Post subject: | |
I've got the same thing in 400_exim4-config_system_aliases, seems to be the default configuration. And normally, if I read correctly, the email shouln't reach this file, it should be routed with our 160_ file. I'll try to find something else, I'll post it here if I'm successful. Thanks a lot for your time Xan. It was really helpful! |
|
| Author: | Xan [ Mon Feb 28, 2005 2:18 am ] |
| Post subject: | |
Sorry it didn't go more smoothly... It's probably something stupid we're both overlooking. If I think of it at 4 in the morning I'll post here. |
|
| Author: | gregg [ Thu Apr 05, 2007 12:41 am ] |
| Post subject: | |
i'm probably not going to be of too much help here, but i would like to say i just used the above mentioned virtual_users router and it worked just fine for me. and to say thanks so much for that bit of info. since i wanted some mail to fall through and be delivered locally, i removed the no_more line at the end. one thing i found out is that you must have a domain alias file for each delivered domain or exim gives an error and won't accept recipient for that domain: Quote: temporarily rejected RCPT user@the.domain : failed to open /etc/aliases-domains/the.domain for linear search: No such file or directory
one question for lpfavreau, when you configured exim4 the first time (or via dpkg-reconfigure exim4-config) did you select "Yes" for "Split configuration into small files?" if you selected No, then you would need to add Xan's bit of code somewhere inside exim4.conf.template. i had originally specified No, but later changed it to Yes with the dpkg-reconfigure command. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|